sphinx-napoleon Questions

5

Solved

I am trying to automatically create api docs for a large python codebase using Sphinx. I have tried using build_modules.py and sphinx-apidoc. With either one, I can get rst docs successfully creat...
Moresque asked 30/8, 2012 at 22:15

1

As this post describes, autodoc will eagerly add the class variables to the documentation even if napoleon adds the fields as documentation in: from dataclasses import dataclass @dataclass class Fo...
Xerography asked 17/1, 2022 at 8:1

3

Solved

I have an open source package with lots of classes over different submodules. All classes have methods fit and transform, and inherit fit_transform from sklearn. All classes have docstrings that fo...
Vonnievonny asked 8/12, 2020 at 12:32

2

Solved

Does anyone now a simple way do convert all docstrings in an existing project from reStructured Text to the Google format? It looks like Napoleon can do something like that, but it looks very comp...

4

Solved

I'm using Sphinx to document a python project. I would like to use Markdown in my docstrings to format them. Even if I use the recommonmark extension, it only covers the .md files written manually,...
Maniacal asked 9/5, 2019 at 15:4

2

I am using NumPyDoc-style docstrings to document a Python package. I would like to switch from the 'numpydoc' Sphinx extension to Napoleon, because I find that it formats the docstring in a more co...
Overwrite asked 20/1, 2017 at 11:25

2

I want to autogenerate documentation to my code from docstrings. I have some basic class meant to store some data: class DataHolder: """ Class to hold some data Attributes: batch: Run withou...

2

I am aware of the syntax used to build a docstring for Google style such as: def function_with_types_in_docstring(param1, param2): """Example function with types documented in the docstring. `P...

4

Solved

I am trying to use the Google code style to document a function that I then use sphinx with the napoleon extension to create documentation for. The function is unusual in that is returns two argume...
Assassin asked 23/3, 2015 at 22:21

1

Solved

I am getting multiple warnings like: WARNING: duplicate object description of pyfar.signal.TimeData.times, other instance in pyfar.classes_audio, use :noindex: for one of them but can not figure ou...
Pepe asked 31/3, 2021 at 15:45

2

This question is related to this other one. The proposed and accepted solution is: Returns: (tuple): tuple containing: arg1: First Argument arg2: Second Argument This solution is not workin...
Cyclostome asked 14/7, 2015 at 17:59

1

Solved

I noticed a change in behavior in how Sphinx renders class descriptions. Given this code # my example happens to be a dataclass, but the behavior for # regular classes is the same @dataclass class...
Darondarooge asked 29/10, 2020 at 10:1

2

I recently started adding documentation to my project and I'm trying to follow the Google style guide. I am using Sphinx to generate the documents and the Sphinx extension napoleon to bridge the ga...
Hebraism asked 15/6, 2017 at 21:31

4

I try to use function names that are active and descriptive, which I then document with active and descriptive text (!). This generates redundant-looking code. Simplified (but not so unreali...
Devindevina asked 8/10, 2015 at 15:24

1

Solved

I am currently trying to implement automatic documentation creation with Sphinx (using the extensions sphinx-apidoc and napoleon). This works quite well, but it would be even better if the typehint...

1

I'm using sphinx autodoc extension together with sphinx.ext.napoleon. I'm following numpydoc style guide since I think it is more readable than google's one. However, I've noticed the following iss...
Orchid asked 24/10, 2017 at 15:5

1

How do I indicate types for lists, optional arguments and return types for generators on Google-style docstrings using Sphinx-Napoleon? I've tried List[type] list of type Optional[type] ty...
Peppery asked 4/12, 2015 at 23:38

1

I am writing documentation for a Python project using Numpy-style docstrings. numpydoc and napoleon are two Sphinx extensions that parse Numpy-style docstrings to generate documentation. The...
Dougall asked 19/4, 2016 at 10:33

1

Sometimes a function in Python may accept an argument of a flexible type. Or it may return a value of a flexible type. Now I can't remember a good example of such a function right now, therefore I ...
Flori asked 7/1, 2016 at 5:31

1

Solved

I am trying to generate documentation for my python classes using Sphinx 1.4 and sphinx-apidoc and the sphinx.ext.autodoc extension. I have a lot of modules and I want each to only show class name...
Entebbe asked 2/4, 2016 at 0:48

2

The sphinx-doc napoleon Google style docstrings example here for version 1.3.4 shows that optional arguments for a function/method should be documented as follows: param2 (str, optional): The seco...
Ode asked 18/1, 2016 at 3:10

3

Solved

Does PyCharm 2.7 (or will PyCharm 3) have support for custom docstring and doctest stubs? If so, how does one go about writing this specific type of custom extension? My current project has standa...
Cupcake asked 6/9, 2013 at 21:31

1

Solved

I've been reading through Numpy's documentation standards, and it doesn't seem to make a mention of object attributes - only class attributes. So, for instance, how would I document the fol...
Nickey asked 10/2, 2015 at 17:21
1

© 2022 - 2025 — McMap. All rights reserved.