File tree Expand file tree Collapse file tree 2 files changed +1
-13
lines changed
Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Original file line number Diff line number Diff line change @@ -238,11 +238,7 @@ def in_minutes(self) -> int:
238238 def in_seconds (self ) -> int :
239239 return int (self .total_seconds ())
240240
241- def in_words (
242- self ,
243- locale : str | None = None ,
244- separator : str = " " ,
245- ) -> str :
241+ def in_words (self , locale : str | None = None , separator : str = " " ) -> str :
246242 """
247243 Get the current interval in words in the current locale.
248244
@@ -277,10 +273,8 @@ def in_words(
277273
278274 if not parts :
279275 count : int | str = 0
280- unit : str
281276 if self .microseconds != 0 :
282277 unit = f"units.second.{ loaded_locale .plural (0 )} "
283- microseconds = abs (self .microseconds ) / 1e6
284278 count = f"{ abs (self .microseconds ) / 1e6 :.2f} "
285279 else :
286280 unit = f"units.microsecond.{ loaded_locale .plural (0 )} "
Original file line number Diff line number Diff line change @@ -65,12 +65,6 @@ def test_subseconds():
6565 assert pi .in_words () == "0.12 seconds"
6666
6767
68- def test_subseconds_with_n_digits ():
69- pi = pendulum .duration (microseconds = 123456 )
70-
71- assert pi .in_words (seconds_n_decimal = 3 ) == "0.123 seconds"
72-
73-
7468def test_subseconds_with_seconds ():
7569 pi = pendulum .duration (seconds = 12 , microseconds = 123456 )
7670 assert pi .in_words () == "12 seconds"
You can’t perform that action at this time.
0 commit comments