Context manager types #948
Replies: 2 comments
-
I believe pyrefly is correct here; I can construct an example where, at runtime, the context manager's Mypy does't appear to do any check at all on the type signature of |
Beta Was this translation helpful? Give feedback.
-
Thanks! fixed this one in django-types. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This is another case from django-types, where I'm not sure this is error, or I should fix my types.
https://pyrefly.org/sandbox/?code=GYJw9gtgBALgngBwKYGcoEsILCGUAqIAhgMZIBGpA1vokgFCiSyLoB2A5hljngIJs49YSQA2RFGnyoYAYTBsYSAB4wAskTZEOSEAAoAlAC56UM1AAmSYFAD6tpIt329KJKOAGoAWgB8UATgoAB8oADkFJCMoADo403MrG3sVdBgXBPNzNw8AGkysqBUSW3hkaLKkAG0AUWUyBBh0BQBdEPDI-MLzYtsANyJRAFcoqDqGpoV2iLYkLu7YYjJKEipowlIKalpkac6Crz8O2ei4mOF6AHc0gAsCGXknVQ0tHX1jArOgA&version=3.12
Technically, pyrefly is correct here. But, other type-checkers don't mind.
I think we should just update our django-types, to be more correct, and also use
BaseException
there.Beta Was this translation helpful? Give feedback.
All reactions