-
-
Couldn't load subscription status.
- Fork 1.9k
Open
Description
If I write:
from decorator import FunctionMaker
fm = FunctionMaker(lambda x: x)
print(f'{fm.defaults=}')then I see
fm.defaults=None
However, the stubs show:
typeshed/stubs/decorator/decorator.pyi
Line 23 in ecd5141
| defaults: tuple[Any, ...] |
and None can't be assigned to tuple[Any, ...]
@donBarbos sorry for the ping, I just saw that you worked on these stubs a few months ago. Can you tell if it's accurate that defaults should be tuple[Any, ...] | None?
The inspect docs also note:
defaults is an n-tuple of default argument values corresponding to the last n positional parameters, or None if there are no such defaults defined
brianschubert
Metadata
Metadata
Assignees
Labels
No labels