1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- from typing import Any, Optional, TypeVar, Type, List
- class Expression:
- pass
- T = TypeVar("T", bound="Model")
- class Model:
- id: int
- class DoesNotExist(Exception):
- pass
- @classmethod
- def create(cls: Type[T], **kwargs) -> T:
- pass
- @classmethod
- def get(cls: Type[T], expr: Optional[Expression] = None, **kwargs) -> T:
- pass
- @classmethod
- def get_or_none(cls: Type[T], expr: Optional[Expression] = None, **kwargs) -> T:
- pass
- @classmethod
- def select(self, expr: Optional[Expression] = None):
- pass
- def save(self):
- pass
- def delete_instance(self) -> Any:
- pass
- # These all do things that MyPy chokes on, so we're going to treat
- # them like methods instead of naming classes
- def TextField(default: str = "", unique: bool = False, null: bool = None) -> Any:
- pass
- def DateTimeField(unique: bool = False, null: bool = None) -> Any:
- pass
- def BooleanField(default: bool = False, unique: bool = False, null: bool = None) -> Any:
- pass
- def ForeignKeyField(key: object, null: bool = None, backref: str = "") -> Any:
- pass
- class IntegrityError(Exception):
- pass
|