mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-09-13 07:22:35 +03:00
Auto-update pre-commit hooks (#6046)
This commit is contained in:
parent
56977218a9
commit
957e45e083
|
@ -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]
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user