Skip to content

Commit 32b941e

Browse files
sobolevnngnpope
authored andcommitted
Fix CI
1 parent b9e3f31 commit 32b941e

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

django-stubs/db/models/fields/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ class Field(RegisterLookupMixin, Generic[_ST, _GT]):
130130
model: type[Model]
131131
name: str
132132
verbose_name: _StrOrPromise
133-
description: str | _Getter[str]
133+
description: _StrOrPromise | _Getter[_StrOrPromise]
134134
blank: bool
135135
null: bool
136136
unique: bool

django-stubs/utils/datastructures.pyi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ class MultiValueDict(dict[_K, _V]):
6262
def __init__(self, key_to_list_mapping: Mapping[_K, list[_V] | None]) -> None: ...
6363
@overload
6464
def __init__(self, key_to_list_mapping: Iterable[tuple[_K, list[_V]]] = ()) -> None: ...
65+
@overload # type: ignore[override]
66+
def get(self, key: _K, default: None = None) -> _V | None: ...
6567
@overload
66-
def get(self, key: _K) -> _V | None: ...
68+
def get(self, key: _K, default: _V) -> _V: ...
6769
@overload
6870
def get(self, key: _K, default: _Z) -> _V | _Z: ...
6971
def getlist(self, key: _K, default: _Z | None = None) -> list[_V] | _Z: ...

django-stubs/utils/functional.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ class classproperty(Generic[_Get]):
9797

9898
@type_check_only
9999
class _Getter(Protocol[_Get]): # noqa: PYI046
100-
"""Type fake to declare some read-only properties (until `property` builtin is generic)
100+
"""
101+
Type fake to declare some read-only properties (until `property` builtin is generic).
101102
102103
We can use something like `Union[_Getter[str], str]` in base class to avoid errors
103104
when redefining attribute with property or property with attribute.

0 commit comments

Comments
 (0)