Sometimes a namedtuple, sometimes not #459
Unanswered
NickDarvey
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm seeing an inconsistent behaviour where sometimes when I run my script, my
typing.Tuple[]
is detected as a named tuple and others time it is not.That is, specifically, I can attach a debugger and see that this line sometimes evaluates true and sometimes false with zero changes to my script. Fun!
typeguard/src/typeguard/__init__.py
Line 494 in de6ab05
Inspecting
expected_type
when it's not working:Inspecting
expected_type
when it is working:If I do a
dir(expected_type)
the only difference is the addition of__annotations__
at position 0 in the failing case.I'm sure there's not an issue with this library (plus this is using an old release (2.13.3)) but I was wondering if this behaviour sounds at all familiar and if you have any tips for where I should investigate?
Beta Was this translation helpful? Give feedback.
All reactions