Skip to content

Commit

Permalink
Reduce import time by removing string import
Browse files Browse the repository at this point in the history
  • Loading branch information
hukkin committed Jan 9, 2025
1 parent 21b8be3 commit fff7f6f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tomli_w/_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
from collections.abc import Generator, Mapping
from datetime import date, datetime, time
from decimal import Decimal
import string
from types import MappingProxyType
from typing import IO, Any, NamedTuple

ASCII_CTRL = frozenset(chr(i) for i in range(32)) | frozenset(chr(127))
ILLEGAL_BASIC_STR_CHARS = frozenset('"\\') | ASCII_CTRL - frozenset("\t")
BARE_KEY_CHARS = frozenset(string.ascii_letters + string.digits + "-_")
BARE_KEY_CHARS = frozenset(
"abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "0123456789" "-_"
)
ARRAY_TYPES = (list, tuple)
MAX_LINE_LENGTH = 100

Expand Down

0 comments on commit fff7f6f

Please sign in to comment.