-
Notifications
You must be signed in to change notification settings - Fork 114
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
@typechecked failed to identify correct type #296
Comments
Have you tried 3.0.0b2 or master? I don' think Typeguard supports Python 3.11 in the 2.x series, and in |
Can I upgrade the package using pip? I'm gonna try to see how I do that. |
Sorry, I should've read your issue report better (but I'm on vacation, so that's my excuse). Type checking of class members isn't supported at the moment. Are you sure you checked the existing issues? Like this one? |
oops sorry, I remember scanning through the issues but I must've missed this one. I suppose you can close this issue but may I ask why? |
Why checking of class members is not supported? One, I haven't had the time to do it, and two, doing it safely is very tricky. |
I see well good luck with that loving your module despite the support for dataclasses. And hey maybe I'll even contribute If I have the time, enjoy the rest of your holiday |
Things to check first
I have searched the existing issues and didn't find my bug already reported there
I have checked that my bug is still present in the latest release
Typeguard version
2.13.3
Python version
Python 3.11.0rc1
What happened?
What happened
relevant imports:
I had a class:
SpeciesCollection
was used in classContext
:In a different script I imported this module (which is called cat_db_mod_rewrite):
When I ran
testing.py
, it gave me the error:I expected the stack trace to be not that good so I ran this program through the pudb debugger.
I inspected the types and was confused by expected_type being GenericAlias which every time I tried to see what was in the GenericAlias, there was just another GenericAlias. I ran in the debugger shell with the types in the program:
check_type(expected_type, value, 'arg')
and there was no exception thrown (I have an image attatched).
I don't really understand how exactly this module works so I was wondering if it was a bug.
How can we reproduce the bug?
I made a small script that reproduces the behaviour I saw:
The text was updated successfully, but these errors were encountered: