3 ms·
The author mentions PEP 8. In the Python community, there is a style checker called pep8, which implements the PEP 8 guidelines. Style only. There's also a tool
by MostAwesomeDude 15y ago
The author mentions PEP 8. In the Python community, there is a style checker called pep8, which implements the PEP 8 guidelines. Style only. There's also a tool called pyflakes, which does static code analysis. Obviously, it can't catch much, but it does alright. Then, there are lints: pylint and pychecker. These last two are horribly dogmatic and cannot stand Python which isn't written in their style. We usually don't recommend pylint and pychecker because of their overbearing nature and insistence on Java-in-Python code.
I recently built a couple websites, and we used Sass for the CSS, so we ended up with very nicely formatted SCSS maintained by hand, and minified CSS for deployment. I tried CSS Lint and was horrified at what it did to our CSS, so it's no longer part of our cycle.
If people wanna use it, fine, but it's not helpful to me.
- rimantas 15y agoSCSS is a very good choice if you want to have maintainable CSS.
- alifity 15y agoagree.. mixin is so powerful. You may add compass to make it more.
- urschrei 15y agoWhat exactly do you mean by Java-in-Python code? Do you have examples? I find that code written using Pythonic idioms gets a high Pylint score, without having the slightest whiff of Java about it. That's not to say that its defaults aren't excessively fussy in some cases, but it's easy to tweak so that it doesn't whine about too many public methods or using magic &c.
- MostAwesomeDude 15y agoBingo. It's really annoying that I can't use tuple/dict (un)packing without it complaining, let alone that if I have a class which is too big, too small, or does too much/too little, it throws a fit. Worse, it doesn't understand zope.interface and gets quite irate when confronted with interface-heavy code. I'm usually working in Twisted or Django, and it's so very unfun to try to get pychecker/pylint to be okay with those libraries. I'd rather have pyflakes.