Skip to content

Commit 29a9f6f

Browse files
committed
Updating docs.
1 parent d020d20 commit 29a9f6f

File tree

6 files changed

+28
-20
lines changed

6 files changed

+28
-20
lines changed

doc-source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
"sphinx.ext.autosummary",
5050
"autodocsumm",
5151
"sphinx_copybutton",
52+
"sphinxcontrib.default_values",
53+
"sphinxcontrib.toctree_plus",
5254
# "sphinx_gitstamp",
5355
]
5456

@@ -96,8 +98,6 @@
9698

9799
htmlhelp_basename = slug
98100

99-
typehints_fully_qualified = True
100-
101101
latex_documents = [('index', f'{slug}.tex', project, author, 'manual')]
102102
man_pages = [('index', slug, project, [author], 1)]
103103
texinfo_documents = [('index', slug, project, author, slug, project, 'Miscellaneous')]

doc-source/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
autodocsumm
2+
default_values>=0.0.4
23
extras_require
34
pytz>=2019.1
45
sphinx>=3.0.3
@@ -10,3 +11,4 @@ sphinx_autodoc_typehints>=1.11.0
1011
sphinx_rtd_theme<0.5
1112
sphinxcontrib-httpdomain>=1.7.0
1213
sphinxemoji>=0.1.6
14+
toctree_plus>=0.0.1

domdf_python_tools/dates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ def check_date(month: Union[str, int], day: int, leap_year: bool = True) -> bool
252252
:type month: str, int
253253
:param day: The day number to test.
254254
:type day: int
255-
:param leap_year: Whether to return :py:obj:`True` for 29th Feb. Default :py:obj:`True`.
255+
:param leap_year: Whether to return :py:obj:`True` for 29th Feb.
256256
:type leap_year: bool, optional
257257
258258
:return: :py:obj:`True` if the date is valid.

domdf_python_tools/paths.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,13 @@ def maybe_make(directory: PathLike, mode: int = 0o777, parents: bool = False, ex
137137
:param parents: If :py:obj:`False` (the default), a missing parent raises a :class:`~python:FileNotFoundError`.
138138
If :py:obj:`True`, any missing parents of this path are created as needed; they are created with the
139139
default permissions without taking mode into account (mimicking the POSIX mkdir -p command).
140+
:no-default parents:
140141
:type parents: bool, optional
141142
:param exist_ok: If :py:obj:`False` (the default), a :class:`~python:FileExistsError` is raised if the
142143
target directory already exists. If :py:obj:`True`, :class:`~python:FileExistsError` exceptions
143144
will be ignored (same behavior as the POSIX mkdir -p command), but only if the last path
144145
component is not an existing non-directory file.
146+
:no-default exist_ok:
145147
:type exist_ok: bool, optional
146148
"""
147149

@@ -194,7 +196,8 @@ def relpath(path: PathLike, relative_to: Optional[PathLike] = None) -> pathlib.P
194196
195197
:param path: Path to find the relative path for
196198
:param relative_to: The directory to find the path relative to.
197-
Defaults to the current directory
199+
Defaults to the current directory.
200+
:no-default relative_to:
198201
199202
:return:
200203
"""
@@ -312,8 +315,7 @@ def write_clean(
312315
Open the file in text mode, write to it without trailing spaces, and close the file.
313316
314317
:param string:
315-
:type string: str
316-
:param encoding: The encoding to write to the file using. Default ``"UTF-8"``.
318+
:param encoding: The encoding to write to the file using.
317319
:param errors:
318320
319321
.. versionadded:: 0.3.8
@@ -336,11 +338,13 @@ def maybe_make(
336338
:param parents: If :py:obj:`False` (the default), a missing parent raises a :class:`~python:FileNotFoundError`.
337339
If :py:obj:`True`, any missing parents of this path are created as needed; they are created with the
338340
default permissions without taking mode into account (mimicking the POSIX mkdir -p command).
341+
:no-default parents:
339342
:type parents: bool, optional
340343
:param exist_ok: If :py:obj:`False` (the default), a :class:`~python:FileExistsError` is raised if the
341344
target directory already exists. If :py:obj:`True`, :class:`~python:FileExistsError` exceptions
342345
will be ignored (same behavior as the POSIX mkdir -p command), but only if the last path
343346
component is not an existing non-directory file.
347+
:no-default exist_ok:
344348
:type exist_ok: bool, optional
345349
346350
.. versionadded:: 0.3.8
@@ -359,7 +363,7 @@ def append_text(
359363
360364
:param string:
361365
:type string: str
362-
:param encoding: The encoding to write to the file using. Default ``"UTF-8"``.
366+
:param encoding: The encoding to write to the file using.
363367
:param errors:
364368
365369
.. versionadded:: 0.3.8
@@ -379,7 +383,7 @@ def write_text(
379383
380384
:param data:
381385
:type data: str
382-
:param encoding: The encoding to write to the file using. Default ``"UTF-8"``.
386+
:param encoding: The encoding to write to the file using.
383387
:param errors:
384388
385389
.. versionadded:: 0.3.8
@@ -395,7 +399,7 @@ def read_text(
395399
"""
396400
Open the file in text mode, read it, and close the file.
397401
398-
:param encoding: The encoding to write to the file using. Default ``"UTF-8"``.
402+
:param encoding: The encoding to write to the file using.
399403
:param errors:
400404
401405
:return: The content of the file.
@@ -417,7 +421,8 @@ def open(
417421
Open the file pointed by this path and return a file object, as
418422
the built-in open() function does.
419423
420-
:param mode: The mode to open the file in. Default ``"r"`` (read only.
424+
:param mode: The mode to open the file in.
425+
:default mode: ``"r"`` (read only)
421426
:type mode: str
422427
:param buffering:
423428
:type buffering: int

domdf_python_tools/terminal.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,12 @@ def overtype(*objects, sep: str = ' ', end: str = '', file=None, flush: bool = F
119119
.. TODO:: This does not currently work in the PyCharm console, at least on Windows
120120
121121
:param objects: A list of strings or string-like objects to write to the terminal.
122-
:param sep: String to separate the objects with, by default " "
122+
:param sep: String to separate the objects with.
123123
:type sep: str
124-
:param end: String to end with, by default nothing
124+
:param end: String to end with.
125125
:type end: str
126-
:param file: An object with a ``write(string)`` method; default ``sys.stdout``
126+
:param file: An object with a ``write(string)`` method.
127+
:default file: ``sys.stdout``
127128
:type file:
128129
:param flush: If true, the stream is forcibly flushed.
129130
:type flush: bool

tests/requirements.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
coverage >=5.1
2-
coverage_pyver_pragma >=0.0.2
1+
coverage>=5.1
2+
coverage_pyver_pragma>=0.0.2
33
faker
4-
pytest >=6.0.0rc1
5-
pytest-cov >=2.8.1
6-
pytest-randomly >=3.3.1
7-
pytest-rerunfailures >=9.0
8-
pytz >=2019.1
4+
pytest>=6.0.0rc1
5+
pytest-cov>=2.8.1
6+
pytest-randomly>=3.3.1
7+
pytest-rerunfailures>=9.0
8+
pytz>=2019.1

0 commit comments

Comments
 (0)