Skip to content

Typehints in docstrings #2988

@ilya-nikolaev

Description

@ilya-nikolaev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions