-
Notifications
You must be signed in to change notification settings - Fork 86
Closed
Labels
C: styleRelates to docstring format style (e.g., Google, NumPy, Sphinx)Relates to docstring format style (e.g., Google, NumPy, Sphinx)P: bugPEP 257 violation or existing functionality that doesn't work as documentedPEP 257 violation or existing functionality that doesn't work as documentedU: mediumA relatively medium urgency issueA relatively medium urgency issue
Description
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?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C: styleRelates to docstring format style (e.g., Google, NumPy, Sphinx)Relates to docstring format style (e.g., Google, NumPy, Sphinx)P: bugPEP 257 violation or existing functionality that doesn't work as documentedPEP 257 violation or existing functionality that doesn't work as documentedU: mediumA relatively medium urgency issueA relatively medium urgency issue