Use of ‘global’ at module level¶
ID: py/redundant-global-declaration Kind: problem Severity: warning Precision: very-high Tags: - maintainability - useless-code Query suites: - python-security-and-quality.qls
global statement is used to specify that assignments to that name are assignments to the variable in the global (module) scope, rather than in the local scope. At the module level, this statement is redundant because the local scope and global scope are the same.
Python Language Reference: The global statement.