Skip to content
Draft
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
7 changes: 1 addition & 6 deletions mypy/fastparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import re
import sys
import warnings
from collections.abc import Sequence
from typing import Any, Callable, Final, Literal, Optional, TypeVar, Union, cast, overload

Expand Down Expand Up @@ -227,11 +226,7 @@ def parse(
assert options.python_version[0] >= 3
feature_version = options.python_version[1]
try:
# Disable deprecation warnings about \u
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
ast = ast3_parse(source, fnam, "exec", feature_version=feature_version)

ast = ast3_parse(source, fnam, "exec", feature_version=feature_version)
tree = ASTConverter(
options=options,
is_stub=is_stub_file,
Expand Down
3 changes: 1 addition & 2 deletions mypy/test/testparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

from pytest import skip

from mypy import defaults
from mypy.config_parser import parse_mypy_comments
from mypy.errors import CompileError, Errors
from mypy.options import Options
Expand Down Expand Up @@ -47,7 +46,7 @@ def test_parser(testcase: DataDrivenTestCase) -> None:
elif testcase.file.endswith("python313.test"):
options.python_version = (3, 13)
else:
options.python_version = defaults.PYTHON3_VERSION
options.python_version = sys.version_info[:2]

source = "\n".join(testcase.input)

Expand Down
Loading