Skip to content

Commit be712d9

Browse files
main.py: move is_identifier conditional import to end to avoid dependency loop
1 parent 6ae465f commit be712d9

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/makefun/main.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@
1616
from types import FunctionType
1717

1818

19-
if sys.version_info >= (3, 0):
20-
is_identifier = str.isidentifier
21-
else:
22-
from makefun._main_legacy_py import is_identifier
23-
2419
try: # python 3.3+
2520
from inspect import signature, Signature, Parameter
2621
except ImportError:
@@ -1563,3 +1558,9 @@ def compile_fun_manually(target,
15631558
new_f.__source__ = source_lines
15641559

15651560
return new_f
1561+
1562+
1563+
if sys.version_info >= (3, 0):
1564+
is_identifier = str.isidentifier
1565+
else:
1566+
from makefun._main_legacy_py import is_identifier

0 commit comments

Comments
 (0)