New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Annotate run
function
#1421
Annotate run
function
#1421
Conversation
hey @Kludex |
@euri10 autocomplete and docstring basically Screencast.from.27-03-2022.20_12_36.mp4 |
) -> None: | ||
"""Run uvicorn via Python code. | ||
|
||
Args: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the docstring necessary here or the type hints are enough to get the completion ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annotation is enough for that, the docstring are a plus
ok no comments appart the one above, this does not make the autocomplete work on pycharm though |
If it doesn't, then it's not a valid solution :/ |
ok let's close this #1423 is working as intended |
The way I see it, we have two options here:
kwargs
, and add them to the config manually.This PR is to improve the UX, as many users use
uvicorn.run
(me included).This PR actually ignores the following mypy error:
uvicorn/main.py:445: error: Single overload definition, multiple required [misc]
Which means the ideal solution would be
2
. So, any solution satisfies me, I'll let the reviewer decide the path to go here.