Hi,
(first of all, sorry for the cross-posting, but I can't decide on which list this belongs - at least I resisted sending it to the TIP list too :P)
I recently started switching from flake8[1] to pytest-pep8[2] and pytest-flakes[3], but missed a way to run the mccabe[4] code complexity checker.
So I wrote my first pytest plugin to integrate that with pytest:
https://github.com/The-Compiler/pytest-mccabe
Any feedback is welcome! I plan to write some more tests (for the config wildcards mainly) and run pylint/pyflakes/pep8 over it, and then I'll release v0.1 on PyPI.
Thanks to:
- Florian Schulze for pytest-flakes, on which the code is based. - Ned Batchelder for the original McCabe script. - Florent Xicluna for mccabe on PyPI.
Florian
[1] https://pypi.python.org/pypi/flake8 [2] https://pypi.python.org/pypi/pytest-pep8 [3] https://pypi.python.org/pypi/pytest-flakes [4] https://pypi.python.org/pypi/mccabe
there's a pylama project which is a bit buggy at error reporting, but it solves the code checks as a whole, which i appreciate
https://github.com/klen/pylama
So it general solution for code checks but it's also a pytest plugin which includes mccabe checks
I use it in several projects
On Tue, Jun 2, 2015 at 9:12 AM Florian Bruhin me@the-compiler.org wrote:
Hi,
(first of all, sorry for the cross-posting, but I can't decide on which list this belongs - at least I resisted sending it to the TIP list too :P)
I recently started switching from flake8[1] to pytest-pep8[2] and pytest-flakes[3], but missed a way to run the mccabe[4] code complexity checker.
So I wrote my first pytest plugin to integrate that with pytest:
https://github.com/The-Compiler/pytest-mccabe
Any feedback is welcome! I plan to write some more tests (for the config wildcards mainly) and run pylint/pyflakes/pep8 over it, and then I'll release v0.1 on PyPI.
Thanks to:
- Florian Schulze for pytest-flakes, on which the code is based.
- Ned Batchelder for the original McCabe script.
- Florent Xicluna for mccabe on PyPI.
Florian
[1] https://pypi.python.org/pypi/flake8 [2] https://pypi.python.org/pypi/pytest-pep8 [3] https://pypi.python.org/pypi/pytest-flakes [4] https://pypi.python.org/pypi/mccabe
-- http://www.the-compiler.org | me@the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/ _______________________________________________ pytest-dev mailing list pytest-dev@python.org https://mail.python.org/mailman/listinfo/pytest-dev
* Anatoly Bubenkov bubenkoff@gmail.com [2015-06-02 08:41:12 +0000]:
there's a pylama project which is a bit buggy at error reporting, but it solves the code checks as a whole, which i appreciate
https://github.com/klen/pylama
So it general solution for code checks but it's also a pytest plugin which includes mccabe checks
I use it in several projects
I've seen that, but at least if I can believe the documentation it can't run pylint for python 3:
Pylint isn't supported in Python 3.
Also I really dislike its approach of bundling the checkers instead of depending on them ;)
So far, pytest-{pep8,flakes,mccabe} do all I want :)
Florian
docs lie, it works for python3 :)
On Tue, Jun 2, 2015 at 10:48 AM Florian Bruhin me@the-compiler.org wrote:
- Anatoly Bubenkov bubenkoff@gmail.com [2015-06-02 08:41:12 +0000]:
there's a pylama project which is a bit buggy at error reporting, but it solves the code checks as a whole, which i appreciate
https://github.com/klen/pylama
So it general solution for code checks but it's also a pytest plugin
which
includes mccabe checks
I use it in several projects
I've seen that, but at least if I can believe the documentation it can't run pylint for python 3:
Pylint isn't supported in Python 3.
Also I really dislike its approach of bundling the checkers instead of depending on them ;)
So far, pytest-{pep8,flakes,mccabe} do all I want :)
Florian
-- http://www.the-compiler.org | me@the-compiler.org (Mail/XMPP) GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc I love long mails! | http://email.is-not-s.ms/