-
-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
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
BUG: --sort-reexports don't work with multiple lines __all__ #2193
Comments
Hi! Before sorting: from pomcorn.locators.base_locators import (
Locator,
TInitLocator,
TLocator,
XPathLocator,
)
from pomcorn.locators.xpath_locators import (
ButtonWithTextLocator,
ClassLocator,
DataTestIdLocator,
ElementWithTextLocator,
IdLocator,
InputByLabelLocator,
NameLocator,
PropertyLocator,
TagNameLocator,
TextAreaByLabelLocator,
)
__all__ = (
"Locator",
"XPathLocator",
"TInitLocator",
"TLocator",
"ButtonWithTextLocator",
"ClassLocator",
"DataTestIdLocator",
"ElementWithTextLocator",
"IdLocator",
"InputByLabelLocator",
"NameLocator",
"PropertyLocator",
"TagNameLocator",
"TextAreaByLabelLocator",
) After sorting: from __all__ = ('ButtonWithTextLocator', 'ClassLocator', 'DataTestIdLocator',
'ElementWithTextLocator', 'IdLocator', 'InputByLabelLocator', 'Locator',
'NameLocator', 'PropertyLocator', 'TInitLocator', 'TLocator',
'TagNameLocator', 'TextAreaByLabelLocator', 'XPathLocator')
ByLabelLocator,
NameLocator,
PropertyLocator,
TagNameLocator,
TextAreaByLabelLocator,
)
__all__ = ( My isort config: [tool.isort]
profile="black"
line_length=79
multi_line_output=3
skip=[
"_tmp",
"src",
".env",
"env",
".venv",
"venv",
]
known_pytest=[
"pytest",
"_pytest",
"xdist",
]
sections=[
"FUTURE",
"STDLIB",
"THIRDPARTY",
"PYTEST",
"FIRSTPARTY",
"LOCALFOLDER",
]
include_trailing_comma=true
sort_reexports=true |
2 tasks
The issue still persists. It did enourmous mess with all |
daskol
added a commit
to nntile/nntile
that referenced
this issue
Jul 17, 2024
Also, there is a bug in `isort` related to reexport sorting (see PyCQA/isort#2193 for details).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
after using
isort file.py --sort-reexports
, becomes:It seems to me that there is a problem with calculating the current index when using reexports in cases where we use multiline exports or add comments to the beginning of the file.
The text was updated successfully, but these errors were encountered: