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 109c90f commit 6899d13Copy full SHA for 6899d13
bec2format/__init__.py
@@ -1,3 +1,9 @@
1
+import sys
2
+
3
+if sys.implementation.name == "micropython":
4
+ import bec2format.micropython_compatibility_quirks
5
6
7
from .bec2file import (
8
CONFIG_SECURITY_CODE_SIZE,
9
Bec2File,
bec2format/micropython_compatibility_quirks.py
@@ -0,0 +1,22 @@
+class _Mock:
+ def __getattr__(self, item):
+ return self
+ def __getitem__(self, item):
10
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
20
21
22
+mock_module("typing")
0 commit comments