Skip to content

Commit 9bd39e8

Browse files
committed
Refactor no_type_check to return the original function directly
fixes Issues with typing and @no_type_check #817 Signed-off-by: Jos Verlinde <Jos_Verlinde@hotmail.com>
1 parent b52fbe5 commit 9bd39e8

File tree

4 files changed

+2
-6
lines changed

4 files changed

+2
-6
lines changed

mip/typing.mpy

-38 Bytes
Binary file not shown.

mip/typing.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ def get_args(type):
1313

1414

1515
def no_type_check(func):
16-
def wrapper(*args, **kwargs):
17-
func(*args, **kwargs)
18-
return wrapper
16+
return func
1917

2018

2119
def overload(func):

mip/typing_extensions.mpy

-38 Bytes
Binary file not shown.

mip/typing_extensions.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ def get_args(type):
1313

1414

1515
def no_type_check(func):
16-
def wrapper(*args, **kwargs):
17-
func(*args, **kwargs)
18-
return wrapper
16+
return func
1917

2018

2119
def overload(func):

0 commit comments

Comments
 (0)