Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6715be7

Browse files
PEP 702: Tools may clean up the deprecation message (#3482)
Seehttps://discuss.python.org/t/pep-702-marking-deprecations-using-the-type-system/23036/53?u=jelleI don't want to prescribe the exact behavior on tools and IDEs; theycan figure out for themselves what works best. This change is intendedto make it so they can adjust the message without worrying that theyare breaking the specification.
1 parent43bdd16 commit6715be7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎peps/pep-0702.rst‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ The decorator takes the following arguments:
115115

116116
The positional-only argument is of type ``str`` and contains a message that should
117117
be shown by the type checker when it encounters a usage of the decorated object.
118+
Tools may clean up the deprecation message for display, for example
119+
by using:func:`inspect.cleandoc` or equivalent logic.
118120
The message must be a string literal.
119121
The content of deprecation messages is up to the user, but it may include the version
120122
in which the deprecated object is to be removed, and information about suggested

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp