4 ms·
Black is excellent ideed, and solves the problem of having code compatible with PEP8 once and for all. flake8 is a linter that doesn't need much config, and yo
by fermigier 8y ago
Black is excellent ideed, and solves the problem of having code compatible with PEP8 once and for all.
flake8 is a linter that doesn't need much config, and you can config it to give you only "serious" errors and not stylistic issues.
I gave a talk on these subjects last year at the Paris Open Source Summit: https://speakerdeck.com/sfermigier/python-quality-engineering-a-tour-of-best-practices https://speakerdeck.com/sfermigier/python-quality-engineerin... (NB: Black didn't exist yet at the time).
- crdoconnor 8y agoflake8, like black, shouldn't really require any config on most projects yet annoyingly it always requires at least a little. I really would switch to another tool in a heartbeat if they could just fix that. Ideally instead of needing to be told whether to only show "serious" errors, for instance, it should just give you a project "score" (sum of the errors x their severity) and show the top 20 or so errors in order of importance and by default it should never exit with error code 1 with just stylistic errors unless explicitly configured to do so.
- shloub 8y agoHave you tried pyflakes?
- crdoconnor 8y agoNo, and I think you just made my day. Thanks! Or rather, I'd vaguely heard the name but I erroneously thought it was just another flake8 type thing.
- camel_Snake 8y agopyllama is another project in the same space which I like. It uses pyflakes under the hood. https://github.com/klen/pylama https://github.com/klen/pylama
- g8oz 8y agoBlack? Why the undifferentiated name? Another OSS naming fail.