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

Open
matthiaskramm opened this Issue Apr 12, 2016 · 5 comments

Comments

Projects
None yet
6 participants
@matthiaskramm
Contributor

matthiaskramm commented Apr 12, 2016

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

This comment has been minimized.

Show comment
Hide comment
@gvanrossum

gvanrossum Apr 12, 2016

Member
Member

gvanrossum commented Apr 12, 2016

@prechelt

This comment has been minimized.

Show comment
Hide comment
@prechelt

prechelt Apr 12, 2016

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

prechelt commented Apr 12, 2016

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

This comment has been minimized.

Show comment
Hide comment
@markshannon

markshannon 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 :)

Cheers,
Mark

markshannon 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 :)

Cheers,
Mark

@o11c

This comment has been minimized.

Show comment
Hide comment
@o11c

o11c Apr 12, 2016

Contributor

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']).

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

This comment has been minimized.

Show comment
Hide comment
@ilevkivskyi

ilevkivskyi Apr 12, 2016

Collaborator

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

Collaborator

ilevkivskyi commented Apr 12, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment