-
Notifications
You must be signed in to change notification settings - Fork 289
Closed
Labels
Description
For instance,
class WorkingSet:
def require(self, *requirements: _NestedStr) -> Sequence[Distribution]: ...
working_set: WorkingSet
require = working_set.require
This is something mypy supports and has come up a couple times in typeshed, since it reduces redundancy / allows changes to be made in only one place. e.g. python/typeshed#4817, https://github.com/python/typeshed/blob/ac234f25927634e06d9c96df98d72d54dd80dfc4/stdlib/2and3/turtle.pyi#L284-L291 and python/typeshed#4282 (comment)