Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion mypy/fastparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,12 @@ def parse(
assert options.python_version[0] >= 3
feature_version = options.python_version[1]
try:
# Disable deprecation warnings about \u
# Disable
# - deprecation warnings about \u
# - syntax warnings for 'invalid escape sequence' (3.12+) and 'return in finally' (3.14+)
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
warnings.filterwarnings("ignore", category=SyntaxWarning)
ast = ast3_parse(source, fnam, "exec", feature_version=feature_version)

tree = ASTConverter(
Expand Down
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,6 @@ xfail_strict = true
# Force warnings as errors
filterwarnings = [
"error",
# Some testcases may contain code that emits SyntaxWarnings, and they are not yet
# handled consistently in 3.14 (PEP 765)
"default::SyntaxWarning",
]

[tool.coverage.run]
Expand Down