.. toctree:: :maxdepth: 3 :glob: autodoc/*
Created
October 29, 2020 12:32
-
-
Save a-recknagel/e2de5b9ca21383e9f0606eb08a6ee50e to your computer and use it in GitHub Desktop.
MCVE to reproduce sphinx's classvar appending
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
sys.path.append('src') | |
project = "sphinx_test" | |
extensions = [ | |
"sphinx.ext.autodoc", | |
"sphinx.ext.napoleon", | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dataclasses | |
@dataclasses.dataclass | |
class Foo: | |
"""Docstring for Foo""" | |
var_a: str | |
var_b: int |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
store files as:
Then build documentation and open documentation by running
The offending items are the
var_a
andvar_b
parts at the bottom of the class description that weren't part of the class docstring: