Skip to content

Commit

Permalink
!squash fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Jul 31, 2022
1 parent 1443421 commit 4454052
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libvcs/_internal/query_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def lookup_iexact(

def lookup_contains(
data: Union[str, list[str], Mapping[str, str]],
rhs: Union[str, list[str], Mapping[str, str] | Pattern[str]],
rhs: Union[str, list[str], Mapping[str, str], Pattern[str]],
) -> bool:
if not isinstance(rhs, str) or not isinstance(data, (str, Mapping, list)):
return False
Expand Down Expand Up @@ -159,7 +159,7 @@ def lookup_iendswith(

def lookup_in(
data: Union[str, list[str], Mapping[str, str]],
rhs: Union[str, list[str], Mapping[str, str] | Pattern[str]],
rhs: Union[str, list[str], Mapping[str, str], Pattern[str]],
) -> bool:
if isinstance(rhs, list):
return data in rhs
Expand All @@ -181,7 +181,7 @@ def lookup_in(

def lookup_nin(
data: Union[str, list[str], Mapping[str, str]],
rhs: Union[str, list[str], Mapping[str, str] | Pattern[str]],
rhs: Union[str, list[str], Mapping[str, str], Pattern[str]],
) -> bool:
if isinstance(rhs, list):
return data not in rhs
Expand All @@ -203,7 +203,7 @@ def lookup_nin(

def lookup_regex(
data: Union[str, list[str], Mapping[str, str]],
rhs: Union[str, list[str], Mapping[str, str] | Pattern[str]],
rhs: Union[str, list[str], Mapping[str, str], Pattern[str]],
) -> bool:
if isinstance(data, (str, bytes, re.Pattern)) and isinstance(rhs, (str, bytes)):
return bool(re.search(rhs, data))
Expand All @@ -212,7 +212,7 @@ def lookup_regex(

def lookup_iregex(
data: Union[str, list[str], Mapping[str, str]],
rhs: Union[str, list[str], Mapping[str, str] | Pattern[str]],
rhs: Union[str, list[str], Mapping[str, str], Pattern[str]],
) -> bool:
if isinstance(data, (str, bytes, re.Pattern)) and isinstance(rhs, (str, bytes)):
return bool(re.search(rhs, data, re.IGNORECASE))
Expand Down

0 comments on commit 4454052

Please sign in to comment.