add support for OneToOneField, more stubs

This commit is contained in:
Maxim Kurnikov
2018-11-13 17:43:21 +03:00
parent 155dc4e049
commit dc4f606f63
9 changed files with 97 additions and 238 deletions

View File

@@ -10,5 +10,15 @@ class ForeignKey(Field, Generic[_T]):
def __init__(self,
to: Union[Type[_T], str],
on_delete: Any,
related_name: str = ...,
**kwargs): ...
def __get__(self, instance, owner) -> _T: ...
class OneToOneField(Field, Generic[_T]):
def __init__(self,
to: Union[Type[_T], str],
on_delete: Any,
related_name: str = ...,
**kwargs): ...
def __get__(self, instance, owner) -> _T: ...