1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- from typing import Any, Optional, TypeVar, Type, List
- class Expression:
- pass
- T = TypeVar("T", bound="Model")
- class Model:
- id: int
- @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
- # 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) -> Any:
- pass
- def DateTimeField(unique: bool = False) -> Any:
- pass
- def BooleanField(default: bool = False, unique: bool = False) -> Any:
- pass
- def ForeignKeyField(key: object, null: bool = None, backref: str = "") -> Any:
- pass
- class IntegrityError(Exception):
- pass
|