-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Description
The following call to fix_code
fails with a ValueError: not enough values to unpack (expected 2, got 1)
message. This occurs at line 533 in autoflake.py
. The carriage return (\r
) seems to be a necessary part of the input in order to trigger this.
import autoflake
s = '''
from t import (
\r a,
b,
)
from t import (
a,
b,
)
'''
autoflake.fix_code(s)
Setup Info
Version: 2.31
Commit: b87ff10
Trace Report
Traceback (most recent call last):
File "rep.py", line 14, in <module>
autoflake.fix_code(s)
File "lib/python3.10/site-packages/autoflake.py", line 924, in fix_code
"".join(
File "lib/python3.10/site-packages/autoflake.py", line 622, in filter_code
result = filter_unused_import(
File "lib/python3.10/site-packages/autoflake.py", line 697, in filter_unused_import
return break_up_import(line)
File "lib/python3.10/site-packages/autoflake.py", line 533, in break_up_import
(indentation, imports) = re.split(
ValueError: not enough values to unpack (expected 2, got 1)
Metadata
Metadata
Assignees
Labels
No labels