mintel / build-harness

🤖Collection of Makefiles to facilitate building Python/Golang projects, Dockerfiles, and more
Apache License 2.0
2 stars 6 forks source link

Add isort+black interopability #27

Closed awichmann-mintel closed 4 years ago

awichmann-mintel commented 4 years ago

Followed these recommendations

charlieparkes commented 4 years ago

in setup.cfg or .isort.cfg

[isort]
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0
use_parentheses=True
line_length=88

skip_glob = */.tox/*, */.venv/*
not_skip = __init__.py
charlieparkes commented 4 years ago

Trying to weigh whether we should stick with expecting the user to configure or force these settings through flags... 🤔

awichmann-mintel commented 4 years ago

Trying to weigh whether we should stick with expecting the user to configure or force these settings through flags...

So, it's up to the user to create an isort config? Personally, I think we should have a common config and it could live in build-harness

charlieparkes commented 4 years ago

https://xkcd.com/1339/

Most repos already do have an .isort.cfg. The problem with assuming

https://gitlab.com/mintel/everest/cookiecutter-python-project/-/blob/master/%7B%7Bcookiecutter.project_hyphen_name%7D%7D/.isort.cfg

charlieparkes commented 4 years ago

Ok, 🤔 I think we can do this as you've laid it out since we're already assuming this is true by running black immediately after.

We brainstormed a few other ideas, but I think this should work for everyone rn.