Skip to content

Commit

Permalink
Suppressions (?) due to noqa: Y037, python/mypy#12211
Browse files Browse the repository at this point in the history
  • Loading branch information
intgr committed May 20, 2023
1 parent c4ef7c9 commit 3e6fe1b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion django-stubs/contrib/admin/options.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class BaseModelAdmin(Generic[_ModelT]):
raw_id_fields: Sequence[str]
fields: _FieldGroups | None
exclude: Sequence[str] | None
fieldsets: Optional[_FieldsetSpec]
fieldsets: Optional[_FieldsetSpec] # noqa: UP007
form: type[forms.ModelForm[_ModelT]]
filter_vertical: Sequence[str]
filter_horizontal: Sequence[str]
Expand Down
14 changes: 9 additions & 5 deletions django-stubs/db/migrations/operations/special.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from collections.abc import Mapping, Sequence
from typing import Any, Literal, Optional, Protocol # noqa: Y037 # https://github.com/python/mypy/issues/12211
from typing import Any, Literal, Optional, Protocol

from django.db.backends.base.schema import BaseDatabaseSchemaEditor
from django.db.migrations.state import StateApps
Expand All @@ -16,14 +16,18 @@ class SeparateDatabaseAndState(Operation):

class RunSQL(Operation):
noop: Literal[""]
sql: str | _ListOrTuple[str | tuple[str, dict[str, Any] | Optional[_ListOrTuple[str]]]]
reverse_sql: str | None | _ListOrTuple[str | tuple[str, dict[str, Any] | Optional[_ListOrTuple[str]]]]
sql: str | _ListOrTuple[str | tuple[str, dict[str, Any] | Optional[_ListOrTuple[str]]]] # noqa: UP007
reverse_sql: str | None | _ListOrTuple[
str | tuple[str, dict[str, Any] | Optional[_ListOrTuple[str]]] # noqa: UP007
]
state_operations: Sequence[Operation]
hints: Mapping[str, Any]
def __init__(
self,
sql: str | _ListOrTuple[str | tuple[str, dict[str, Any] | Optional[_ListOrTuple[str]]]],
reverse_sql: str | None | _ListOrTuple[str | tuple[str, dict[str, Any] | Optional[_ListOrTuple[str]]]] = ...,
sql: str | _ListOrTuple[str | tuple[str, dict[str, Any] | Optional[_ListOrTuple[str]]]], # noqa: UP007
reverse_sql: (
str | None | _ListOrTuple[str | tuple[str, dict[str, Any] | Optional[_ListOrTuple[str]]]] # noqa: UP007
) = ...,
state_operations: Sequence[Operation] = ...,
hints: Mapping[str, Any] | None = ...,
elidable: bool = ...,
Expand Down

0 comments on commit 3e6fe1b

Please sign in to comment.