-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Dataclass field types are not rendered when factories are used #10893
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
Labels
Milestone
Comments
DifferentialOrange
added a commit
to tarantool/tarantool-python
that referenced
this issue
Oct 10, 2022
Add or update docstings for submodule files contents. Submodules are not meant to be used directly in code, but their descriptions will be imported automatically to core module API description. It also may help developers of this module. Every submodule that could be of use is indexed in documentation now. Set sphinx autodoc module to describe members and inherited members by default. Dataclass with factories display is not parsed correctly, see [1] issue. 1. sphinx-doc/sphinx#10893 Part of #67
DifferentialOrange
added a commit
to tarantool/tarantool-python
that referenced
this issue
Oct 10, 2022
Add or update docstings for submodule files contents. Submodules are not meant to be used directly in code, but their descriptions will be imported automatically to core module API description. It also may help developers of this module. Every submodule that could be of use is indexed in documentation now. Set sphinx autodoc module to describe members and inherited members by default. Dataclass with factories display is not parsed correctly, see [1] issue. 1. sphinx-doc/sphinx#10893 Part of #67
DifferentialOrange
added a commit
to tarantool/tarantool-python
that referenced
this issue
Oct 10, 2022
Add or update docstings for submodule files contents. Submodules are not meant to be used directly in code, but their descriptions will be imported automatically to core module API description. It also may help developers of this module. Every submodule that could be of use is indexed in documentation now. Set sphinx autodoc module to describe members and inherited members by default. Dataclass with factories display is not parsed correctly, see [1] issue. 1. sphinx-doc/sphinx#10893 Part of #67
DifferentialOrange
added a commit
to tarantool/tarantool-python
that referenced
this issue
Oct 10, 2022
Add or update docstings for submodule files contents. Submodules are not meant to be used directly in code, but their descriptions will be imported automatically to core module API description. It also may help developers of this module. Every submodule that could be of use is indexed in documentation now. Set sphinx autodoc module to describe members and inherited members by default. Dataclass with factories display is not parsed correctly, see [1] issue. 1. sphinx-doc/sphinx#10893 Part of #67
DifferentialOrange
added a commit
to tarantool/tarantool-python
that referenced
this issue
Oct 10, 2022
Add or update docstings for submodule files contents. Submodules are not meant to be used directly in code, but their descriptions will be imported automatically to core module API description. It also may help developers of this module. Every submodule that could be of use is indexed in documentation now. Set sphinx autodoc module to describe members and inherited members by default. Dataclass with factories display is not parsed correctly, see [1] issue. 1. sphinx-doc/sphinx#10893 Part of #67
DifferentialOrange
added a commit
to tarantool/tarantool-python
that referenced
this issue
Oct 10, 2022
Add or update docstings for submodule files contents. Submodules are not meant to be used directly in code, but their descriptions will be imported automatically to core module API description. It also may help developers of this module. Every submodule that could be of use is indexed in documentation now. Set sphinx autodoc module to describe members and inherited members by default. Dataclass with factories display is not parsed correctly, see [1] issue. 1. sphinx-doc/sphinx#10893 Part of #67
DifferentialOrange
added a commit
to tarantool/tarantool-python
that referenced
this issue
Oct 11, 2022
Add or update docstings for submodule files contents. Submodules are not meant to be used directly in code, but their descriptions will be imported automatically to core module API description. It also may help developers of this module. Every submodule that could be of use is indexed in documentation now. Set sphinx autodoc module to describe members and inherited members by default. Dataclass with factories display is not parsed correctly, see [1] issue. 1. sphinx-doc/sphinx#10893 Part of #67
Since the culprit is the string from dataclasses import is_dataclass
def process_signature(app, what, name, obj, options, signature, return_annotation):
if what == "class" and is_dataclass(obj):
return signature.replace("<factory>", "..."), return_annotation
def setup(app):
app.connect("autodoc-process-signature", process_signature) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When
@dataclass
with optional fields and factories is defined, documentation generated with:automodule:
displays plain text~module.Class
instead of clickable links in__init__
description.The following code
source
is compiled to (see screenshot)
HTML
How to Reproduce
Expected behavior
Clickable links in dataclass
__init__
, like in other dataclasses in the moduleYour project
tarantool/tarantool-python@708902e
Screenshots
OS
Ubuntu 22.04
Python version
3.10.6
Sphinx version
5.2.1
Sphinx extensions
'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.ifconfig', 'sphinx_paramlinks'
Extra tools
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: