File tree Expand file tree Collapse file tree 3 files changed +28
-2
lines changed
Expand file tree Collapse file tree 3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change 1+ # Micropython does not provide the typing module, let's mock it
2+ try :
3+ import typing
4+ except ImportError :
5+ from types import ModuleType
6+
7+ class _TypingMock (ModuleType ):
8+ def __getattr__ (self , item ):
9+ return self
10+
11+ def __getitem__ (self , item ):
12+ return item
13+
14+ def __or__ (self , other ):
15+ return other
16+
17+ def __ror__ (self , other ):
18+ return other
19+
20+ import sys
21+
22+ sys .modules ["typing" ] = _TypingMock (_TypingMock .__name__ )
23+
24+
125from .bec2file import (
226 CONFIG_SECURITY_CODE_SIZE ,
327 Bec2File ,
Original file line number Diff line number Diff line change @@ -30,8 +30,9 @@ def lint(ctx: Context, fix: bool = False) -> None:
3030 sys .exit (1 )
3131
3232
33- @task
33+ @task ()
3434def build_mip_package_json (ctx : Context ) -> None :
35+ """builds the package.json for micropython's package manager mip"""
3536 repo = "github:baltech-ag/bec2format"
3637 project_name , project_version = (
3738 ctx .run ("poetry version" , hide = "out" ).stdout .strip ().rsplit (" " , maxsplit = 2 )
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ description = Run invoke
88deps =
99 invoke ===2.0.0
1010 poetry ==1.4.2
11- commands_pre = python -m invoke install
11+ commands_pre =
12+ python -m invoke install
1213commands =
1314 python -m invoke {posargs}
You can’t perform that action at this time.
0 commit comments