There are several undefined names to be fixed. Each of these will raise NameError if executed.
% ruff check .
fluidsynth.py:772:75: F821 Undefined name `chan`
fluidsynth.py:888:12: F821 Undefined name `fluid_synth_set_chorus_speed`
fluidsynth.py:889:20: F821 Undefined name `fluid_synth_set_chorus_speed`
fluidsynth.py:893:12: F821 Undefined name `fluid_synth_set_chorus_depth`
fluidsynth.py:894:20: F821 Undefined name `fluid_synth_set_chorus_depth`
fluidsynth.py:1002:64: F821 Undefined name `name`
fluidsynth.py:1002:83: F821 Undefined name `name`
Found 7 errors.
% 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
def double():
return n * 2 # raises `NameError` if `n` is undefined when `double` is called
This Action uses minimal steps to run in ~5 seconds to rapidly:
codespell
to look for typos in the codebase, andruff
to lint Python code and provide intuitive GitHub Annotations to contributors.Tools:
The wildcard import
from ctypes import *
is not a good idea because it can hideundefined name
errors:There are several
undefined names
to be fixed. Each of these will raiseNameError
if executed.%
ruff check .
%
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