summarylogtreecommitdiffstats
path: root/ceph-18.2.2-mgr-ceph-module-stub.patch
blob: 151c81313f9345c7ab3d0cc6c0f526c3ec4c46dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
diff --git a/src/pybind/mgr/ceph_module.py b/src/pybind/mgr/ceph_module.py
new file mode 100644
index 00000000000..bfa21a853f4
--- /dev/null
+++ b/src/pybind/mgr/ceph_module.py
@@ -0,0 +1,28 @@
+# This is an interface definition of classes that are generated within C++.
+# Used by mypy to do proper type checking of mgr modules.
+# Without this file, all classes have undefined base classes.
+
+from typing import Any, Dict, List, Mapping, Optional, Sequence, Tuple, Union
+try:
+    from typing import Protocol  # Protocol was added in Python 3.8
+except ImportError:
+    class Protocol:  # type: ignore
+        pass
+
+class BasePyOSDMap(object):
+    pass
+
+class BasePyOSDMapIncremental(object):
+    pass
+
+class BasePyCRUSH(object):
+    pass
+
+class BaseMgrStandbyModule(object):
+    pass
+
+class CompletionT(Protocol):
+    pass
+
+class BaseMgrModule(object):
+    pass