Skip to content
Permalink
Browse files
Avoid naming variable “format”
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jul 31, 2018
1 parent 9ebfc3d commit f3929848c5c79d39658d48256ec6caf4647599a6
Showing with 3 additions and 3 deletions.
  1. +3 −3 nikola/utils.py
@@ -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)

0 comments on commit f392984

Please sign in to comment.