Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the struggle between setup.py and 'black' + 'flake8' #295

Closed
chfw opened this issue Jul 14, 2019 · 2 comments
Closed

the struggle between setup.py and 'black' + 'flake8' #295

chfw opened this issue Jul 14, 2019 · 2 comments

Comments

@chfw
Copy link
Member

chfw commented Jul 14, 2019

Just want to explain a bit more on my surprise commit:

Usually, I would use 'black' to format all codes include setup.py. And it is struggle between black and pypi-mobans because the setup.py generated from pypi-mobans always have a few times that attracts attention from 'black' and 'flake8'. Now with 'moban' stage, that checks differences between moban output and local changes, it revealed the struggle clearly.

#294

@jayvdb
Copy link
Member

jayvdb commented Jul 14, 2019

The approach we use in coala is to ignore style of files which are moban targets, such as setup.py. The source repo should generate good style, but that problem belongs in that skurce repo.

black is incompatible with isort and hard to make compatible with pycodestyle.

We have an issue in templates repo about setup.py.

An important moban enhancement is exposing the targets so templates can generate ignore lists in config files. This is already 'solved' in coala because they use .moban.yaml overrides moban.yaml so 'targets' is a part of the moban data usable by templates.

@chfw
Copy link
Member Author

chfw commented Jul 14, 2019

Regarding isort and black, the approach in pyexcel and pyecharts is to run isort first, then run black.

I will take your advice in ignore setup.py and try to make setup.py, flake8-compliant in pypi-mobans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants