Skip to content

Commit fad389e

Browse files
authored
Apply suggestions from my code review
Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent 4656c6f commit fad389e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/tomllib/_parser.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
match_to_number,
1818
)
1919

20+
if sys.version_info < (3, 15):
21+
from types import MappingProxyType as frozendict
22+
2023
TYPE_CHECKING = False
2124
if TYPE_CHECKING:
2225
from collections.abc import Iterable
@@ -44,7 +47,7 @@
4447
KEY_INITIAL_CHARS: Final = BARE_KEY_CHARS | frozenset("\"'")
4548
HEXDIGIT_CHARS: Final = frozenset("abcdef" "ABCDEF" "0123456789")
4649

47-
BASIC_STR_ESCAPE_REPLACEMENTS: Final = frozendict( # type: ignore[name-defined]
50+
BASIC_STR_ESCAPE_REPLACEMENTS: Final = frozendict(
4851
{
4952
"\\b": "\u0008", # backspace
5053
"\\t": "\u0009", # tab

0 commit comments

Comments
 (0)