tdviet / fedcloudclient

EGI FedCloud Client
https://fedcloudclient.fedcloud.eu
MIT License
8 stars 10 forks source link

Why are we enforcing import sort in this project? #65

Closed thebe14 closed 3 years ago

thebe14 commented 3 years ago

I find it really annoying that this project enforces import sorting. I can maybe understand (and tolerate) this cancer in a large Django project with hundreds of imports, where an automatic tool that organizes the imports could add some value. But in this project? No way.

All this is aggravated by the fact that I do not understand how super-linter checks the project (does it run all linters or just some of them?), the buggy rules that do not like the last item in param lists if it does not have comma after it (really?!?), etc. Even when I gave up, installed isort (with pip install isort) and sorted the source files with it, that was not liked by thee automatic linter on this repo.

I wasted half a day trying to push a small PR. This is unacceptable. Help!

tdviet commented 3 years ago

We can adjust the setting to make us feel comfortable. For example, the max-line-length was changed to 120 as I feel the 80-character max length is rather historical and not relevant anymore for modern wide monitors.

For the isort, I had great difficulties with its rules by myself, see the history. However, before I found the way to turn it off, I discovered that my editor (pycharm) has a hidden option for automatic sorting imports after saving, so I left it untouched, so far.

tdviet commented 3 years ago

Disable isort in super-linter. https://github.com/tdviet/fedcloudclient/commit/af71962fe314bc5d914e8da76824254fb796de67

As mentioned by @thebe14, it is incompatible with standalone isort and python editor (PyCharm), and it provides no help, and the editor can/will sort import automatically.