diff options
author | pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> | 2023-02-07 11:12:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-07 11:12:06 +0100 |
commit | 4cbabc9baeded60d9c626c822583215cf3af69d2 (patch) | |
tree | 2bfa9d5e274061e17853f7926a14bee72b091731 | |
parent | 5bc4cd9a4b4c240227a41786823a6f226864dc4b (diff) | |
download | pylint-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>
-rw-r--r-- | .pre-commit-config.yaml | 6 | ||||
-rw-r--r-- | pylint/checkers/base/basic_error_checker.py | 1 | ||||
-rw-r--r-- | pyproject.toml | 1 |
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"] |