Skip to content

Commit

Permalink
fix: don't use new typealias syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
monosans committed Oct 17, 2024
1 parent cf4e82a commit 8d9ff5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ ignore = [
"SIM105",
"TID252",
"TRY400",
"UP040",
]
select = ["ALL"]
unfixable = ["T"]
Expand Down
6 changes: 3 additions & 3 deletions socnet/api/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

if TYPE_CHECKING:
from collections.abc import Sequence
from typing import Literal
from typing import Literal, TypeAlias

from rest_framework.request import Request

from ..users.models import User

type SerializerFields = Sequence[str] | Literal["__all__"] | None
type SerializerExclude = Sequence[str] | None
SerializerFields: TypeAlias = Sequence[str] | Literal["__all__"] | None
SerializerExclude: TypeAlias = Sequence[str] | None

class AuthedRequest(Request):
user: User

0 comments on commit 8d9ff5a

Please sign in to comment.