Skip to content

Commit

Permalink
adjust for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
bckohan committed Jan 21, 2025
1 parent 6573caa commit c16ea21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_typer/completers.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def _get_time_bounds(self, incomplete: str) -> t.Tuple[time, time]:
:return: A 2-tuple of (lower, upper) time object boundaries.
"""
time_parts = incomplete.split(":")
if len(time_parts) > 0:
if time_parts and time_parts[0]:
hours_low = int(time_parts[0] + "0" * (2 - len(time_parts[0])))
hours_high = min(int(time_parts[0] + "9" * (2 - len(time_parts[0]))), 23)
minutes_low = 0
Expand Down

0 comments on commit c16ea21

Please sign in to comment.