Fix typo in turtle deprecation warning and use warnings._deprecated (#91862)

This commit is contained in:
Hugo van Kemenade 2022-05-02 19:57:00 +03:00 committed by GitHub
parent 5f9c0f5ddf
commit 341689cb85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -2863,10 +2863,10 @@ class RawTurtle(TPen, TNavigator):
>>> turtle.stamp() >>> turtle.stamp()
>>> turtle.fd(50) >>> turtle.fd(50)
""" """
warnings.warn("turtle.RawTurtle.settiltangle() is deprecated since " warnings._deprecated("turtle.RawTurtle.settiltangle()",
"Python 3.1 and scheduled for removal in Python 3.13." "{name!r} is deprecated since Python 3.1 and scheduled "
"Use tiltangle() instead.", "for removal in Python {remove}. Use tiltangle() instead.",
DeprecationWarning) remove=(3, 13))
self.tiltangle(angle) self.tiltangle(angle)
def tiltangle(self, angle=None): def tiltangle(self, angle=None):