Skip to content
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

Feature Request: Support isort literal ordering #7929

Closed
kkirsche opened this issue Oct 12, 2023 · 1 comment
Closed

Feature Request: Support isort literal ordering #7929

kkirsche opened this issue Oct 12, 2023 · 1 comment
Labels
isort Related to import sorting

Comments

@kkirsche
Copy link

This issue is to request support for isort's ordering action comments.

For example:

# isort: unique-list
__all__ = ["b", "c", "a", "c"]

Would be rewritten to:

# isort: unique-list
__all__ = [ "a", "b", "c"]

This code within isort is located here:
https://github.com/PyCQA/isort/blob/9e0ad3d9939e0649a77f4e04db23652f170808a6/isort/literal.py#L97

With the code styling comments supported by isort located here:
https://github.com/PyCQA/isort/blob/9e0ad3d9939e0649a77f4e04db23652f170808a6/isort/core.py#L18

This was originally requested within isort in the issue below and released as part of isort 5.3.0:
PyCQA/isort#1358

Thank you for your time and consideration.

@charliermarsh
Copy link
Member

Thanks for the clear issue. I'm going to merge this into #1198 since we're tracking these collection comments there.

@charliermarsh charliermarsh closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2023
@charliermarsh charliermarsh added the isort Related to import sorting label Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
isort Related to import sorting
Projects
None yet
Development

No branches or pull requests

2 participants