PEP 702: Tools may clean up the deprecation message (#3482)
See https://discuss.python.org/t/pep-702-marking-deprecations-using-the-type-system/23036/53?u=jelle I don't want to prescribe the exact behavior on tools and IDEs; they can figure out for themselves what works best. This change is intended to make it so they can adjust the message without worrying that they are breaking the specification.
This commit is contained in:
parent
43bdd16f01
commit
6715be7d1c
|
@ -115,6 +115,8 @@ The decorator takes the following arguments:
|
|||
|
||||
The positional-only argument is of type ``str`` and contains a message that should
|
||||
be shown by the type checker when it encounters a usage of the decorated object.
|
||||
Tools may clean up the deprecation message for display, for example
|
||||
by using :func:`inspect.cleandoc` or equivalent logic.
|
||||
The message must be a string literal.
|
||||
The content of deprecation messages is up to the user, but it may include the version
|
||||
in which the deprecated object is to be removed, and information about suggested
|
||||
|
|
Loading…
Reference in New Issue