diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d037198abb..a25eaa760c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,7 +38,7 @@ repos: - json # See https://github.com/prettier/prettier/issues/15742 for the fork reason - repo: https://github.com/rbubley/mirrors-prettier - rev: 'v3.9.9' + rev: 'v3.9.10' hooks: - id: prettier types_or: @@ -46,16 +46,16 @@ repos: - ts - markdown additional_dependencies: - - prettier@3.9.9 + - prettier@3.9.10 - 'prettier-plugin-organize-imports@4.3.0' # Python hooks - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.16.9 + rev: v0.17.2 hooks: - id: ruff-check - id: ruff-format - repo: https://github.com/tox-dev/pyproject-fmt - rev: "v2.29.4" + rev: "v2.30.3" hooks: - id: pyproject-fmt additional_dependencies: [tomli] diff --git a/pyproject.toml b/pyproject.toml index 5eb0f59ed2..cef735f65a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -212,12 +212,7 @@ extend-select = [ "UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up "W", # https://docs.astral.sh/ruff/rules/#pycodestyle-e-w ] -ignore = [ - "DJ001", - "PLC0415", - "RUF012", - "SIM105", -] +ignore = [ "DJ001", "ICN001", "PLC0415", "RUF012", "SIM105" ] # Migrations per-file-ignores."*/migrations/*.py" = [ "E501", diff --git a/src/documents/consumer.py b/src/documents/consumer.py index 94efd5f69a..c060368b4d 100644 --- a/src/documents/consumer.py +++ b/src/documents/consumer.py @@ -631,9 +631,7 @@ class ConsumerPlugin( pk=self.metadata.actor_id, ).first() if actor is not None: - from auditlog.context import ( # type: ignore[import-untyped] - set_actor, - ) + from auditlog.context import set_actor # type: ignore[import-untyped] with set_actor(actor): original_document.save() @@ -651,9 +649,7 @@ class ConsumerPlugin( # Create a log entry for the version addition, if enabled if settings.AUDIT_LOG_ENABLED: - from auditlog.models import ( # type: ignore[import-untyped] - LogEntry, - ) + from auditlog.models import LogEntry # type: ignore[import-untyped] LogEntry.objects.log_create( instance=root_doc,