fix end_lineno issue
This commit is contained in:
parent
68b08498b7
commit
931fa7ff51
@ -361,7 +361,7 @@ def migrate_v2_imports(
|
||||
|
||||
if is_import:
|
||||
if isinstance(child, (ast.stmt, ast.expr)):
|
||||
best_line = (child.end_lineno or child.lineno) + 1
|
||||
best_line = (getattr(child, "end_lineno", None) or child.lineno) + 1
|
||||
|
||||
if not seen_import and is_import:
|
||||
seen_import = True
|
||||
|
Loading…
Reference in New Issue
Block a user