From d7baf5d43fa8de68c4c169f731ae5af43ce60790 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 16 May 2023 12:06:17 +0000 Subject: [pre-commit.ci] pre-commit autoupdate and simplify ruff config (#8694) 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.265 → v0.0.267](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.265...v0.0.267) - [github.com/pre-commit/mirrors-mypy: v1.2.0 → v1.3.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.2.0...v1.3.0) --------- Co-authored-by: Pierre Sassoulas --- .pre-commit-config.yaml | 7 ++----- pylint/message/message_definition.py | 2 +- pylint/utils/ast_walker.py | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3737f1ad8..55b049d33 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,14 +16,11 @@ repos: doc/data/messages/m/missing-final-newline/bad.py| )$ - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: "v0.0.265" + rev: "v0.0.267" hooks: - id: ruff args: ["--fix"] exclude: &fixtures tests(/\w*)*/functional/|tests/input|doc/data/messages|tests(/\w*)*data/ - - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: "v0.0.265" - hooks: - id: ruff name: ruff-doc files: doc/data/messages @@ -112,7 +109,7 @@ repos: files: ^(doc/(.*/)*.*\.rst) additional_dependencies: [Sphinx==5.0.1] - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.2.0 + rev: v1.3.0 hooks: - id: mypy name: mypy diff --git a/pylint/message/message_definition.py b/pylint/message/message_definition.py index 29a8780cb..eebcd5dae 100644 --- a/pylint/message/message_definition.py +++ b/pylint/message/message_definition.py @@ -70,7 +70,7 @@ class MessageDefinition: return f"MessageDefinition:{self.symbol} ({self.msgid})" def __str__(self) -> str: - return f"{repr(self)}:\n{self.msg} {self.description}" + return f"{self!r}:\n{self.msg} {self.description}" def may_be_emitted(self, py_version: tuple[int, ...] | sys._version_info) -> bool: """May the message be emitted using the configured py_version?""" diff --git a/pylint/utils/ast_walker.py b/pylint/utils/ast_walker.py index 338caf57a..367a39b81 100644 --- a/pylint/utils/ast_walker.py +++ b/pylint/utils/ast_walker.py @@ -98,7 +98,7 @@ class ASTWalker: if self.exception_msg is False: file = getattr(astroid.root(), "file", None) print( - f"Exception on node {repr(astroid)} in file '{file}'", + f"Exception on node {astroid!r} in file '{file}'", file=sys.stderr, ) traceback.print_exc() -- cgit v1.2.1