Browse Source

Add static types

Getty Ritter 4 years ago
parent
commit
fbecfaf026
1 changed files with 6 additions and 0 deletions
  1. 6 0
      stubs/peewee.py

+ 6 - 0
stubs/peewee.py

@@ -11,6 +11,9 @@ T = TypeVar("T", bound="Model")
 class Model:
     id: int
 
+    class DoesNotExist(Exception):
+        pass
+
     @classmethod
     def create(cls: Type[T], **kwargs) -> T:
         pass
@@ -30,6 +33,9 @@ class Model:
     def save(self):
         pass
 
+    def delete(self) -> Any:
+        pass
+
 
 # These all do things that MyPy chokes on, so we're going to treat
 # them like methods instead of naming classes