Skip to content

Commit 2e18a62

Browse files
committed
Updated docs.
1 parent 74735b3 commit 2e18a62

File tree

9 files changed

+20
-16
lines changed

9 files changed

+20
-16
lines changed

.isort.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ known_third_party =
2222
github
2323
importlib-metadata
2424
importlib-resources
25+
packaging
2526
pandas
2627
pydash
2728
pytest

doc-source/api/dates.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@
22
:mod:`domdf_python_tools.dates`
33
=================================
44

5-
.. extras-require:: dates
6-
7-
pytz >=2019.1
8-
9-
10-
.. warning:: This module has not been fully tested. Use with caution.
11-
12-
135
.. automodule:: domdf_python_tools.dates
146
:undoc-members:
157
:exclude-members: months

doc-source/api/iterative.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
=================================
1+
====================================
22
:mod:`domdf_python_tools.iterative`
3-
=================================
3+
====================================
44

55
.. automodule:: domdf_python_tools.iterative

doc-source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
'sphinx': ('https://www.sphinx-doc.org/en/stable/', None),
7272
'pandas': ('https://pandas.pydata.org/docs/', None),
7373
'consolekit': ('https://consolekit.readthedocs.io/en/latest/', None),
74+
'pytest': ('https://docs.pytest.org/en/stable', None),
7475
}
7576

7677
html_theme = 'domdf_sphinx_theme'

domdf_python_tools/dates.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
# dates.py
44
"""
55
Utilities for working with dates and times.
6+
7+
.. extras-require:: dates
8+
9+
pytz >=2019.1
10+
11+
12+
.. warning:: This module has not been fully tested. Use with caution.
13+
614
"""
715
#
816
# Copyright © 2020 Dominic Davis-Foster <[email protected]>
@@ -83,7 +91,7 @@ def get_utc_offset(
8391

8492
def get_timezone(tz: str, date: Optional[datetime.datetime] = None) -> Optional[datetime.tzinfo]:
8593
"""
86-
Returns a localized :class:`pytz.timezone` object for the given date.
94+
Returns a localized ``pytz.timezone`` object for the given date.
8795
If ``date`` is :py:obj:`None` then the current date is used.
8896
8997
:param tz: A string representing a pytz timezone
@@ -109,7 +117,7 @@ def get_timezone(tz: str, date: Optional[datetime.datetime] = None) -> Optional[
109117
Some functions in 'domdf_python_tools.dates' require pytz (https://pypi.org/project/pytz/), \
110118
but it could not be imported.
111119
112-
The error was {e}.
120+
The error was: {e}.
113121
""",
114122
)
115123

domdf_python_tools/testing.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
:__pkginfo__:
99
1010
.. versionadded:: 0.4.9
11-
1211
"""
1312
#
1413
# Copyright © 2020 Dominic Davis-Foster <[email protected]>
@@ -46,7 +45,7 @@
4645
# this package
4746
from domdf_python_tools.doctools import PYPY
4847
from domdf_python_tools.paths import PathPlus
49-
from domdf_python_tools.utils import Len
48+
from domdf_python_tools.iterative import Len
5049
from domdf_python_tools.versions import Version
5150

5251
__all__ = [
@@ -66,6 +65,8 @@
6665
"pytest_report_header",
6766
]
6867

68+
MarkDecorator.__module__ = "_pytest.mark"
69+
6970

7071
def generate_truthy_values(extra_truthy: Sequence = (), ratio: float = 1) -> Iterator[Any]:
7172
"""

domdf_python_tools/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,13 @@
7878
import difflib
7979
import functools
8080
import inspect
81-
import itertools
8281
import sys
8382
import textwrap
8483
import typing
8584
import warnings
8685
from datetime import date
8786
from pprint import pformat
88-
from typing import Any, Callable, Dict, Generator, Iterable, List, Optional, Sequence, Tuple, Union
87+
from typing import Any, Callable, Dict, Iterable, List, Optional, Sequence, Tuple, Union
8988

9089
# 3rd party
9190
import deprecation # type: ignore

repo_helper.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ tox_testenv_extras: all
6060
intersphinx_mapping:
6161
- "'pandas': ('https://pandas.pydata.org/docs/', None)"
6262
- "'consolekit': ('https://consolekit.readthedocs.io/en/latest/', None)"
63+
- "'pytest': ('https://docs.pytest.org/en/stable', None)"
6364

6465
mypy_deps:
6566
- pprint36

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ colorama>=0.4.3
22
deprecation>=2.1.0
33
importlib_metadata>=1.5.0; python_version < "3.8"
44
importlib_resources>=3.0.0; python_version < "3.7"
5+
packaging>=20.4
56
pydash>=4.7.4
67
typing_extensions>=3.7.4.3

0 commit comments

Comments
 (0)