Closed cclauss closed 3 months ago
% ruff check --select=F811 # https://docs.astral.sh/ruff/rules/redefined-while-unused
ruff check --select=F811
F811 Redefinition of unused `test_descriptions_no_json` from line 195
Redefinitions of unused names are unnecessary and often indicative of a mistake.
https://github.com/ahupp/python-magic/blob/fc7ebc0d6f9e34d422dbf49aec2382e4a5bde379/test/python_magic_test.py#L195-L205
One of these functions should be renamed to be unique.
% ruff rule F811
ruff rule F811
Derived from the Pyflakes linter.
Fix is sometimes available.
Checks for variable definitions that redefine (or "shadow") unused variables.
import foo import bar import foo # Redefinition of unused `foo` from line 1
Use instead:
import foo import bar
fixed in 4b776d72729b4a1cf87f6939089cacdeff171972
%
ruff check --select=F811
# https://docs.astral.sh/ruff/rules/redefined-while-unusedRedefinitions of unused names are unnecessary and often indicative of a mistake.
https://github.com/ahupp/python-magic/blob/fc7ebc0d6f9e34d422dbf49aec2382e4a5bde379/test/python_magic_test.py#L195-L205
One of these functions should be renamed to be unique.
%
ruff rule F811
redefined-while-unused (F811)
Derived from the Pyflakes linter.
Fix is sometimes available.
What it does
Checks for variable definitions that redefine (or "shadow") unused variables.
Why is this bad?
Redefinitions of unused names are unnecessary and often indicative of a mistake.
Example
Use instead: