Skip to content

Commit

Permalink
remove non-model overload for Field descriptor
Browse files Browse the repository at this point in the history
(not upstreamed)

hopefully eventually can remove when python/mypy#5570 is solved
  • Loading branch information
asottile-sentry committed Nov 9, 2023
1 parent e377bcf commit 7c7d3fb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions django-stubs/db/models/fields/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,7 @@ class Field(RegisterLookupMixin, Generic[_ST, _GT]):
def __get__(self, instance: None, owner: Any) -> _FieldDescriptor[Self]: ...
# Model instance access
@overload
def __get__(self, instance: Model, owner: Any) -> _GT: ...
# non-Model instances
@overload
def __get__(self, instance: Any, owner: Any) -> Self: ...
def __get__(self, instance: object, owner: Any) -> _GT: ...
def deconstruct(self) -> tuple[str, str, Sequence[Any], dict[str, Any]]: ...
def set_attributes_from_name(self, name: str) -> None: ...
def db_type_parameters(self, connection: BaseDatabaseWrapper) -> DictWrapper: ...
Expand Down

0 comments on commit 7c7d3fb

Please sign in to comment.