summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.pre-commit-config.yaml6
-rw-r--r--pylint/checkers/base/basic_error_checker.py1
-rw-r--r--pyproject.toml1
3 files changed, 3 insertions, 5 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index d6ca18b40..63dd7cfb8 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -16,7 +16,7 @@ repos:
doc/data/messages/m/missing-final-newline/bad.py|
)$
- repo: https://github.com/PyCQA/autoflake
- rev: v2.0.0
+ rev: v2.0.1
hooks:
- id: autoflake
exclude: &fixtures tests(/\w*)*/functional/|tests/input|doc/data/messages|tests(/\w*)*data/
@@ -27,7 +27,7 @@ repos:
- --remove-duplicate-keys
- --remove-unused-variables
- repo: https://github.com/charliermarsh/ruff-pre-commit
- rev: "v0.0.241"
+ rev: "v0.0.243"
hooks:
- id: ruff
args: ["--fix"]
@@ -51,7 +51,7 @@ repos:
- id: isort
exclude: doc/data/messages/(r/reimported|w/wrong-import-order|u/ungrouped-imports|m/misplaced-future|m/multiple-imports)/bad.py
- repo: https://github.com/psf/black
- rev: 22.12.0
+ rev: 23.1.0
hooks:
- id: black
args: [--safe, --quiet]
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
diff --git a/pyproject.toml b/pyproject.toml
index 00a30c91f..8bb98427e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -133,7 +133,6 @@ module = [
[tool.ruff]
select = ["E", "F", "B"]
ignore = [
- "F841", # False positive for typing
"B905", # Not enforced previousely
]
fixable = ["E", "F", "B"]