-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
A recent change in uuid.pyi results in a regression when accessing the int attribute of the UUID class. See this pyright bug for details.
At runtime, it is an error to have a __slots__ entry share the same name as a class variable. The UUID class definition violates this invariant.
To fix this, I think the UUID class definition should be modified in one of two ways:
- Remove the
intfrom the slots definition, reverting the recent change - Remove the
intproperty and add aself.int: builtins.intinstance variable annotation within the__init__method
Option 2 is probably better since it more accurately models the runtime.
Metadata
Metadata
Assignees
Labels
No labels