-
Notifications
You must be signed in to change notification settings - Fork 19
Closed
Labels
BC breakBreaks backwards compatibility with existing integrationsBreaks backwards compatibility with existing integrationsenhancementNew feature or requestNew feature or requestpythonPull requests that update Python codePull requests that update Python code
Milestone
Description
Current problems
- Code quality tools complain about initializing
Void()as argument defaults
Do we have any other sentinel types like Void? Do we even need a generic pattern?
Can we use Literal in type unions and is in checked to avoid errors and keep code simple?
Otherwise, can we make Void a type alias of an internal class that cannot be initialized? Implement __repr__() on the metaclass to make the type look like its alias.
Otherwise, can we alias Void to be an enum member?
Can we use NewType instead of aliases? Because aliases are resolved by Sphinx and when showing types in errors.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BC breakBreaks backwards compatibility with existing integrationsBreaks backwards compatibility with existing integrationsenhancementNew feature or requestNew feature or requestpythonPull requests that update Python codePull requests that update Python code