Closed flaeppe closed 2 months ago
Hmm, looks like something unrelated broke sized types badly, will look at it as soon as I have some time.
but I figured using assert_type is probably preferable
Yup, it didn't exist back then, much better 👍
This is probably a good idea, although the circular dependency between the type definition and its predicate bothers me just slightly. The TypeGuard function will also be an optimization over going through the isinstance interface though, so definitely seems like net positive.
Found minimal reproduction of the test failures, it's not related so I am merging this as is. Thanks for the contribution! 🙏
I added an
assert_type
row since it seems that you are checking types withpytest-mypy-plugins
but I figured usingassert_type
is probably preferable