瀏覽代碼

Add static types

Getty Ritter 4 年之前
父節點
當前提交
fbecfaf026
共有 1 個文件被更改,包括 6 次插入0 次删除
  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