forked from orbit-oss/flask
Add skip to fix unnoticed bug with good imports
Fixes logic so that imports that should not be changed are skipped, which was not happening correctly before.
This commit is contained in:
parent
818c42cfea
commit
f6c45afb6f
2 changed files with 9 additions and 1 deletions
|
|
@ -40,6 +40,8 @@ def fix_from_imports(red):
|
|||
from_imports = red.find_all("FromImport")
|
||||
for x, node in enumerate(from_imports):
|
||||
values = node.value
|
||||
if len(values) < 2:
|
||||
continue
|
||||
if (values[0].value == 'flask') and (values[1].value == 'ext'):
|
||||
# Case 1
|
||||
if len(node.value) == 3:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue