-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Update pyvmomi to address #8082 and use Incomplete
type instead of Any
#8469
Conversation
I haven't lookup at the pytype error, but LGTM apart from that. |
This comment has been minimized.
This comment has been minimized.
I'm not honestly sure what's happening in
I don't see a duplicate in this, but I'm not clear on the purpose of this test to really investigate it |
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.
Nit: for unknown argument annotations , we generally prefer just to leave them unannotated rather than annotating them with Incomplete
or Any
. It has slightly different semantics for some type checkers, such as pyright.
I'm also not quite sure what the pytype error is trying to tell us. @rchen152, could you possibly take a look? :) |
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Thanks for the clarification. As I understand it so far from other feedback, Where any object can be used due to not being used,
|
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Your understanding is mostly correct. There are two ways to look at this. From a type checker's point of view:
And from a typeshed maintainer's or contributor's point of view:
I agree that this should be documented better, probably 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.
LGTM
Off topic, but a few more examples for
def squeakable(it: object) -> bool:
if not isinstance(o, Parrot):
return False
return it.squeak() |
I have a fix for the pytype issue out for review. If all goes well, I should be able to release a new version of pytype with the fix on Wednesday or Thursday. |
…check. This fixes a pytype test failure in python/typeshed#8469. PiperOrigin-RevId: 464935418
Picks up a fix for the pytype test failure in #8469.
Picks up a fix for the pytype test failure in #8469.
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
`Any` doesn't mean what it's being used here to indicate. Please see: python/typeshed#8469 (comment) For an explanation of what `Any` means to a type checker. This replaces the use of `Any` with `object`, which is the actual "any object" behavior that was intended.
fix: #8082 RE: inherit from
Exception
Use
Incomplete
instead ofAny
where# incomplete
comments were in place.