ytturi / MortDeGana_Bot

Bot for Fun
MIT License
5 stars 6 forks source link

Add import sorting to `checks.sh` #51

Closed ytturi closed 3 years ago

ytturi commented 3 years ago

Add an import sorting call to checks.sh so that the imports are "automatically" sorted. An option could be to make use of isort. Whatever you choose, make sure it works with black.

I'd like to get the format:

from X import x
from XY import x, y
from xxxxxxxxxxxxxxxxxxxxxxxxxxx import (
    a,
    b,
    c,
    ...
)
pypeaday commented 3 years ago

Hello, would you be opposed to adding pre-commit to this to replace your checks.sh script? It can include isort and black really easily and lots of other checks you might want, like flake8.

Let me know your thoughts - I'll happily add isort to your current checks.sh in the meantime

pypeaday commented 3 years ago

I just saw the PR where isort was added, so just let me know if you'd like to pursue pre-commit!

ytturi commented 3 years ago

Hey @nicpayne713 sorry I saw this late 😅 adding it to pre-commit sounds nice I'll open an issue for it if you are still willing to do it 👍