From b4bb2d98a14558310f14778e1591e45193d39bc7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Apr 2023 11:26:05 +0200 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#2097) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/charliermarsh/ruff-pre-commit: v0.0.259 → v0.0.260](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.259...v0.0.260) - [github.com/psf/black: 23.1.0 → 23.3.0](https://github.com/psf/black/compare/23.1.0...23.3.0) Co-authored-by: Pierre Sassoulas --- .pre-commit-config.yaml | 4 ++-- astroid/decorators.py | 2 +- tests/test_regrtest.py | 2 +- tests/test_scoped_nodes.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7d17d7b37c..a17fb7f620 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,7 +10,7 @@ repos: - id: end-of-file-fixer exclude: tests/testdata - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: "v0.0.259" + rev: "v0.0.260" hooks: - id: ruff exclude: tests/testdata @@ -34,7 +34,7 @@ repos: - id: black-disable-checker exclude: tests/test_nodes_lineno.py - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 23.3.0 hooks: - id: black args: [--safe, --quiet] diff --git a/astroid/decorators.py b/astroid/decorators.py index a32f7f8480..1aaf14b1ee 100644 --- a/astroid/decorators.py +++ b/astroid/decorators.py @@ -55,7 +55,7 @@ def __init__(self, wrapped): stacklevel=2, ) try: - wrapped.__name__ + wrapped.__name__ # noqa[B018] except AttributeError as exc: raise TypeError(f"{wrapped} must have a __name__ attribute") from exc self.wrapped = wrapped diff --git a/tests/test_regrtest.py b/tests/test_regrtest.py index b135081a2a..88c4aab9b6 100644 --- a/tests/test_regrtest.py +++ b/tests/test_regrtest.py @@ -126,7 +126,7 @@ def run(): classes = astroid.nodes_of_class(nodes.ClassDef) for klass in classes: # triggers the _is_metaclass call - klass.type # pylint: disable=pointless-statement + klass.type # pylint: disable=pointless-statement # noqa[B018] def test_decorator_callchain_issue42(self) -> None: builder = AstroidBuilder() diff --git a/tests/test_scoped_nodes.py b/tests/test_scoped_nodes.py index 705f5d2d46..1a6b8d1576 100644 --- a/tests/test_scoped_nodes.py +++ b/tests/test_scoped_nodes.py @@ -263,7 +263,7 @@ def test_file_stream_api(self) -> None: file_build = builder.AstroidBuilder().file_build(path, "all") with self.assertRaises(AttributeError): # pylint: disable=pointless-statement, no-member - file_build.file_stream + file_build.file_stream # noqa[B018] def test_stream_api(self) -> None: path = resources.find("data/all.py")