Skip to content

Commit 98b061a

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 2c5389f commit 98b061a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/humanize/time.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,16 @@ def naturaldelta(
246246
return _ngettext("1 year, %d day", "1 year, %d days", days) % days
247247

248248
if use_months and 0 < num_months < 12:
249-
years_str = _ngettext("%d year", "%d years", years).replace("%d", "%s") % intcomma(years)
249+
years_str = _ngettext("%d year", "%d years", years).replace(
250+
"%d", "%s"
251+
) % intcomma(years)
250252
months_str = _ngettext("%d month", "%d months", num_months) % num_months
251253
return f"{years_str}, {months_str}"
252254
if use_months and num_months == 12:
253255
years += 1
254-
return _ngettext("%d year", "%d years", years).replace("%d", "%s") % intcomma(years)
256+
return _ngettext("%d year", "%d years", years).replace("%d", "%s") % intcomma(
257+
years
258+
)
255259
return _ngettext("%d year", "%d years", years).replace("%d", "%s") % intcomma(years)
256260

257261

0 commit comments

Comments
 (0)