We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python version 3.12 isort version: 5.13.2
Test file test.py:
test.py
#!/usr/bin/env python import importlib.metadata __all__ = [ "FooType", "BarType", "some_method", ] __version__ = importlib.metadata.version("my-package")
Calling isort --srx test.py results in:
isort --srx test.py
isort/main.py:105: UserWarning: Unable to parse file test.py due to too many values to unpack (expected 2)
The exception is actually triggered here - somehow, both assignments to __all__ and __version__ end up in code.
__all__
__version__
code
It works if an empty line between both assignments is introduced (or any other code, for that matter).
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Python version 3.12
isort version: 5.13.2
Test file
test.py
:Calling
isort --srx test.py
results in:isort/main.py:105: UserWarning: Unable to parse file test.py due to too many values to unpack (expected 2)
The exception is actually triggered here - somehow, both assignments to
__all__
and__version__
end up incode
.It works if an empty line between both assignments is introduced (or any other code, for that matter).
The text was updated successfully, but these errors were encountered: