saasforge / open-source-saas-boilerpate

Free SaaS boilerplate (Python/PostgreSQL/ReactJS/Webpack)
https://www.saasforge.dev
MIT License
816 stars 120 forks source link

Python lint #13

Open lowlyocean opened 4 years ago

lowlyocean commented 4 years ago

Extends npm run lint during continuous integration by failing on any C,E class errors reported by flake8 (and simply printing any W,F class errors). Main changes are to tox.ini, pyproject.toml, requirements.txt, package.json. Note that prior to creating future pull requests, the black autoformatter should be run on the root directory. Most of the changes in this PR are the result of running this autoformatter (so that the lint step can succeed)

lowlyocean commented 4 years ago

Thanks for reviewing, looks like there's discussion about the quoting convention for the black autoformatter here. One of the 'features' of black is that it makes a decision about conventions and doesn't have many configuration options. Would you mind considering the arguments presented there, and if we still think this adjustment is needed we can investigate switching to another autoformatter (e.g. yapf).

saasforge commented 4 years ago

Thanks for reviewing, looks like there's discussion about the quoting convention for the black autoformatter here. One of the 'features' of black is that it makes a decision about conventions and doesn't have many configuration options. Would you mind considering the arguments presented there, and if we still think this adjustment is needed we can investigate switching to another autoformatter (e.g. yapf).

We already have the convention to use single quotes in the code and double quotes in HTML layout. I think it's a good idea to stick to some rules, so we don't have plans to change them. As for the autoformatter, to be honest, I don't like any autoformatters especially when they dictate their own rules without a possibility to select/change our preferences.