mirror of
https://github.com/beetbox/beets.git
synced 2026-02-08 16:34:12 +01:00
gives variable the better name of ‘ordinal’
This commit is contained in:
parent
713c00aea7
commit
85adbd1383
1 changed files with 3 additions and 3 deletions
|
|
@ -553,7 +553,7 @@ class Period(object):
|
|||
"""
|
||||
if not string:
|
||||
return None
|
||||
count = 0
|
||||
ordinal = 0
|
||||
date = None
|
||||
for date_format in cls.date_formats:
|
||||
try:
|
||||
|
|
@ -561,11 +561,11 @@ class Period(object):
|
|||
break
|
||||
except ValueError:
|
||||
# Parsing failed.
|
||||
count += 1
|
||||
ordinal += 1
|
||||
if date is None:
|
||||
raise InvalidQueryArgumentTypeError(string,
|
||||
'a valid datetime string')
|
||||
precision = cls.precisions[count]
|
||||
precision = cls.precisions[ordinal]
|
||||
return cls(date, precision)
|
||||
|
||||
def open_right_endpoint(self):
|
||||
|
|
|
|||
Loading…
Reference in a new issue