Skip to content

Commit c928847

Browse files
[nit] clarify comment about deprecation warnings about \u (python#20026)
This is the same as 'invalid escape sequence', just a different type of warning on lower Python versions. Chases python#20023. More background information is available in python#19606, although that's probably not very helpful all told.
1 parent d51fa00 commit c928847

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/fastparse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ def parse(
233233
feature_version = options.python_version[1]
234234
try:
235235
# Disable
236-
# - deprecation warnings about \u
237-
# - syntax warnings for 'invalid escape sequence' (3.12+) and 'return in finally' (3.14+)
236+
# - deprecation warnings for 'invalid escape sequence' (Python 3.11 and below)
237+
# - syntax warnings for 'invalid escape sequence' (3.12+) and 'return in finally' (3.14+)
238238
with warnings.catch_warnings():
239239
warnings.filterwarnings("ignore", category=DeprecationWarning)
240240
warnings.filterwarnings("ignore", category=SyntaxWarning)

0 commit comments

Comments
 (0)