Refs #30141 -- Removed unused branch in parse_duration().

Unused since 99fc5dc13c.
This commit is contained in:
Mariusz Felisiak 2022-01-11 11:09:08 +01:00 committed by GitHub
parent fa235004dd
commit b111b15c12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 2 deletions

View File

@ -149,8 +149,6 @@ def parse_duration(value):
sign = -1 if kw.pop('sign', '+') == '-' else 1 sign = -1 if kw.pop('sign', '+') == '-' else 1
if kw.get('microseconds'): if kw.get('microseconds'):
kw['microseconds'] = kw['microseconds'].ljust(6, '0') kw['microseconds'] = kw['microseconds'].ljust(6, '0')
if kw.get('seconds') and kw.get('microseconds') and kw['seconds'].startswith('-'):
kw['microseconds'] = '-' + kw['microseconds']
kw = {k: float(v.replace(',', '.')) for k, v in kw.items() if v is not None} kw = {k: float(v.replace(',', '.')) for k, v in kw.items() if v is not None}
days = datetime.timedelta(kw.pop('days', .0) or .0) days = datetime.timedelta(kw.pop('days', .0) or .0)
if match.re == iso8601_duration_re: if match.re == iso8601_duration_re: