Skip to content

Commit 9adfc6e

Browse files
committed
Revert style changes
1 parent cc0d774 commit 9adfc6e

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

Lib/_pydatetime.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1971,9 +1971,7 @@ def fromisoformat(cls, date_string):
19711971
if error_from_tz:
19721972
raise error_from_tz
19731973
if error_from_components:
1974-
raise ValueError(
1975-
"minute, second, and microsecond must be 0 when hour is 24"
1976-
)
1974+
raise ValueError("minute, second, and microsecond must be 0 when hour is 24")
19771975

19781976
if became_next_day:
19791977
year, month, day = date_components

Lib/test/datetimetester.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3492,12 +3492,12 @@ def test_fromisoformat_fails_datetime(self):
34923492
'2009-04-19T12:30:45.123456-05:00a', # Extra text
34933493
'2009-04-19T12:30:45.123-05:00a', # Extra text
34943494
'2009-04-19T12:30:45-05:00a', # Extra text
3495-
'2009-04-19T24:00:00.000001', # Has non-zero microseconds on 24:00
3496-
'2009-04-19T24:00:01.000000', # Has non-zero seconds on 24:00
3497-
'2009-04-19T24:01:00.000000', # Has non-zero minutes on 24:00
3498-
'2009-04-32T24:00:00.000000', # Day is invalid before wrapping due to 24:00
3499-
'2009-13-01T24:00:00.000000', # Month is invalid before wrapping due to 24:00
3500-
'9999-12-31T24:00:00.000000', # Year is invalid after wrapping due to 24:00
3495+
'2009-04-19T24:00:00.000001', # Has non-zero microseconds on 24:00
3496+
'2009-04-19T24:00:01.000000', # Has non-zero seconds on 24:00
3497+
'2009-04-19T24:01:00.000000', # Has non-zero minutes on 24:00
3498+
'2009-04-32T24:00:00.000000', # Day is invalid before wrapping due to 24:00
3499+
'2009-13-01T24:00:00.000000', # Month is invalid before wrapping due to 24:00
3500+
'9999-12-31T24:00:00.000000', # Year is invalid after wrapping due to 24:00
35013501
'2009-04-19T12:30:45+00:90:00', # Time zone field out from range
35023502
'2009-04-19T12:30:45+00:00:90', # Time zone field out from range
35033503
]

0 commit comments

Comments
 (0)