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

View file

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