sphinx-automodapi
sphinx-automodapi copied to clipboard
Support for typing and dataclass fields
Hi, great package!
I have one problem: automodapi seems to ignore dataclass fields if they are initialized with the field method or annotated with a typing type:
from dataclasses import dataclass
from typing import Optional, List
@dataclass
class MyClass:
"""description"""
#: this is ok
ok: int = 0
#: this does not get generated
notok: Optional[int] = None
#: this does not get generated either
foo: List[int] = field(default_factory=list)
Is there a solution for this? Thanks!
I have created a PR for fixing this: https://github.com/astropy/sphinx-automodapi/pull/116