Skip to content

[refactor] Remove code that "disables deprecation warnings about \u" #19606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
Loading