You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just discovered the sorted literals feature, which is fantastic. One behavior I'm noticing is that if you have a literal before any imports, then isort doesn't appear to pick up on that literal.
The following example won't have __all__ sorted:
"""I'm a docstring! Look at me!"""# isort: unique-list__all__= ["Foo", "Foo", "Bar"]
fromtypingimportfinal# arbitrary@finalclassFoo:
...
@finalclassBar:
...
However, these two examples appear to be fine and will have __all__ sorted correctly.
# Some top-level comment before the docstring.# Maybe it's a copyright. It's probably a copyright."""I'm a docstring! Look at me!"""# isort: unique-list__all__= ["Foo", "Foo", "Bar"]
fromtypingimportfinal# arbitrary@finalclassFoo:
...
@finalclassBar:
...
"""I'm a docstring! Look at me!"""from __future__ importannotations# isort: unique-list__all__= ["Foo", "Foo", "Bar"]
fromtypingimportfinal# arbitrary@finalclassFoo:
...
@finalclassBar:
...
The text was updated successfully, but these errors were encountered:
On Jul 28, 2021, at 2:02 AM, Timothy Edmund Crosley ***@***.***> wrote:
Closed #1792 via 915aa68.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
I just discovered the sorted literals feature, which is fantastic. One behavior I'm noticing is that if you have a literal before any imports, then
isort
doesn't appear to pick up on that literal.The following example won't have
__all__
sorted:However, these two examples appear to be fine and will have
__all__
sorted correctly.The text was updated successfully, but these errors were encountered: