Skip to content

Commit cf7fc70

Browse files
committed
Apply suggestion from review
1 parent 0992d8c commit cf7fc70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pendulum/parsing/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,11 @@ def _parse_iso8601_interval(text: str) -> _Interval:
214214
first, last = text.split("/")
215215
start = end = duration = None
216216

217-
if first[0:1] == "P":
217+
if first[:1] == "P":
218218
# duration/end
219219
duration = parse_iso8601(first)
220220
end = parse_iso8601(last)
221-
elif last[0:1] == "P":
221+
elif last[:1] == "P":
222222
# start/duration
223223
start = parse_iso8601(first)
224224
duration = parse_iso8601(last)

0 commit comments

Comments
 (0)