summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>2023-05-16 12:06:17 +0000
committerGitHub <noreply@github.com>2023-05-16 12:06:17 +0000
commitd7baf5d43fa8de68c4c169f731ae5af43ce60790 (patch)
treed71613386d71f9fb05a39ae326e1c876347540b7
parentd392ea5d8a11049a275207cf18e488bf19a57c69 (diff)
downloadpylint-git-d7baf5d43fa8de68c4c169f731ae5af43ce60790.tar.gz
[pre-commit.ci] pre-commit autoupdate and simplify ruff config (#8694)
* [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 <pierre.sassoulas@gmail.com>
-rw-r--r--.pre-commit-config.yaml7
-rw-r--r--pylint/message/message_definition.py2
-rw-r--r--pylint/utils/ast_walker.py2
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()