-
Notifications
You must be signed in to change notification settings - Fork 115
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
Explicit 'comparison' with mypy #50
Comments
What do I say besides the fact that typeguard works at run time and mypy is a static analyzer? I'm not sure I'm qualified to do an in-depth comparison. |
This should be a good starting point. It can be extended by an example
where mypy can't find detect sth when typeguard can.
…On Wed, Oct 17, 2018, 9:22 PM Alex Grönholm ***@***.***> wrote:
What do I say besides the fact that typeguard works at run time and mypy
is a static analyzer? I'm not sure I'm qualified to do an in-depth
comparison.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#50 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJi7CkgVy3UdU7ZpLN5443tdlIcCb-kKks5ul4NugaJpZM4Xk_0j>
.
|
One other reason I tried and stuck with typeguard instead of mypy or pydantic is that it is 1/100th the size! From a cursory view it looks like this is a pure Python lib and the others need lots of stuff built with a compiler. I haven't looked deep to see if that is true however. Great library by the way—I looked high and low for a function like |
Thanks. Typeguard has a long way to go though, and has a tiny fraction of the mindshare that the static checkers have. |
Maybe a blurb in the docs could help. It can always grow in the future if needed. |
Can it not make sense to use both |
Yes, that is how the majority of the users (as I understand) use typeguard. Typeguard is an additional layer of safeguards. |
Cool, but then why do I get an error like this when trying to
|
Currently typeguard itself does not pass mypy checks (due to a number of workarounds) so it does not expose its type information to mypy, hence the error. This is something I want to solve, possibly in the next major release, if it's doable. In the meantime, I suggest you have mypy ignore these errors (a lot of libraries don't have type information available). |
As of v3.0.0, typeguard now passes mypy checks in strict mode. It also now contains |
Hey,
It might be good to put a
typeguard vs mypy
in readme. I know those are different projects (runtime vs static) but that was my first question to a friend who linked it, so I guess other ppl might ask it too :P.The text was updated successfully, but these errors were encountered: