diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c2a644f2d..2cd8fccc6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,7 +27,7 @@ repos: args: ["--tab-width", "2"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.12 + rev: v0.13.0 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/pyproject.toml b/pyproject.toml index 68bfe4025..221d14bb9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -125,14 +125,6 @@ lint.ignore = [ "S101", # Use of assert detected https://docs.astral.sh/ruff/rules/assert/ "SIM102", # sometimes it's better to nest "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 diff --git a/scripts/create_django_issue.py b/scripts/create_django_issue.py index bbc897f5c..ef4c07663 100644 --- a/scripts/create_django_issue.py +++ b/scripts/create_django_issue.py @@ -204,7 +204,7 @@ class GitHubManager: # updated packages, or known releases that will happen but haven't yet if issue := self.existing_issues.get(needed_dj_version): 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 ("✅", "❓", "🕒"): return prev_compat, ok diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 016e50a9b..4b7e953e6 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -36,7 +36,7 @@ repos: # Run the Ruff linter. - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.12 + rev: v0.13.0 hooks: # Linter - id: ruff-check diff --git a/{{cookiecutter.project_slug}}/pyproject.toml b/{{cookiecutter.project_slug}}/pyproject.toml index 0147262bf..e523b4ca4 100644 --- a/{{cookiecutter.project_slug}}/pyproject.toml +++ b/{{cookiecutter.project_slug}}/pyproject.toml @@ -127,16 +127,10 @@ ignore = [ "S101", # Use of assert detected https://docs.astral.sh/ruff/rules/assert/ "RUF012", # Mutable class attributes should be annotated with `typing.ClassVar` "SIM102", # sometimes it's better to nest - "UP038", # 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 ] -# The fixes in extend-unsafe-fixes will require -# provide the `--unsafe-fixes` flag when fixing. -extend-unsafe-fixes = [ - "UP038", -] [tool.ruff.lint.isort] force-single-line = true