Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duration filters #2682

Merged
merged 11 commits into from
Oct 29, 2018
Prev Previous commit
Next Next commit
Satisfy codacy-bot.
Apparently codacy prefers succinctness to symmetry, so
remove a lambda that really doesn't need to be a lambda
in order to remove the automated review flag.
  • Loading branch information
Tim Whitcomb committed Oct 25, 2018
commit f026466d9d251978d18a52801f9d7ff2fd401c21
2 changes: 1 addition & 1 deletion lib/Jinja2Filters/duration_as.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
SECONDS_PER_WEEK = SECONDS_PER_DAY * DAYS_PER_WEEK

CONVERSIONS = {
('s', 'seconds'): lambda s: float(s),
('s', 'seconds'): float,
('m', 'minutes'): lambda s: float(s) / SECONDS_PER_MINUTE,
('h', 'hours'): lambda s: float(s) / SECONDS_PER_HOUR,
('d', 'days'): lambda s: float(s) / SECONDS_PER_DAY,
Expand Down