Skip to content

Commit

Permalink
Cleanup unused regex patterns (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
tselepakis authored Feb 9, 2024
1 parent c2eea36 commit cb0b7cf
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions multipart/multipart.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from .exceptions import *

import os
import re
import sys
import shutil
import logging
Expand Down Expand Up @@ -67,16 +66,6 @@
ord_char = lambda c: c
join_bytes = lambda b: bytes(list(b))

# These are regexes for parsing header values.
SPECIAL_CHARS = re.escape(b'()<>@,;:\\"/[]?={} \t')
QUOTED_STR = br'"(?:\\.|[^"])*"'
VALUE_STR = br'(?:[^' + SPECIAL_CHARS + br']+|' + QUOTED_STR + br')'
OPTION_RE_STR = (
br'(?:;|^)\s*([^' + SPECIAL_CHARS + br']+)\s*=\s*(' + VALUE_STR + br')'
)
OPTION_RE = re.compile(OPTION_RE_STR)
QUOTE = b'"'[0]


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

0 comments on commit cb0b7cf

Please sign in to comment.