Skip to content

Commit 4a18d38

Browse files
Millefeuille42Nambrok
authored andcommitted
Add IO import in sm_typing (#152)
Fixes an issue where IO was not imported with the global import statement, since IO is not in `typing.__all__` in python 3.6. This causes an issue when trying to import IO from sm_typing. Signed-off-by: Mathieu Labourier <mathieu.labourier@vates.tech>
1 parent 28e1783 commit 4a18d38

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sm_typing/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import typing
22
from typing import *
33

4+
# Manually importing `IO` for python 3.6 because it is not in `typing.__all__`
5+
# and so, not imported by the statement above.
6+
from typing import IO
7+
48
if not hasattr(typing, 'override'):
59
def override(method): # type: ignore
610
try:

0 commit comments

Comments
 (0)