We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53af28f commit cb47c8eCopy full SHA for cb47c8e
bec2format/__init__.py
@@ -1,3 +1,10 @@
1
+import sys
2
+
3
+if sys.implementation.name == "micropython":
4
+ from .compatibility import mock_module
5
6
+ mock_module("typing")
7
8
from .bec2file import (
9
CONFIG_SECURITY_CODE_SIZE,
10
Bec2File,
bec2format/compatibility.py
@@ -0,0 +1,19 @@
+class _Mock:
+ def __getattr__(self, item):
+ return self
+ def __getitem__(self, item):
11
+ def __or__(self, other):
12
+ return other
13
14
+ def __ror__(self, other):
15
16
17
18
+def mock_module(module_name: str) -> None:
19
+ sys.modules[module_name] = _Mock() # type: ignore
0 commit comments