Skip to content

Commit

Permalink
Avoid naming variable “format”
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jul 31, 2018
1 parent 9ebfc3d commit f392984
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nikola/utils.py
Expand Up @@ -1221,11 +1221,11 @@ def date_formatter(match: 'typing.re.Match') -> str:
if custom_format:
return babel.dates.format_date(date, custom_format, locale)
else:
function, format = modes[mode]
function, fmt = modes[mode]
if function == 'skeleton':
return babel.dates.format_skeleton(format, date, locale=locale)
return babel.dates.format_skeleton(fmt, date, locale=locale)
else:
return babel.dates.format_date(date, format, locale)
return babel.dates.format_date(date, fmt, locale)

return re.sub(r'{(.*?)(?::(.*?))?}', date_formatter, message)

Expand Down

0 comments on commit f392984

Please sign in to comment.