Skip to content
Discussion options

You must be logged in to vote

Pyright preserves the docstring of the decorated function if it's not overloaded. It should do the same in the case that it's overloaded. That appears to be a bug. Could you please file a bug report to that effect so it is tracked? Thanks!

The diagnostic you're seeing here also appears to be a bug. The type (...) -> Any is the gradual form of a callable. It's the equivalent of Any, and it should be assignable to any callable (and vice versa), so wrapped should be assignable to the return type. Please file a separate bug for that issue. You can use a cast call or a # pyright: ignore comment to work around this issue in the meantime.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Glinte
Comment options

@Glinte
Comment options

Answer selected by Glinte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants