]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
python-common/ceph/smb: add typing shim file
authorJohn Mulligan <jmulligan@redhat.com>
Wed, 1 Apr 2026 22:22:51 +0000 (18:22 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Wed, 27 May 2026 18:26:53 +0000 (14:26 -0400)
Avoid having to put this in a bunch of files in our new ceph.smb.ctl files.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/python-common/ceph/smb/ctl/_typing.py [new file with mode: 0644]

diff --git a/src/python-common/ceph/smb/ctl/_typing.py b/src/python-common/ceph/smb/ctl/_typing.py
new file mode 100644 (file)
index 0000000..bad05ab
--- /dev/null
@@ -0,0 +1,12 @@
+"""Typing helpers"""
+
+import typing
+
+import sys
+
+if sys.version_info >= (3, 11):
+    from typing import Self
+elif typing.TYPE_CHECKING:
+    from typing_extensions import Self
+else:
+    Self = typing.Any