summaryrefslogtreecommitdiff
path: root/pylint/checkers/base
diff options
context:
space:
mode:
authorpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>2023-02-07 11:12:06 +0100
committerGitHub <noreply@github.com>2023-02-07 11:12:06 +0100
commit4cbabc9baeded60d9c626c822583215cf3af69d2 (patch)
tree2bfa9d5e274061e17853f7926a14bee72b091731 /pylint/checkers/base
parent5bc4cd9a4b4c240227a41786823a6f226864dc4b (diff)
downloadpylint-git-4cbabc9baeded60d9c626c822583215cf3af69d2.tar.gz
[pre-commit.ci] pre-commit autoupdate (#8208)
updates: - [github.com/PyCQA/autoflake: v2.0.0 → v2.0.1](https://github.com/PyCQA/autoflake/compare/v2.0.0...v2.0.1) - [github.com/charliermarsh/ruff-pre-commit: v0.0.241 → v0.0.243](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.241...v0.0.243) - [github.com/psf/black: 22.12.0 → 23.1.0](https://github.com/psf/black/compare/22.12.0...23.1.0) * Remove false positive fixed in ruff 0.243 Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'pylint/checkers/base')
-rw-r--r--pylint/checkers/base/basic_error_checker.py1
1 files changed, 0 insertions, 1 deletions
diff --git a/pylint/checkers/base/basic_error_checker.py b/pylint/checkers/base/basic_error_checker.py
index abd34da1b..25038247c 100644
--- a/pylint/checkers/base/basic_error_checker.py
+++ b/pylint/checkers/base/basic_error_checker.py
@@ -397,7 +397,6 @@ class BasicErrorChecker(_BasicChecker):
def _check_nonlocal_without_binding(self, node: nodes.Nonlocal, name: str) -> None:
current_scope = node.scope()
while current_scope.parent is not None:
-
if not isinstance(current_scope, (nodes.ClassDef, nodes.FunctionDef)):
self.add_message("nonlocal-without-binding", args=(name,), node=node)
return