Skip to content

Commit

Permalink
Add autodoc typehints module
Browse files Browse the repository at this point in the history
  • Loading branch information
oerc0122 committed Jan 17, 2025
1 parent 4e0d1cd commit 2d6a96c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
3 changes: 3 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@
"sphinx.ext.viewcode",
"sphinxcontrib.contentui",
"sphinx_copybutton",
"sphinx_autodoc_typehints",
]

always_use_bars_union = True

numpydoc_validation_checks = {"all", "EX01", "SA01", "ES01"}
numpydoc_validation_exclude = {
r"\.__weakref__$",
Expand Down
18 changes: 9 additions & 9 deletions janus_core/cli/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def __str__(self) -> str:
help=(
"""
Keyword arguments to pass to ase.io.read. Must be passed as a dictionary
wrapped in quotes, e.g. "{'key' : value}". By default,
wrapped in quotes, e.g. "{'key': value}". By default,
read_kwargs['index'] = ':', so all structures are read.
"""
),
Expand All @@ -94,7 +94,7 @@ def __str__(self) -> str:
help=(
"""
Keyword arguments to pass to ase.io.read. Must be passed as a dictionary
wrapped in quotes, e.g. "{'key' : value}". By default,
wrapped in quotes, e.g. "{'key': value}". By default,
read_kwargs['index'] = -1, so only the last structure is read.
"""
),
Expand All @@ -109,8 +109,8 @@ def __str__(self) -> str:
help=(
"""
Keyword arguments to pass to selected calculator. Must be passed as a
dictionary wrapped in quotes, e.g. "{'key' : value}". For the default
architecture ('mace_mp'), "{'model':'small'}" is set unless overwritten.
dictionary wrapped in quotes, e.g. "{'key': value}". For the default
architecture ('mace_mp'), "{'model': 'small'}" is set unless overwritten.
"""
),
metavar="DICT",
Expand All @@ -124,7 +124,7 @@ def __str__(self) -> str:
help=(
"""
Keyword arguments to pass to ase.io.write when saving results. Must be
passed as a dictionary wrapped in quotes, e.g. "{'key' : value}".
passed as a dictionary wrapped in quotes, e.g. "{'key': value}".
"""
),
metavar="DICT",
Expand All @@ -138,7 +138,7 @@ def __str__(self) -> str:
help=(
"""
Keyword arguments to pass to optimizer. Must be passed as a dictionary
wrapped in quotes, e.g. "{'key' : value}".
wrapped in quotes, e.g. "{'key': value}".
"""
),
metavar="DICT",
Expand All @@ -152,7 +152,7 @@ def __str__(self) -> str:
help=(
"""
Keyword arguments to pass to optimizer. Must be passed as a dictionary
wrapped in quotes, e.g. "{'key' : value}".
wrapped in quotes, e.g. "{'key': value}".
"""
),
metavar="DICT",
Expand Down Expand Up @@ -194,7 +194,7 @@ def __str__(self) -> str:
help=(
"""
Keyword arguments to pass to ensemble initialization. Must be passed as a
dictionary wrapped in quotes, e.g. "{'key' : value}".
dictionary wrapped in quotes, e.g. "{'key': value}".
"""
),
metavar="DICT",
Expand Down Expand Up @@ -222,7 +222,7 @@ def __str__(self) -> str:
help=(
"""
Keyword arguments to pass to post-processer. Must be passed as a dictionary
wrapped in quotes, e.g. "{'key' : value}".
wrapped in quotes, e.g. "{'key': value}".
"""
),
metavar="DICT",
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ docs = [
"sphinxcontrib-contentui<1.0.0,>=0.2.5",
"sphinxcontrib-details-directive<1.0,>=0.1",
"sphinx-copybutton<1.0.0,>=0.5.2",
"sphinx-autodoc-typehints<3.0.0,>=2.5.0"
]

pre-commit = [
Expand Down

0 comments on commit 2d6a96c

Please sign in to comment.