Skip to content

Commit

Permalink
Removed Regex-types
Browse files Browse the repository at this point in the history
  • Loading branch information
jocke-l committed Oct 10, 2020
1 parent 3848e36 commit 4ded5f7
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions respx/models.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import inspect
import re
from functools import partial
from typing import (
TYPE_CHECKING,
Any,
Expand Down Expand Up @@ -65,16 +64,12 @@

DefaultType = TypeVar("DefaultType", bound=Any)

Regex = type(re.compile(""))
Kwargs = Dict[str, Any]
URLPatternTypes = Union[str, Pattern[str], URL, httpx.URL]
JSONTypes = Union[str, List, Dict]
ContentDataTypes = Union[bytes, str, JSONTypes, Callable, Exception]
QueryParamTypes = Union[bytes, str, List[Tuple[str, Any]], Dict[str, Any]]

istype = lambda t, o: isinstance(o, t)
isregex = partial(istype, Regex)


def build_url(
url: URLPatternTypes, *, base: str = "", params: Optional[QueryParamTypes] = None
Expand Down

0 comments on commit 4ded5f7

Please sign in to comment.