Skip to content

Commit cb0b7cf

Browse files
authored
Cleanup unused regex patterns (#82)
1 parent c2eea36 commit cb0b7cf

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

multipart/multipart.py

-11
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from .exceptions import *
33

44
import os
5-
import re
65
import sys
76
import shutil
87
import logging
@@ -67,16 +66,6 @@
6766
ord_char = lambda c: c
6867
join_bytes = lambda b: bytes(list(b))
6968

70-
# These are regexes for parsing header values.
71-
SPECIAL_CHARS = re.escape(b'()<>@,;:\\"/[]?={} \t')
72-
QUOTED_STR = br'"(?:\\.|[^"])*"'
73-
VALUE_STR = br'(?:[^' + SPECIAL_CHARS + br']+|' + QUOTED_STR + br')'
74-
OPTION_RE_STR = (
75-
br'(?:;|^)\s*([^' + SPECIAL_CHARS + br']+)\s*=\s*(' + VALUE_STR + br')'
76-
)
77-
OPTION_RE = re.compile(OPTION_RE_STR)
78-
QUOTE = b'"'[0]
79-
8069

8170
def parse_options_header(value: Union[str, bytes]) -> Tuple[bytes, Dict[bytes, bytes]]:
8271
"""

0 commit comments

Comments
 (0)