Skip to content
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

Typehints in docstrings #2988

Open
1 task
ilya-nikolaev opened this issue Jul 19, 2024 · 0 comments
Open
1 task

Typehints in docstrings #2988

ilya-nikolaev opened this issue Jul 19, 2024 · 0 comments
Labels

Comments

@ilya-nikolaev
Copy link
Contributor

Link to code

https://github.com/sanic-org/sanic/blob/main/sanic/handlers/error.py#L60

Proposal

There are incorrect type hints in the code at the link above in the docstring.

Instead of sanic.exceptions.SanicException or Exception it is necessary to specify type[BaseException], but I don't know how to do it adhering to the general style of docstrings.

Perhaps we don't need type hints in docstrings at all, as these are just duplicates.

I will be glad to have any comments, thanks in advance.

Additional context

No response

Is this a breaking change?

  • Yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant