Skip to content

typing: preserve functional decorator signatures - #335

Open
BobTheBuidler wants to merge 1 commit into
ethereum:mainfrom
BobTheBuidler:type-hints/functional-decorator-inference
Open

typing: preserve functional decorator signatures#335
BobTheBuidler wants to merge 1 commit into
ethereum:mainfrom
BobTheBuidler:type-hints/functional-decorator-inference

Conversation

@BobTheBuidler

@BobTheBuidler BobTheBuidler commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Preserve decorated callable signatures for functional return-value helpers.

What was wrong?

Return-value decorators refined return types but erased wrapped function argument signatures for type checkers.

Related to Issue #
Closes #

How was it fixed?

Updated the functional decorators to use ParamSpec, preserving callable parameters while refining return types. Wrapper metadata is still preserved with functools.wraps, and mypy coverage verifies the improved inference.

Todo:

Cute Animal Picture

Cute rabbit

Use ParamSpec so return-value decorators keep wrapped callable arguments while refining return types for downstream type checkers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants