[pytest-dev] Optional static typing plugin?

Alessandro Amici alexamici at gmail.com
Thu Apr 21 03:48:15 EDT 2016


Florian,

On Thu, 21 Apr 2016 at 09:09 Florian Bruhin <me at the-compiler.org> wrote:

>
> > In anybody else interested?
>
> I stopped using pytest-{flakes,pep8,pep257,mccabe} myself and switched
> back to flake8 again, as it's more powerful/configurable.
>
> So personally I'd prefer a flake8-mypy or running it directly.
>

I see the point, but I consider pyflakes and mypy more in the "code
correctness" league than the others, that really focus on long term
maintainability, so I'd like to have mypy errors handled the same way as
test failures.

Doing a new plugin myself is not out of question, but not in the very short
term. But if anybody else takes the leadership I'm willing to collaborate.

What I'd really like though is something validating types dynamically
> at *runtime* while running the testsuite. It'd be a much more thorough
> check of the types (assuming a good testsuite) and while slow, you
> could only run it selectively.
>
> There's [3]/[4] but that only runs on explicitly decorated functions.
>
> [1] https://github.com/fschulze/pytest-flakes
> [2] https://github.com/The-Compiler/pytest-mccabe
> [3] https://pypi.python.org/pypi/typecheck-decorator
> [4] https://github.com/agronholm/typeguard


I'll have a look as well, thanks!

Alessandro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20160421/8557f7f2/attachment-0001.html>


More information about the pytest-dev mailing list