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
Would be nice to have an isort-compatible style built-in.
This would appear to be the same as the pycharm style, but with ordering done as: from foo import GLOBAL_VAR, ClassName, func
rather than from foo import ClassName, GLOBAL_VAR, func
i.e. it needs to group the ordering into 3 parts, ALLCAPS, CapWords and lowercase.
Sorting code for this could be as simple as:
group = lambda k: 0 if k.isupper() else 2 if k.islower() else 1
key = lambda k: (group(k), k)
>>> a = ("GLOBAL_VAR", "ClassName", "func")
>>> sorted(a, key=key)
['GLOBAL_VAR', 'ClassName', 'func']
The text was updated successfully, but these errors were encountered:
Would be nice to have an isort-compatible style built-in.
This would appear to be the same as the pycharm style, but with ordering done as:
from foo import GLOBAL_VAR, ClassName, func
rather than
from foo import ClassName, GLOBAL_VAR, func
i.e. it needs to group the ordering into 3 parts, ALLCAPS, CapWords and lowercase.
Sorting code for this could be as simple as:
The text was updated successfully, but these errors were encountered: