Skip to content

Commit c55d417

Browse files
chore: doc simplify
1 parent f1d67ec commit c55d417

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

cmd2/annotated.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,10 +1750,7 @@ def _resolve_parameters(
17501750
ignored = {next(iter(sig.parameters), None), "return", *skip_params}
17511751
ignored.discard(None)
17521752
relevant_annotations = {name: ann for name, ann in getattr(func, "__annotations__", {}).items() if name not in ignored}
1753-
# Forward references resolve against the *original* function's module. When func is a
1754-
# functools.wraps wrapper (e.g. a user decorator stacked under @with_annotated), wraps copies
1755-
# __annotations__ but not __globals__, so resolve against the unwrapped function's globals --
1756-
# the same module get_type_hints would find by walking a bare function's __wrapped__ chain.
1753+
# Forward references resolve against the *original* function's module during functools.wraps wrapper.
17571754
unwrapped = inspect.unwrap(func)
17581755
try:
17591756
hints = get_type_hints(

0 commit comments

Comments
 (0)