mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-13 07:21:56 +08:00
Fix the get_field type for Pyright (#773)
This PR fixes the type of get_field so it won't report errors in Pyright's strictest type checking mode.
This commit is contained in:
@@ -111,7 +111,7 @@ class Options(Generic[_M]):
|
|||||||
def managers_map(self) -> Dict[str, Manager]: ...
|
def managers_map(self) -> Dict[str, Manager]: ...
|
||||||
@property
|
@property
|
||||||
def db_returning_fields(self) -> List[Field]: ...
|
def db_returning_fields(self) -> List[Field]: ...
|
||||||
def get_field(self, field_name: Union[Callable, str]) -> Field: ...
|
def get_field(self, field_name: Union[Callable[..., Any], str]) -> Field[Any, Any]: ...
|
||||||
def get_base_chain(self, model: Type[Model]) -> List[Type[Model]]: ...
|
def get_base_chain(self, model: Type[Model]) -> List[Type[Model]]: ...
|
||||||
def get_parent_list(self) -> List[Type[Model]]: ...
|
def get_parent_list(self) -> List[Type[Model]]: ...
|
||||||
def get_ancestor_link(self, ancestor: Type[Model]) -> Optional[OneToOneField]: ...
|
def get_ancestor_link(self, ancestor: Type[Model]) -> Optional[OneToOneField]: ...
|
||||||
|
|||||||
Reference in New Issue
Block a user