Skip to content

Support deprecated decorator #8

Closed
@troopa81

Description

@troopa81

According to quite recent PEP 702 targeted for python version 3.13,
it will be possible to add deprecated decorator to functions and
classes so they could be identified statically by linter.

For now, thanks to the Deprecated annotation, SIP is able to flag a
method/class deprecated and will display a message whenever the
class/method is called at runtime.

But, it would be a nice improvment to detect them statically.

I think that one way to do it would be to add the decorator in SIP
generated pyi files. I have tested it with pyright and it works.

Could this be implemented ?

And could it be possible to add a specific message to the Deprecated
annotation, like "This method X() is deprecated, use Y() instead"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions