Skip to content
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

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

Merged
merged 3 commits into from
Feb 13, 2025
Merged
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.7.3
rev: v0.9.6
hooks:
# Run the linter.
- id: ruff
Expand Down
5 changes: 4 additions & 1 deletion eav/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Any, ClassVar, Dict, List, Sequence, Union
from typing import TYPE_CHECKING, Any, ClassVar, Dict, List, Union

from django.contrib import admin
from django.contrib.admin.options import InlineModelAdmin, ModelAdmin
Expand All @@ -11,6 +11,9 @@

from eav.models import Attribute, EnumGroup, EnumValue, Value

if TYPE_CHECKING:
from collections.abc import Sequence

_FIELDSET_TYPE = List[Union[str, Dict[str, Any]]] # type: ignore[misc]

some_attribute = ClassVar[Dict[str, str]]
Expand Down
6 changes: 3 additions & 3 deletions tests/test_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ def test_generate_slug_uniqueness() -> None:
generated_slugs: dict[str, str] = {}
for input_str in inputs:
slug = generate_slug(input_str)
assert (
slug not in generated_slugs.values()
), f"Duplicate slug '{slug}' generated for input '{input_str}'"
assert slug not in generated_slugs.values(), (
f"Duplicate slug '{slug}' generated for input '{input_str}'"
)
generated_slugs[input_str] = slug

assert len(generated_slugs) == len(
Expand Down
Loading