Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/whatsnew/fragments/8174.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
`--allow-global-unused-variables` respects `--dummy-variables-rgx` now.

Closes #8174
2 changes: 2 additions & 0 deletions pylint/checkers/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -3193,6 +3193,8 @@
for node in node_lst:
if in_type_checking_block(node):
continue
if self._is_name_ignored(node_lst, name):
continue

Check warning on line 3197 in pylint/checkers/variables.py

View check run for this annotation

Codecov / codecov/patch

pylint/checkers/variables.py#L3197

Added line #L3197 was not covered by tests
self.add_message("unused-variable", args=(name,), node=node)

# pylint: disable = too-many-branches
Expand Down