Skip to content

Commit f3b4d40

Browse files
committed
Make methods in times available at the top level of human_readable
This is a fix for #526. This makes methods in times available at the top level of human_readable. Until now, `date_time` and `precise_delta` were imported, but the following methods were not available -- contrary to the content of the documentation. - time_delta - time_of_day - timing - year - day - date This PR makes these methods available at the top level of human_readable. It's just adding them to `__all__` in `human_readable/__init__.py`. # result ```python >>> import human_readable >>> human_readable.time_delta <function time_delta at 0x1007bf420> >>> ```
1 parent b2a206b commit f3b4d40

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/human_readable/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,22 @@
99
from human_readable.numbers import int_word
1010
from human_readable.numbers import ordinal
1111
from human_readable.numbers import scientific_notation
12+
from human_readable.times import date
1213
from human_readable.times import date_time
14+
from human_readable.times import day
1315
from human_readable.times import precise_delta
16+
from human_readable.times import time_delta
17+
from human_readable.times import time_of_day
18+
from human_readable.times import timing
19+
from human_readable.times import year
1420

1521

1622
__all__ = [
1723
"activate",
1824
"ap_number",
25+
"date",
1926
"date_time",
27+
"day",
2028
"deactivate",
2129
"file_size",
2230
"fractional",
@@ -26,4 +34,8 @@
2634
"ordinal",
2735
"precise_delta",
2836
"scientific_notation",
37+
"time_delta",
38+
"time_of_day",
39+
"timing",
40+
"year",
2941
]

0 commit comments

Comments
 (0)