Skip to content

Commit

Permalink
py39 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood committed Jul 9, 2023
1 parent 20af399 commit 17698fa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pyi.py
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,11 @@ def visit_ImportFrom(self, node: ast.ImportFrom) -> None:
if module_name is None:
return

if sys.version_info < (3, 10):
for obj in node.names:
obj.lineno = node.lineno
obj.col_offset = node.col_offset

imported_names = {obj.name: obj for obj in node.names}

if module_name == "__future__":
Expand Down

0 comments on commit 17698fa

Please sign in to comment.