Skip to content

Commit

Permalink
Additional coverage pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
Zac-HD committed Nov 27, 2023
1 parent 8a67dc7 commit f032d00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions hypothesis-python/.coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ exclude_lines =
if TYPE_CHECKING:
if sys\.version_info
if "[\w\.]+" in sys\.modules:
if .+ := sys\.modules\.get\("[\w\.]+"\)
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def is_annotated_type(thing):


def get_constraints_filter_map():
if at := sys.modules.get("annotated_types"): # pragma: no branch
if at := sys.modules.get("annotated_types"):
return {
# Due to the order of operator.gt/ge/lt/le arguments, order is inversed:
at.Gt: lambda constraint: partial(operator.lt, constraint.gt),
Expand All @@ -290,7 +290,7 @@ def get_constraints_filter_map():


def _get_constraints(args: Tuple[Any, ...]) -> Iterator["at.BaseMetadata"]:
if at := sys.modules.get("annotated_types"): # pragma: no branch
if at := sys.modules.get("annotated_types"):
for arg in args:
if isinstance(arg, at.BaseMetadata):
yield arg
Expand Down

0 comments on commit f032d00

Please sign in to comment.