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")