-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Needs triage 📥Just created, needs acknowledgment, triage, and proper labellingJust created, needs acknowledgment, triage, and proper labelling
Description
Bug description
We have a set of `pytest_bdd` based tests, where every step is decorated with its description and has the same name `_`. Up until version 4.0.0, it was not a problem. But now every single step description after the first one emits a failed test `function-redefined`. Nothing was changed in a code and if I
Configuration
Command used
± uv run pylint -j 0 example.py
Pylint output
************* Module example
example.py:15:0: E0102: function already defined line 10 (function-redefined)
example.py:20:0: E0102: function already defined line 10 (function-redefined)
------------------------------------------------------------------
Your code has been rated at 0.00/10 (previous run: 0.00/10, +0.00)
Expected behavior
Same as it was in versions before 4.0.0:
************* Module example
example.py:15:0: E0102: function already defined line 10 (function-redefined)
example.py:20:0: E0102: function already defined line 10 (function-redefined)
------------------------------------------------------------------
Your code has been rated at 0.00/10 (previous run: 0.00/10, +0.00)
This is an example for pytest version 3.3.9 on the very same file. File itself:
.
Pylint version
debian:
± uv run pylint --version
pylint 3.3.9
astroid 3.3.11
Python 3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0]
Same on Ubuntu:
± pylint --version
pylint 4.0.0
astroid 4.0.1
Python 3.13.5 (main, Jun 12 2025, 08:56:14) [GCC 13.3.0]
OS / Environment
Debian:
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 13 (trixie)
Release: 13
Codename: trixie
Ubuntu:
± lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.2 LTS
Release: 24.04
Codename: noble
Additional dependencies
Metadata
Metadata
Assignees
Labels
Needs triage 📥Just created, needs acknowledgment, triage, and proper labellingJust created, needs acknowledgment, triage, and proper labelling