We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f984ff7 commit 5961becCopy full SHA for 5961bec
5 files changed
crates/processing_pyo3/mewnala/__init__.py
@@ -1 +1,12 @@
1
from .mewnala import *
2
+
3
+# re-export the native submodules as submodules of this module, if they exist
4
+# this allows users to import from `mewnala.math` and `mewnala.color`
5
+# if they exist, without needing to know about the internal structure of the native module
6
+import sys as _sys
7
+from . import mewnala as _native
8
+for _name in ("math", "color"):
9
+ _sub = getattr(_native, _name, None)
10
+ if _sub is not None:
11
+ _sys.modules[f"{__name__}.{_name}"] = _sub
12
+del _sys, _native, _name, _sub
0 commit comments