Skip to content

Commit

Permalink
feat: Add default property to docstring parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Nov 13, 2021
1 parent 3902e74 commit 6298ba3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/griffe/docstrings/dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,14 @@ def as_dict(self, **kwargs: Any) -> dict[str, Any]:
class DocstringParameter(DocstringNamedElement):
"""This class represent a documented function parameter."""

@property
def default(self):
return self.value

@default.setter
def default(self, value):
self.value = value


class DocstringAttribute(DocstringNamedElement):
"""This class represents a documented module/class attribute."""

0 comments on commit 6298ba3

Please sign in to comment.