Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which static analysis tools use PEP 484 yet? #200

Closed
matthiaskramm opened this issue Apr 12, 2016 · 6 comments
Closed

Which static analysis tools use PEP 484 yet? #200

matthiaskramm opened this issue Apr 12, 2016 · 6 comments

Comments

@matthiaskramm
Copy link
Contributor

I know of:

  • pylint, which has plans to support PEP 484
  • mypy, which can type check PEP 484 programs, and uses PEP 484 on its own code
  • pytype, which can type check PEP 484 programs, and generate PEP 484 annotations

Which other static analysis tools have picked up PEP 484, and/or can do useful checking of (or anything else, with) annotated Python source?

@gvanrossum
Copy link
Member

gvanrossum commented Apr 12, 2016 via email

@prechelt
Copy link

Don't ignore dynamic checking, which may help where static checking does not reach:

https://pypi.python.org/pypi/typecheck-decorator

Nice for instance for incremental sense-making when maintaining somebody else's code:

find out something, annotate it, run tests, and see whether it is indeed usually true.

Lutz

@markshannon
Copy link
Member

How about the best dynamic checker of them all, Python itself?
100% accuracy in determining runtime type errors, with no annotations
required whatsoever :)

Cheers,
Mark

@o11c
Copy link
Contributor

o11c commented Apr 12, 2016

How about the best dynamic checker of them all, Python itself? 100% accuracy in determining runtime type errors, with no annotations required whatsoever :)

There are plenty of cases where Python will silently Do The Wrong Thing due to type errors.

One of the simple examples is if you end up calling iter('foo') rather than iter(['foo']).

@ilevkivskyi
Copy link
Member

Since someone already mentioned this, I could add another runtime type checking tool that I have seen: https://github.com/agronholm/typeguard

@JelleZijlstra
Copy link
Member

Closing as this is no longer relevant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants