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:
w0rp
2021-12-13 17:05:23 +00:00
committed by GitHub
parent ccbbf86d0e
commit 059471101c

View File

@@ -111,7 +111,7 @@ class Options(Generic[_M]):
def managers_map(self) -> Dict[str, Manager]: ...
@property
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_parent_list(self) -> List[Type[Model]]: ...
def get_ancestor_link(self, ancestor: Type[Model]) -> Optional[OneToOneField]: ...