Closed cclauss closed 4 months ago
% ruff check --output-format=github --target-version=py38 .
ruff check --output-format=github --target-version=py38 .
Error: fluidsynth.py:772:75: F821 Undefined name `chan` Error: fluidsynth.py:888:12: F821 Undefined name `fluid_synth_set_chorus_speed` Error: fluidsynth.py:889:20: F821 Undefined name `fluid_synth_set_chorus_speed` Error: fluidsynth.py:893:12: F821 Undefined name `fluid_synth_set_chorus_depth` Error: fluidsynth.py:894:20: F821 Undefined name `fluid_synth_set_chorus_depth` Error: fluidsynth.py:1002:64: F821 Undefined name `name` Error: fluidsynth.py:1002:83: F821 Undefined name `name`
fluid_synth_set_chorus_speed
chan and name are also not defined which will raise NameError if these lines of code are run.
chan
name
NameError
% ruff rule F821
ruff rule F821
Derived from the Pyflakes linter.
Checks for uses of undefined names.
An undefined name is likely to raise NameError at runtime.
def double(): return n * 2 # raises `NameError` if `n` is undefined when `double` is called
Use instead:
def double(n): return n * 2
Should be fixed by #63
%
ruff check --output-format=github --target-version=py38 .
51 highlights the problem with
fluid_synth_set_chorus_speed
.chan
andname
are also not defined which will raiseNameError
if these lines of code are run.%
ruff rule F821
undefined-name (F821)
Derived from the Pyflakes linter.
What it does
Checks for uses of undefined names.
Why is this bad?
An undefined name is likely to raise
NameError
at runtime.Example
Use instead:
References