Auto-update pre-commit hooks (#6046)

This commit is contained in:
github-actions[bot] 2025-09-11 09:50:43 +01:00 committed by GitHub
parent 56977218a9
commit 957e45e083
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 3 additions and 17 deletions

View File

@ -27,7 +27,7 @@ repos:
args: ["--tab-width", "2"] args: ["--tab-width", "2"]
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.12 rev: v0.13.0
hooks: hooks:
- id: ruff - id: ruff
args: [--fix, --exit-non-zero-on-fix] args: [--fix, --exit-non-zero-on-fix]

View File

@ -125,14 +125,6 @@ lint.ignore = [
"S101", # Use of assert detected https://docs.astral.sh/ruff/rules/assert/ "S101", # Use of assert detected https://docs.astral.sh/ruff/rules/assert/
"SIM102", # sometimes it's better to nest "SIM102", # sometimes it's better to nest
"TRY003", # Avoid specifying long messages outside the exception class "TRY003", # Avoid specifying long messages outside the exception class
# Checks for uses of isinstance/issubclass that take a tuple of types for comparison.
# Deactivated because it can make the code slow: https://github.com/astral-sh/ruff/issues/7871
"UP038",
]
# The fixes in extend-unsafe-fixes will require
# provide the `--unsafe-fixes` flag when fixing.
lint.extend-unsafe-fixes = [
"UP038",
] ]
lint.isort.force-single-line = true lint.isort.force-single-line = true

View File

@ -204,7 +204,7 @@ class GitHubManager:
# updated packages, or known releases that will happen but haven't yet # updated packages, or known releases that will happen but haven't yet
if issue := self.existing_issues.get(needed_dj_version): if issue := self.existing_issues.get(needed_dj_version):
if index := issue.body.find(package_name): if index := issue.body.find(package_name):
name, _current, prev_compat, ok = (s.strip() for s in issue.body[index:].split("|", 4)[:4]) _name, _current, prev_compat, ok = (s.strip() for s in issue.body[index:].split("|", 4)[:4])
if ok in ("", "", "🕒"): if ok in ("", "", "🕒"):
return prev_compat, ok return prev_compat, ok

View File

@ -36,7 +36,7 @@ repos:
# Run the Ruff linter. # Run the Ruff linter.
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.12.12 rev: v0.13.0
hooks: hooks:
# Linter # Linter
- id: ruff-check - id: ruff-check

View File

@ -127,16 +127,10 @@ ignore = [
"S101", # Use of assert detected https://docs.astral.sh/ruff/rules/assert/ "S101", # Use of assert detected https://docs.astral.sh/ruff/rules/assert/
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"SIM102", # sometimes it's better to nest "SIM102", # sometimes it's better to nest
"UP038", # Checks for uses of isinstance/issubclass that take a tuple
# of types for comparison. # of types for comparison.
# Deactivated because it can make the code slow: # Deactivated because it can make the code slow:
# https://github.com/astral-sh/ruff/issues/7871 # https://github.com/astral-sh/ruff/issues/7871
] ]
# The fixes in extend-unsafe-fixes will require
# provide the `--unsafe-fixes` flag when fixing.
extend-unsafe-fixes = [
"UP038",
]
[tool.ruff.lint.isort] [tool.ruff.lint.isort]
force-single-line = true force-single-line = true