Skip to content

Method parameter types using CLI #8938

Answered by erictraut
andreinaku asked this question in Q&A
Discussion options

You must be logged in to vote

No, there's no option like that. Adding Any parameter annotations is not recommended in this case. It obscures the fact that the parameter is missing type information and leads to a false sense of type safety for users of the stub. It is recommended that stubs that are missing type information simply omit the corresponding annotation. When such a stub is used in pyright, these missing annotations will be translated to an Unknown type rather than Any, and this will tell users that they are at risk because of missing type information.

is there also any way for the CLI to output inferred types within method/function bodies

Symbols defined within a function body (local variables) are never …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by andreinaku
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