-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Cleaner usage of get_proper_type() #13326
Conversation
Btw I think that I checked and "optimized" completely the usage of
Plus also some important places in |
Diff from mypy_primer, showing the effect of this PR on open source code: paasta (https://github.com/yelp/paasta)
- paasta_tools/instance/kubernetes.py:643: error: List item 1 has incompatible type "Task[List[TypedDict({'name'?: str, 'type'?: str, 'replicas'?: int, 'ready_replicas'?: int, 'create_timestamp'?: int, 'git_sha'?: str, 'image_version'?: Optional[str], 'config_sha'?: str, 'pods'?: Sequence[Mapping[str, Any]]})]]"; expected "Future[Dict[str, Any]]"
+ paasta_tools/instance/kubernetes.py:643: error: List item 1 has incompatible type "Task[List[KubernetesVersionDict]]"; expected "Future[Dict[str, Any]]"
|
TBH, I am not 100% sure how to explain the change in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything in this PR looks great, I didn't check to see if there are changes elsewhere that could be made
This is a follow up for #13297
I move around some calls to
get_proper_type()
to preserve original types as much as possible (plus few related required low-risk changes). This makes error messages much more concise, before some error messages in the tests I added were truly epic:cc @JukkaL