summaryrefslogtreecommitdiff
path: root/pylint/checkers
diff options
context:
space:
mode:
authorMark Byrne <31762852+mbyrnepr2@users.noreply.github.com>2023-02-27 12:55:41 +0100
committerGitHub <noreply@github.com>2023-02-27 12:55:41 +0100
commitd30c45b2e7a0c13a846c8d221f0c9ff9f012aa4a (patch)
treed2ef6f2722d85ad78678058a5d8e5c37e07328c2 /pylint/checkers
parent641f526e1632dd1835b79abaf31006efc60824f6 (diff)
downloadpylint-git-d30c45b2e7a0c13a846c8d221f0c9ff9f012aa4a.tar.gz
Prevent emitting ``invalid-name`` on 'global' redefinition (#8337)
Closes #8307
Diffstat (limited to 'pylint/checkers')
-rw-r--r--pylint/checkers/base/name_checker/checker.py5
1 files changed, 0 insertions, 5 deletions
diff --git a/pylint/checkers/base/name_checker/checker.py b/pylint/checkers/base/name_checker/checker.py
index f1fd8d379..1341edc96 100644
--- a/pylint/checkers/base/name_checker/checker.py
+++ b/pylint/checkers/base/name_checker/checker.py
@@ -389,11 +389,6 @@ class NameChecker(_BasicChecker):
visit_asyncfunctiondef = visit_functiondef
- @utils.only_required_for_messages("disallowed-name", "invalid-name")
- def visit_global(self, node: nodes.Global) -> None:
- for name in node.names:
- self._check_name("const", name, node)
-
@utils.only_required_for_messages(
"disallowed-name",
"invalid-name",