4 ms·
Re: gofmt - python has black now. It's excellent. Pylint solves the undefined variable issue, but it is annoying as hell and always requires configuration. I w
by crdoconnor 8y ago
Re: gofmt - python has black now. It's excellent.
Pylint solves the undefined variable issue, but it is annoying as hell and always requires configuration. I wish there was a linter for python that didn't care about 80 character limit and was careful not to drown important errors with unimportant stylistic tics.
- fermigier 8y agoBlack 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.
- divan 8y agoThe real benefit of gofmt is that it's zero-config and used by 100%±1 Go developers. Virtually all Go code is properly formatted and in the same style. It's priceless.