Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TYP: Improve the doc style for type hints #2813

Merged
merged 9 commits into from
Dec 7, 2023
1 change: 1 addition & 0 deletions .github/workflows/ci_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:
myst-parser
panel
sphinx
sphinx-autodoc-typehints
sphinx-copybutton
sphinx-design
sphinx-gallery
Expand Down
1 change: 1 addition & 0 deletions ci/requirements/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ dependencies:
- myst-parser
- panel
- sphinx
- sphinx-autodoc-typehints
- sphinx-copybutton
- sphinx-design
- sphinx-gallery
Expand Down
4 changes: 4 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
"sphinx_autodoc_typehints",
"sphinx_copybutton",
"sphinx_design",
"sphinx_gallery.gen_gallery",
Expand All @@ -41,6 +42,9 @@
napoleon_use_rtype = False
napoleon_use_ivar = True

# sphinx_auto_typehints
typehints_defaults = "comma"

# configure links to GMT docs
extlinks = {
"gmt-docs": ("https://docs.generic-mapping-tools.org/6.4/%s", None),
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ dependencies:
- myst-parser
- panel
- sphinx
- sphinx-autodoc-typehints
- sphinx-copybutton
- sphinx-design
- sphinx-gallery
Expand Down