|
104 | 104 | # ones. |
105 | 105 | extensions = [ |
106 | 106 | "sphinx.ext.autodoc", # To auto-generate docs from Python docstrings |
107 | | - "sphinx.ext.autosectionlabel", # Allow reference sections using its title |
| 107 | + "sphinx.ext.autosectionlabel", # Allow reference sections using its title |
108 | 108 | "sphinx.ext.todo", # Support for todo items |
109 | 109 | "sphinx.ext.napoleon", # Support for NumPy and Google style docstrings |
110 | 110 | "sphinx.ext.intersphinx", # Generate links to other documentation files |
|
119 | 119 | # 'IPython.sphinxext.ipython_directive', # numpy |
120 | 120 | "sphinx.ext.mathjax", # Render math as images |
121 | 121 | "recommonmark", # For markdown support, does not support 'full' CommonMark syntax (yet)! |
122 | | - "sphinx_autodoc_typehints", # Auto-parse type hints. Napoleon BEFORE typehints |
123 | 122 | "sphinxcontrib.mermaid", # Draw graphs using Mermaid.js |
124 | | - "sphinx_immaterial", # Sphinx immaterial theme |
| 123 | + "sphinx_immaterial", # Sphinx immaterial theme |
125 | 124 | ] |
126 | 125 |
|
127 | 126 | # Add any paths that contain templates here, relative to this directory. |
|
300 | 299 | # -- Extension configuration ------------------------------------------------- |
301 | 300 | # Configuration of sphinx.ext.autodoc |
302 | 301 | # https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html |
303 | | -autodoc_typehints = "none" # Use sphinx_autodoc_typehints instead |
| 302 | +autodoc_typehints = "signature" |
304 | 303 |
|
305 | 304 |
|
306 | 305 | # from recommonmark.transform import AutoStructify |
|
334 | 333 | # See https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html |
335 | 334 | napoleon_google_docstring = True |
336 | 335 | napoleon_numpy_docstring = False |
337 | | -# napoleon_include_init_with_doc = False # Handled by our Sphinx template |
| 336 | +# napoleon_include_init_with_doc = False # Handled by our Sphinx template |
338 | 337 | # napoleon_include_private_with_doc = False # Handled by our Sphinx template |
339 | 338 | # napoleon_include_special_with_doc = True |
340 | 339 | # napoleon_use_admonition_for_examples = False |
|
396 | 395 | "pd.DataFrame": "~pandas.NaT", |
397 | 396 | } # TODO: From xarray, improve! New in 3.2 |
398 | 397 |
|
399 | | -napoleon_attr_annotations = True # Allow PEP 526 attributes annotations in classes. New in 3.4 |
| 398 | +napoleon_attr_annotations = ( |
| 399 | + True # Allow PEP 526 attributes annotations in classes. New in 3.4 |
| 400 | +) |
400 | 401 |
|
401 | 402 | # From xarray, huh? |
402 | 403 | # napoleon_preprocess_types = True #From xarray, not in docs |
|
426 | 427 | # Configuration of sphinx.ext.mathjax |
427 | 428 | # See https://www.sphinx-doc.org/en/master/usage/extensions/math.html#module-sphinx.ext.mathjax |
428 | 429 |
|
429 | | -# Configuration of sphinx_autodoc_typehints |
430 | | -# See https://pypi.org/project/sphinx-autodoc-typehints/ |
431 | | -set_type_checking_flag = ( |
432 | | - True # Set typing.TYPE_CHECKING to True to enable "expensive" typing imports |
433 | | -) |
434 | | -# typehints_fully_qualified = False # If True, class names are always fully qualified (e.g. module.for.Class). If False, just the class name displays (e.g. Class) |
435 | | -always_document_param_types = ( |
436 | | - True # add stub documentation for undocumented parameters to be able to add type info. |
437 | | -) |
438 | | -# typehints_document_rtype = True # If False, never add an :rtype: directive. If True, add the :rtype: directive if no existing :rtype: is found. |
439 | | -# simplify_optional_unions = True # If True, optional parameters of type "Union[...]" are simplified as being of type Union[..., None] in the resulting documention (e.g. Optional[Union[A, B]] -> Union[A, B, None]). # If False, the "Optional"-type is kept. Note: If False, any Union containing None will be displayed as Optional! Note: If an optional parameter has only a single type (e.g Optional[A] or Union[A, None]), it will always be displayed as Optional! |
440 | | - |
441 | 430 |
|
442 | 431 | def escape_underscores(string): |
443 | 432 | return string.replace("_", r"\_") |
|
0 commit comments