Skip to content

Commit

Permalink
style corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
rick committed Apr 14, 2024
1 parent 632c80c commit a7d894d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dfdatetime/time_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,7 @@ def __init__(
value is out of bounds.
"""
if fraction_of_second is not None:
if fraction_of_second < 0.00 or fraction_of_second >= 1.00:
if fraction_of_second < 0.0 or fraction_of_second >= 1.0:
raise ValueError(
f'Fraction of second value: {fraction_of_second:f} out of bounds.')

Expand Down
6 changes: 3 additions & 3 deletions tests/time_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -1627,9 +1627,9 @@ def testInitialize(self):

expected_time_elements_tuple = (2010, 8, 12, 20, 6, 31)
time_elements_object = time_elements.TimeElementsWithFractionOfSecond(
fraction_of_second=decimal.Decimal(0.8742),
precision=definitions.PRECISION_100_MICROSECONDS,
time_elements_tuple=(2010, 8, 12, 20, 6, 31))
fraction_of_second=decimal.Decimal(0.8742),
precision=definitions.PRECISION_100_MICROSECONDS,
time_elements_tuple=(2010, 8, 12, 20, 6, 31))
self.assertIsNotNone(time_elements_object)
self.assertEqual(
time_elements_object._time_elements_tuple, expected_time_elements_tuple)
Expand Down

0 comments on commit a7d894d

Please sign in to comment.