I would like to use cvar, ivar and vartype of the sphyx docstring syntax, however, docformatter is incorrectly handling them.
Expected:
"""Abstract base class representing a generic element within an OntoUML model.
:ivar id: A unique identifier for the element, automatically generated upon instantiation.
:vartype id: str
:ivar created: Timestamp when the element was created, defaults to the current time.
:vartype created: datetime
:ivar modified: Timestamp when the element was last modified, can be None if not modified.
:vartype modified: Optional[datetime]
:ivar in_project: List of projects this element is part of. Direct modification is restricted.
:vartype in_project: list[Project]
"""
Result:
"""Abstract base class representing a generic element within an OntoUML model.
:ivar id: A unique identifier for the element, automatically generated upon instantiation. :vartype id: str :ivar
created: Timestamp when the element was created, defaults to the current time. :vartype created: datetime :ivar
modified: Timestamp when the element was last modified, can be None if not modified. :vartype modified:
Optional[datetime] :ivar in_project: List of projects this element is part of. Direct modification is restricted.
:vartype in_project: list[Project]
"""
Is there a workaround to solve this issue?
I would like to use cvar, ivar and vartype of the sphyx docstring syntax, however, docformatter is incorrectly handling them.
Expected:
Result:
Is there a workaround to solve this issue?