Skip to content

[pre-commit.ci] pre-commit autoupdate #578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/crate-ci/typos
rev: 6cb49915af2e93e61f5f0d0a82216e28ad5c7c18 # frozen: v1
rev: 3d97dc5b9833a60a62e70d5b56af2cc7ddd522f6 # frozen: v1
hooks:
- id: typos
- repo: https://github.com/tox-dev/pyproject-fmt
Expand All @@ -42,13 +42,13 @@ repos:
additional_dependencies:
- black==25.1.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: d19233b89771be2d89273f163f5edc5a39bbc34a # frozen: v0.11.12
rev: 0b19ef1fd6ad680ed7752d6daba883ce1265a6de # frozen: v0.12.2
hooks:
- id: ruff-check
args: [ --fix ]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 7010b10a09f65cd60a23c207349b539aa36dbec1 # frozen: v1.16.0
rev: 0f86793af5ef5f6dc63c8d04a3cabfa3ea8f9c6a # frozen: v1.16.1
hooks:
- id: mypy
additional_dependencies:
Expand Down
4 changes: 2 additions & 2 deletions src/django_upgrade/fixers/admin_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def visit_Call(
if unregistered_names is True:
state_details[site_name] = True
else:
existing_names = state_details.get(site_name, None)
existing_names = state_details.get(site_name)
if existing_names is None:
state_details[site_name] = unregistered_names
elif existing_names is not True:
Expand Down Expand Up @@ -314,4 +314,4 @@ def get_site_defined_line(module: ast.AST, site_name: str) -> int | None:
lines[name] = node.lineno

site_definitions[module] = lines
return lines.get(site_name, None)
return lines.get(site_name)