load-before-global-declaration (PLE0118)#
Derived from the Pylint linter.
What it does#
Checks for uses of names that are declared as global
prior to the
relevant global
declaration.
Why is this bad?#
The global
declaration applies to the entire scope. Using a name that's
declared as global
in a given scope prior to the relevant global
declaration is a syntax error.
Example#
Use instead: