Skip to content

Commit

Permalink
Improved compatibility with py3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
squillero committed Aug 23, 2023
1 parent af0ea59 commit 47e0b5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion byron/user_messages/checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def check_value_range(val: Number, min_: Optional[Number] = None, max_: Optional
return True


def check_valid_length(obj: Collection, min_length: int | None = None, max_length: int | None = None) -> bool:
def check_valid_length(obj: Collection, min_length: Optional[int] = None, max_length: Optional[int] = None) -> bool:
"""Checks that `len(obj)` is in the half-open range [min_, max_)."""
if min_length is not None and len(obj) < min_length:
logger.error("ValueError: incorrect length: len(%s) < %s", repr(obj), repr(min_length))
Expand Down

0 comments on commit 47e0b5a

Please sign in to comment.