dataclasses ¤
This module contains the dataclasses related to docstrings.
Classes:
-
DocstringAdmonition
–This class represents an admonition.
-
DocstringAttribute
–This class represents a documented module/class attribute.
-
DocstringClass
–This class represents a documented class.
-
DocstringDeprecated
–This class represents a documented deprecated item.
-
DocstringElement
–This base class represents annotated, nameless elements.
-
DocstringFunction
–This class represents a documented function.
-
DocstringModule
–This class represents a documented module.
-
DocstringNamedElement
–This base class represents annotated, named elements.
-
DocstringParameter
–This class represent a documented function parameter.
-
DocstringRaise
–This class represents a documented raise value.
-
DocstringReceive
–This class represents a documented receive value.
-
DocstringReturn
–This class represents a documented return value.
-
DocstringSection
–This class represents a docstring section.
-
DocstringSectionAdmonition
–This class represents an admonition section.
-
DocstringSectionAttributes
–This class represents an attributes section.
-
DocstringSectionClasses
–This class represents a classes section.
-
DocstringSectionDeprecated
–This class represents a deprecated section.
-
DocstringSectionExamples
–This class represents an examples section.
-
DocstringSectionFunctions
–This class represents a functions/methods section.
-
DocstringSectionKind
–Enumeration of the possible docstring section kinds.
-
DocstringSectionModules
–This class represents a modules section.
-
DocstringSectionOtherParameters
–This class represents an other parameters section.
-
DocstringSectionParameters
–This class represents a parameters section.
-
DocstringSectionRaises
–This class represents a raises section.
-
DocstringSectionReceives
–This class represents a receives section.
-
DocstringSectionReturns
–This class represents a returns section.
-
DocstringSectionText
–This class represents a text section.
-
DocstringSectionWarns
–This class represents a warns section.
-
DocstringSectionYields
–This class represents a yields section.
-
DocstringWarn
–This class represents a documented warn value.
-
DocstringYield
–This class represents a documented yield value.
DocstringAdmonition ¤
flowchart TD
griffe.docstrings.dataclasses.DocstringAdmonition[DocstringAdmonition]
griffe.docstrings.dataclasses.DocstringElement[DocstringElement]
griffe.docstrings.dataclasses.DocstringElement --> griffe.docstrings.dataclasses.DocstringAdmonition
click griffe.docstrings.dataclasses.DocstringAdmonition href "" "griffe.docstrings.dataclasses.DocstringAdmonition"
click griffe.docstrings.dataclasses.DocstringElement href "" "griffe.docstrings.dataclasses.DocstringElement"
This class represents an admonition.
Parameters:
-
annotation
(str | Expr | None
, default:None
) –The element annotation, if any.
-
description
(str
) –The element description.
Methods:
-
as_dict
–Return this element's data as a dictionary.
Attributes:
-
annotation
(str | Expr | None
) –The element annotation.
-
contents
(str
) –The contents of this admonition.
-
description
(str
) –The element description.
-
kind
(str | Expr | None
) –The kind of this admonition.
DocstringAttribute ¤
DocstringAttribute(
name: str,
*,
description: str,
annotation: str | Expr | None = None,
value: str | None = None
)
flowchart TD
griffe.docstrings.dataclasses.DocstringAttribute[DocstringAttribute]
griffe.docstrings.dataclasses.DocstringNamedElement[DocstringNamedElement]
griffe.docstrings.dataclasses.DocstringElement[DocstringElement]
griffe.docstrings.dataclasses.DocstringNamedElement --> griffe.docstrings.dataclasses.DocstringAttribute
griffe.docstrings.dataclasses.DocstringElement --> griffe.docstrings.dataclasses.DocstringNamedElement
click griffe.docstrings.dataclasses.DocstringAttribute href "" "griffe.docstrings.dataclasses.DocstringAttribute"
click griffe.docstrings.dataclasses.DocstringNamedElement href "" "griffe.docstrings.dataclasses.DocstringNamedElement"
click griffe.docstrings.dataclasses.DocstringElement href "" "griffe.docstrings.dataclasses.DocstringElement"
This class represents a documented module/class attribute.
Parameters:
-
name
(str
) –The element name.
-
description
(str
) –The element description.
-
annotation
(str | Expr | None
, default:None
) –The element annotation, if any.
-
value
(str | None
, default:None
) –The element value, as a string.
Methods:
-
as_dict
–Return this element's data as a dictionary.
Attributes:
-
annotation
(str | Expr | None
) –The element annotation.
-
description
(str
) –The element description.
-
name
(str
) –The element name.
-
value
(str | None
) –The element value, if any
DocstringClass ¤
DocstringClass(
name: str,
*,
description: str,
annotation: str | Expr | None = None,
value: str | None = None
)
flowchart TD
griffe.docstrings.dataclasses.DocstringClass[DocstringClass]
griffe.docstrings.dataclasses.DocstringNamedElement[DocstringNamedElement]
griffe.docstrings.dataclasses.DocstringElement[DocstringElement]
griffe.docstrings.dataclasses.DocstringNamedElement --> griffe.docstrings.dataclasses.DocstringClass
griffe.docstrings.dataclasses.DocstringElement --> griffe.docstrings.dataclasses.DocstringNamedElement
click griffe.docstrings.dataclasses.DocstringClass href "" "griffe.docstrings.dataclasses.DocstringClass"
click griffe.docstrings.dataclasses.DocstringNamedElement href "" "griffe.docstrings.dataclasses.DocstringNamedElement"
click griffe.docstrings.dataclasses.DocstringElement href "" "griffe.docstrings.dataclasses.DocstringElement"
This class represents a documented class.
Parameters:
-
name
(str
) –The element name.
-
description
(str
) –The element description.
-
annotation
(str | Expr | None
, default:None
) –The element annotation, if any.
-
value
(str | None
, default:None
) –The element value, as a string.
Methods:
-
as_dict
–Return this element's data as a dictionary.
Attributes:
-
annotation
(str | Expr | None
) –The element annotation.
-
description
(str
) –The element description.
-
name
(str
) –The element name.
-
value
(str | None
) –The element value, if any
DocstringDeprecated ¤
flowchart TD
griffe.docstrings.dataclasses.DocstringDeprecated[DocstringDeprecated]
griffe.docstrings.dataclasses.DocstringElement[DocstringElement]
griffe.docstrings.dataclasses.DocstringElement --> griffe.docstrings.dataclasses.DocstringDeprecated
click griffe.docstrings.dataclasses.DocstringDeprecated href "" "griffe.docstrings.dataclasses.DocstringDeprecated"
click griffe.docstrings.dataclasses.DocstringElement href "" "griffe.docstrings.dataclasses.DocstringElement"
This class represents a documented deprecated item.
Parameters:
-
annotation
(str | Expr | None
, default:None
) –The element annotation, if any.
-
description
(str
) –The element description.
Methods:
-
as_dict
–Return this element's data as a dictionary.
Attributes:
-
annotation
(str | Expr | None
) –The element annotation.
-
description
(str
) –The element description.
-
version
(str
) –The version of this deprecation.
DocstringElement ¤
This base class represents annotated, nameless elements.
Parameters:
-
annotation
(str | Expr | None
, default:None
) –The element annotation, if any.
-
description
(str
) –The element description.
Methods:
-
as_dict
–Return this element's data as a dictionary.
Attributes:
-
annotation
(str | Expr | None
) –The element annotation.
-
description
(str
) –The element description.
DocstringFunction ¤
DocstringFunction(
name: str,
*,
description: str,
annotation: str | Expr | None = None,
value: str | None = None
)
flowchart TD
griffe.docstrings.dataclasses.DocstringFunction[DocstringFunction]
griffe.docstrings.dataclasses.DocstringNamedElement[DocstringNamedElement]
griffe.docstrings.dataclasses.DocstringElement[DocstringElement]
griffe.docstrings.dataclasses.DocstringNamedElement --> griffe.docstrings.dataclasses.DocstringFunction
griffe.docstrings.dataclasses.DocstringElement --> griffe.docstrings.dataclasses.DocstringNamedElement
click griffe.docstrings.dataclasses.DocstringFunction href "" "griffe.docstrings.dataclasses.DocstringFunction"
click griffe.docstrings.dataclasses.DocstringNamedElement href "" "griffe.docstrings.dataclasses.DocstringNamedElement"
click griffe.docstrings.dataclasses.DocstringElement href "" "griffe.docstrings.dataclasses.DocstringElement"
This class represents a documented function.
Parameters:
-
name
(str
) –The element name.
-
description
(str
) –The element description.
-
annotation
(str | Expr | None
, default:None
) –The element annotation, if any.
-
value
(str | None
, default:None
) –The element value, as a string.
Methods:
-
as_dict
–Return this element's data as a dictionary.
Attributes:
-
annotation
(str | Expr | None
) –The element annotation.
-
description
(str
) –The element description.
-
name
(str
) –The element name.
-
value
(str | None
) –The element value, if any
DocstringModule ¤
DocstringModule(
name: str,
*,
description: str,
annotation: str | Expr | None = None,
value: str | None = None
)
flowchart TD
griffe.docstrings.dataclasses.DocstringModule[DocstringModule]
griffe.docstrings.dataclasses.DocstringNamedElement[DocstringNamedElement]
griffe.docstrings.dataclasses.DocstringElement[DocstringElement]
griffe.docstrings.dataclasses.DocstringNamedElement --> griffe.docstrings.dataclasses.DocstringModule
griffe.docstrings.dataclasses.DocstringElement --> griffe.docstrings.dataclasses.DocstringNamedElement
click griffe.docstrings.dataclasses.DocstringModule href "" "griffe.docstrings.dataclasses.DocstringModule"
click griffe.docstrings.dataclasses.DocstringNamedElement href "" "griffe.docstrings.dataclasses.DocstringNamedElement"
click griffe.docstrings.dataclasses.DocstringElement href "" "griffe.docstrings.dataclasses.DocstringElement"
This class represents a documented module.
Parameters:
-
name
(str
) –The element name.
-
description
(str
) –The element description.
-
annotation
(str | Expr | None
, default:None
) –The element annotation, if any.
-
value
(str | None
, default:None
) –The element value, as a string.
Methods:
-
as_dict
–Return this element's data as a dictionary.
Attributes:
-
annotation
(str | Expr | None
) –The element annotation.
-
description
(str
) –The element description.
-
name
(str
) –The element name.
-
value
(str | None
) –The element value, if any
DocstringNamedElement ¤
DocstringNamedElement(
name: str,
*,
description: str,
annotation: str | Expr | None = None,
value: str | None = None
)
flowchart TD
griffe.docstrings.dataclasses.DocstringNamedElement[DocstringNamedElement]
griffe.docstrings.dataclasses.DocstringElement[DocstringElement]
griffe.docstrings.dataclasses.DocstringElement --> griffe.docstrings.dataclasses.DocstringNamedElement
click griffe.docstrings.dataclasses.DocstringNamedElement href "" "griffe.docstrings.dataclasses.DocstringNamedElement"
click griffe.docstrings.dataclasses.DocstringElement href "" "griffe.docstrings.dataclasses.DocstringElement"
This base class represents annotated, named elements.
Parameters:
-
name
(str
) –The element name.
-
description
(str
) –The element description.
-
annotation
(str | Expr | None
, default:None
) –The element annotation, if any.
-
value
(str | None
, default:None
) –The element value, as a string.
Methods:
-
as_dict
–Return this element's data as a dictionary.
Attributes:
-
annotation
(str | Expr | None
) –The element annotation.
-
description
(str
) –The element description.
-
name
(str
) –The element name.
-
value
(str | None
) –The element value, if any
DocstringParameter ¤
DocstringParameter(
name: str,
*,
description: str,
annotation: str | Expr | None = None,
value: str | None = None
)
flowchart TD
griffe.docstrings.dataclasses.DocstringParameter[DocstringParameter]
griffe.docstrings.dataclasses.DocstringNamedElement[DocstringNamedElement]
griffe.docstrings.dataclasses.DocstringElement[DocstringElement]
griffe.docstrings.dataclasses.DocstringNamedElement --> griffe.docstrings.dataclasses.DocstringParameter
griffe.docstrings.dataclasses.DocstringElement --> griffe.docstrings.dataclasses.DocstringNamedElement
click griffe.docstrings.dataclasses.DocstringParameter href "" "griffe.docstrings.dataclasses.DocstringParameter"
click griffe.docstrings.dataclasses.DocstringNamedElement href "" "griffe.docstrings.dataclasses.DocstringNamedElement"
click griffe.docstrings.dataclasses.DocstringElement href "" "griffe.docstrings.dataclasses.DocstringElement"
This class represent a documented function parameter.
Parameters:
-
name
(str
) –The element name.
-
description
(str
) –The element description.
-
annotation
(str | Expr | None
, default:None
) –The element annotation, if any.
-
value
(str | None
, default:None
) –The element value, as a string.
Methods:
-
as_dict
–Return this element's data as a dictionary.
Attributes:
-
annotation
(str | Expr | None
) –The element annotation.
-
default
(str | None
) –The default value of this parameter.
-
description
(str
) –The element description.
-
name
(str
) –The element name.
-
value
(str | None
) –The element value, if any
DocstringRaise ¤
flowchart TD
griffe.docstrings.dataclasses.DocstringRaise[DocstringRaise]
griffe.docstrings.dataclasses.DocstringElement[DocstringElement]
griffe.docstrings.dataclasses.DocstringElement --> griffe.docstrings.dataclasses.DocstringRaise
click griffe.docstrings.dataclasses.DocstringRaise href "" "griffe.docstrings.dataclasses.DocstringRaise"
click griffe.docstrings.dataclasses.DocstringElement href "" "griffe.docstrings.dataclasses.DocstringElement"
This class represents a documented raise value.
Parameters:
-
annotation
(str | Expr | None
, default:None
) –The element annotation, if any.
-
description
(str
) –The element description.
Methods:
-
as_dict
–Return this element's data as a dictionary.
Attributes:
-
annotation
(str | Expr | None
) –The element annotation.
-
description
(str
) –The element description.
DocstringReceive ¤
DocstringReceive(
name: str,
*,
description: str,
annotation: str | Expr | None = None,
value: str | None = None
)
flowchart TD
griffe.docstrings.dataclasses.DocstringReceive[DocstringReceive]
griffe.docstrings.dataclasses.DocstringNamedElement[DocstringNamedElement]
griffe.docstrings.dataclasses.DocstringElement[DocstringElement]
griffe.docstrings.dataclasses.DocstringNamedElement --> griffe.docstrings.dataclasses.DocstringReceive
griffe.docstrings.dataclasses.DocstringElement --> griffe.docstrings.dataclasses.DocstringNamedElement
click griffe.docstrings.dataclasses.DocstringReceive href "" "griffe.docstrings.dataclasses.DocstringReceive"
click griffe.docstrings.dataclasses.DocstringNamedElement href "" "griffe.docstrings.dataclasses.DocstringNamedElement"
click griffe.docstrings.dataclasses.DocstringElement href "" "griffe.docstrings.dataclasses.DocstringElement"
This class represents a documented receive value.
Parameters:
-
name
(str
) –The element name.
-
description
(str
) –The element description.
-
annotation
(str | Expr | None
, default:None
) –The element annotation, if any.
-
value
(str | None
, default:None
) –The element value, as a string.
Methods:
-
as_dict
–Return this element's data as a dictionary.
Attributes:
-
annotation
(str | Expr | None
) –The element annotation.
-
description
(str
) –The element description.
-
name
(str
) –The element name.
-
value
(str | None
) –The element value, if any
DocstringReturn ¤
DocstringReturn(
name: str,
*,
description: str,
annotation: str | Expr | None = None,
value: str | None = None
)
flowchart TD
griffe.docstrings.dataclasses.DocstringReturn[DocstringReturn]
griffe.docstrings.dataclasses.DocstringNamedElement[DocstringNamedElement]
griffe.docstrings.dataclasses.DocstringElement[DocstringElement]
griffe.docstrings.dataclasses.DocstringNamedElement --> griffe.docstrings.dataclasses.DocstringReturn
griffe.docstrings.dataclasses.DocstringElement --> griffe.docstrings.dataclasses.DocstringNamedElement
click griffe.docstrings.dataclasses.DocstringReturn href "" "griffe.docstrings.dataclasses.DocstringReturn"
click griffe.docstrings.dataclasses.DocstringNamedElement href "" "griffe.docstrings.dataclasses.DocstringNamedElement"
click griffe.docstrings.dataclasses.DocstringElement href "" "griffe.docstrings.dataclasses.DocstringElement"
This class represents a documented return value.
Parameters:
-
name
(str
) –The element name.
-
description
(str
) –The element description.
-
annotation
(str | Expr | None
, default:None
) –The element annotation, if any.
-
value
(str | None
, default:None
) –The element value, as a string.
Methods:
-
as_dict
–Return this element's data as a dictionary.
Attributes:
-
annotation
(str | Expr | None
) –The element annotation.
-
description
(str
) –The element description.
-
name
(str
) –The element name.
-
value
(str | None
) –The element value, if any
DocstringSection ¤
DocstringSection(title: str | None = None)
This class represents a docstring section.
Parameters:
-
title
(str | None
, default:None
) –An optional title.
Methods:
-
as_dict
–Return this section's data as a dictionary.
Attributes:
-
kind
(DocstringSectionKind
) –The section kind.
-
title
(str | None
) –The section title.
-
value
(Any
) –The section value.
DocstringSectionAdmonition ¤
flowchart TD
griffe.docstrings.dataclasses.DocstringSectionAdmonition[DocstringSectionAdmonition]
griffe.docstrings.dataclasses.DocstringSection[DocstringSection]
griffe.docstrings.dataclasses.DocstringSection --> griffe.docstrings.dataclasses.DocstringSectionAdmonition
click griffe.docstrings.dataclasses.DocstringSectionAdmonition href "" "griffe.docstrings.dataclasses.DocstringSectionAdmonition"
click griffe.docstrings.dataclasses.DocstringSection href "" "griffe.docstrings.dataclasses.DocstringSection"
This class represents an admonition section.
Parameters:
-
kind
(str
) –The admonition kind.
-
text
(str
) –The admonition text.
-
title
(str | None
, default:None
) –An optional title.
Methods:
-
as_dict
–Return this section's data as a dictionary.
Attributes:
-
kind
(DocstringSectionKind
) –The section kind.
-
title
(str | None
) –The section title.
-
value
(DocstringAdmonition
) –The section value.
value instance-attribute
¤
value: DocstringAdmonition = DocstringAdmonition(
annotation=kind, description=text
)
The section value.
DocstringSectionAttributes ¤
DocstringSectionAttributes(
value: list[DocstringAttribute],
title: str | None = None,
)
flowchart TD
griffe.docstrings.dataclasses.DocstringSectionAttributes[DocstringSectionAttributes]
griffe.docstrings.dataclasses.DocstringSection[DocstringSection]
griffe.docstrings.dataclasses.DocstringSection --> griffe.docstrings.dataclasses.DocstringSectionAttributes
click griffe.docstrings.dataclasses.DocstringSectionAttributes href "" "griffe.docstrings.dataclasses.DocstringSectionAttributes"
click griffe.docstrings.dataclasses.DocstringSection href "" "griffe.docstrings.dataclasses.DocstringSection"
This class represents an attributes section.
Parameters:
-
value
(list[DocstringAttribute]
) –The section attributes.
-
title
(str | None
, default:None
) –An optional title.
Methods:
-
as_dict
–Return this section's data as a dictionary.
Attributes:
-
kind
(DocstringSectionKind
) –The section kind.
-
title
(str | None
) –The section title.
-
value
(list[DocstringAttribute]
) –The section value.
DocstringSectionClasses ¤
DocstringSectionClasses(
value: list[DocstringClass], title: str | None = None
)
flowchart TD
griffe.docstrings.dataclasses.DocstringSectionClasses[DocstringSectionClasses]
griffe.docstrings.dataclasses.DocstringSection[DocstringSection]
griffe.docstrings.dataclasses.DocstringSection --> griffe.docstrings.dataclasses.DocstringSectionClasses
click griffe.docstrings.dataclasses.DocstringSectionClasses href "" "griffe.docstrings.dataclasses.DocstringSectionClasses"
click griffe.docstrings.dataclasses.DocstringSection href "" "griffe.docstrings.dataclasses.DocstringSection"
This class represents a classes section.
Parameters:
-
value
(list[DocstringClass]
) –The section classes.
-
title
(str | None
, default:None
) –An optional title.
Methods:
-
as_dict
–Return this section's data as a dictionary.
Attributes:
-
kind
(DocstringSectionKind
) –The section kind.
-
title
(str | None
) –The section title.
-
value
(list[DocstringClass]
) –The section value.
DocstringSectionDeprecated ¤
flowchart TD
griffe.docstrings.dataclasses.DocstringSectionDeprecated[DocstringSectionDeprecated]
griffe.docstrings.dataclasses.DocstringSection[DocstringSection]
griffe.docstrings.dataclasses.DocstringSection --> griffe.docstrings.dataclasses.DocstringSectionDeprecated
click griffe.docstrings.dataclasses.DocstringSectionDeprecated href "" "griffe.docstrings.dataclasses.DocstringSectionDeprecated"
click griffe.docstrings.dataclasses.DocstringSection href "" "griffe.docstrings.dataclasses.DocstringSection"
This class represents a deprecated section.
Parameters:
-
version
(str
) –The deprecation version.
-
text
(str
) –The deprecation text.
-
title
(str | None
, default:None
) –An optional title.
Methods:
-
as_dict
–Return this section's data as a dictionary.
Attributes:
-
kind
(DocstringSectionKind
) –The section kind.
-
title
(str | None
) –The section title.
-
value
(DocstringDeprecated
) –The section value.
value instance-attribute
¤
value: DocstringDeprecated = DocstringDeprecated(
annotation=version, description=text
)
The section value.
DocstringSectionExamples ¤
DocstringSectionExamples(
value: list[tuple[Literal[text, examples], str]],
title: str | None = None,
)
flowchart TD
griffe.docstrings.dataclasses.DocstringSectionExamples[DocstringSectionExamples]
griffe.docstrings.dataclasses.DocstringSection[DocstringSection]
griffe.docstrings.dataclasses.DocstringSection --> griffe.docstrings.dataclasses.DocstringSectionExamples
click griffe.docstrings.dataclasses.DocstringSectionExamples href "" "griffe.docstrings.dataclasses.DocstringSectionExamples"
click griffe.docstrings.dataclasses.DocstringSection href "" "griffe.docstrings.dataclasses.DocstringSection"
This class represents an examples section.
Parameters:
-
value
(list[tuple[Literal[text, examples], str]]
) –The section examples.
-
title
(str | None
, default:None
) –An optional title.
Methods:
-
as_dict
–Return this section's data as a dictionary.
Attributes:
-
kind
(DocstringSectionKind
) –The section kind.
-
title
(str | None
) –The section title.
-
value
(list[tuple[Literal[text, examples], str]]
) –The section value.
value instance-attribute
¤
The section value.
DocstringSectionFunctions ¤
DocstringSectionFunctions(
value: list[DocstringFunction], title: str | None = None
)
flowchart TD
griffe.docstrings.dataclasses.DocstringSectionFunctions[DocstringSectionFunctions]
griffe.docstrings.dataclasses.DocstringSection[DocstringSection]
griffe.docstrings.dataclasses.DocstringSection --> griffe.docstrings.dataclasses.DocstringSectionFunctions
click griffe.docstrings.dataclasses.DocstringSectionFunctions href "" "griffe.docstrings.dataclasses.DocstringSectionFunctions"
click griffe.docstrings.dataclasses.DocstringSection href "" "griffe.docstrings.dataclasses.DocstringSection"
This class represents a functions/methods section.
Parameters:
-
value
(list[DocstringFunction]
) –The section functions.
-
title
(str | None
, default:None
) –An optional title.
Methods:
-
as_dict
–Return this section's data as a dictionary.
Attributes:
-
kind
(DocstringSectionKind
) –The section kind.
-
title
(str | None
) –The section title.
-
value
(list[DocstringFunction]
) –The section value.
DocstringSectionKind ¤
flowchart TD
griffe.docstrings.dataclasses.DocstringSectionKind[DocstringSectionKind]
click griffe.docstrings.dataclasses.DocstringSectionKind href "" "griffe.docstrings.dataclasses.DocstringSectionKind"
Enumeration of the possible docstring section kinds.
Attributes:
-
admonition
–Admonition block.
-
attributes
–Attributes section.
-
classes
–Classes section.
-
deprecated
–Deprecation section.
-
examples
–Examples section.
-
functions
–Functions section.
-
modules
–Modules section.
-
other_parameters
–Other parameters (keyword arguments) section.
-
parameters
–Parameters section.
-
raises
–Raises (exceptions) section.
-
receives
–Received value(s) (generators) section.
-
returns
–Returned value(s) section.
-
text
–Text section.
-
warns
–Warnings section.
-
yields
–Yielded value(s) (generators) section.
other_parameters class-attribute
instance-attribute
¤
other_parameters = 'other parameters'
Other parameters (keyword arguments) section.
receives class-attribute
instance-attribute
¤
receives = 'receives'
Received value(s) (generators) section.
yields class-attribute
instance-attribute
¤
yields = 'yields'
Yielded value(s) (generators) section.
DocstringSectionModules ¤
DocstringSectionModules(
value: list[DocstringModule], title: str | None = None
)
flowchart TD
griffe.docstrings.dataclasses.DocstringSectionModules[DocstringSectionModules]
griffe.docstrings.dataclasses.DocstringSection[DocstringSection]
griffe.docstrings.dataclasses.DocstringSection --> griffe.docstrings.dataclasses.DocstringSectionModules
click griffe.docstrings.dataclasses.DocstringSectionModules href "" "griffe.docstrings.dataclasses.DocstringSectionModules"
click griffe.docstrings.dataclasses.DocstringSection href "" "griffe.docstrings.dataclasses.DocstringSection"
This class represents a modules section.
Parameters:
-
value
(list[DocstringModule]
) –The section modules.
-
title
(str | None
, default:None
) –An optional title.
Methods:
-
as_dict
–Return this section's data as a dictionary.
Attributes:
-
kind
(DocstringSectionKind
) –The section kind.
-
title
(str | None
) –The section title.
-
value
(list[DocstringModule]
) –The section value.
DocstringSectionOtherParameters ¤
DocstringSectionOtherParameters(
value: list[DocstringParameter],
title: str | None = None,
)
flowchart TD
griffe.docstrings.dataclasses.DocstringSectionOtherParameters[DocstringSectionOtherParameters]
griffe.docstrings.dataclasses.DocstringSectionParameters[DocstringSectionParameters]
griffe.docstrings.dataclasses.DocstringSection[DocstringSection]
griffe.docstrings.dataclasses.DocstringSectionParameters --> griffe.docstrings.dataclasses.DocstringSectionOtherParameters
griffe.docstrings.dataclasses.DocstringSection --> griffe.docstrings.dataclasses.DocstringSectionParameters
click griffe.docstrings.dataclasses.DocstringSectionOtherParameters href "" "griffe.docstrings.dataclasses.DocstringSectionOtherParameters"
click griffe.docstrings.dataclasses.DocstringSectionParameters href "" "griffe.docstrings.dataclasses.DocstringSectionParameters"
click griffe.docstrings.dataclasses.DocstringSection href "" "griffe.docstrings.dataclasses.DocstringSection"
This class represents an other parameters section.
Parameters:
-
value
(list[DocstringParameter]
) –The section parameters.
-
title
(str | None
, default:None
) –An optional title.
Methods:
-
as_dict
–Return this section's data as a dictionary.
Attributes:
-
kind
(DocstringSectionKind
) –The section kind.
-
title
(str | None
) –The section title.
-
value
(list[DocstringParameter]
) –The section value.
kind class-attribute
instance-attribute
¤
kind: DocstringSectionKind = other_parameters
The section kind.
DocstringSectionParameters ¤
DocstringSectionParameters(
value: list[DocstringParameter],
title: str | None = None,
)
flowchart TD
griffe.docstrings.dataclasses.DocstringSectionParameters[DocstringSectionParameters]
griffe.docstrings.dataclasses.DocstringSection[DocstringSection]
griffe.docstrings.dataclasses.DocstringSection --> griffe.docstrings.dataclasses.DocstringSectionParameters
click griffe.docstrings.dataclasses.DocstringSectionParameters href "" "griffe.docstrings.dataclasses.DocstringSectionParameters"
click griffe.docstrings.dataclasses.DocstringSection href "" "griffe.docstrings.dataclasses.DocstringSection"
This class represents a parameters section.
Parameters:
-
value
(list[DocstringParameter]
) –The section parameters.
-
title
(str | None
, default:None
) –An optional title.
Methods:
-
as_dict
–Return this section's data as a dictionary.
Attributes:
-
kind
(DocstringSectionKind
) –The section kind.
-
title
(str | None
) –The section title.
-
value
(list[DocstringParameter]
) –The section value.
DocstringSectionRaises ¤
DocstringSectionRaises(
value: list[DocstringRaise], title: str | None = None
)
flowchart TD
griffe.docstrings.dataclasses.DocstringSectionRaises[DocstringSectionRaises]
griffe.docstrings.dataclasses.DocstringSection[DocstringSection]
griffe.docstrings.dataclasses.DocstringSection --> griffe.docstrings.dataclasses.DocstringSectionRaises
click griffe.docstrings.dataclasses.DocstringSectionRaises href "" "griffe.docstrings.dataclasses.DocstringSectionRaises"
click griffe.docstrings.dataclasses.DocstringSection href "" "griffe.docstrings.dataclasses.DocstringSection"
This class represents a raises section.
Parameters:
-
value
(list[DocstringRaise]
) –The section exceptions.
-
title
(str | None
, default:None
) –An optional title.
Methods:
-
as_dict
–Return this section's data as a dictionary.
Attributes:
-
kind
(DocstringSectionKind
) –The section kind.
-
title
(str | None
) –The section title.
-
value
(list[DocstringRaise]
) –The section value.
DocstringSectionReceives ¤
DocstringSectionReceives(
value: list[DocstringReceive], title: str | None = None
)
flowchart TD
griffe.docstrings.dataclasses.DocstringSectionReceives[DocstringSectionReceives]
griffe.docstrings.dataclasses.DocstringSection[DocstringSection]
griffe.docstrings.dataclasses.DocstringSection --> griffe.docstrings.dataclasses.DocstringSectionReceives
click griffe.docstrings.dataclasses.DocstringSectionReceives href "" "griffe.docstrings.dataclasses.DocstringSectionReceives"
click griffe.docstrings.dataclasses.DocstringSection href "" "griffe.docstrings.dataclasses.DocstringSection"
This class represents a receives section.
Parameters:
-
value
(list[DocstringReceive]
) –The section received items.
-
title
(str | None
, default:None
) –An optional title.
Methods:
-
as_dict
–Return this section's data as a dictionary.
Attributes:
-
kind
(DocstringSectionKind
) –The section kind.
-
title
(str | None
) –The section title.
-
value
(list[DocstringReceive]
) –The section value.
DocstringSectionReturns ¤
DocstringSectionReturns(
value: list[DocstringReturn], title: str | None = None
)
flowchart TD
griffe.docstrings.dataclasses.DocstringSectionReturns[DocstringSectionReturns]
griffe.docstrings.dataclasses.DocstringSection[DocstringSection]
griffe.docstrings.dataclasses.DocstringSection --> griffe.docstrings.dataclasses.DocstringSectionReturns
click griffe.docstrings.dataclasses.DocstringSectionReturns href "" "griffe.docstrings.dataclasses.DocstringSectionReturns"
click griffe.docstrings.dataclasses.DocstringSection href "" "griffe.docstrings.dataclasses.DocstringSection"
This class represents a returns section.
Parameters:
-
value
(list[DocstringReturn]
) –The section returned items.
-
title
(str | None
, default:None
) –An optional title.
Methods:
-
as_dict
–Return this section's data as a dictionary.
Attributes:
-
kind
(DocstringSectionKind
) –The section kind.
-
title
(str | None
) –The section title.
-
value
(list[DocstringReturn]
) –The section value.
DocstringSectionText ¤
flowchart TD
griffe.docstrings.dataclasses.DocstringSectionText[DocstringSectionText]
griffe.docstrings.dataclasses.DocstringSection[DocstringSection]
griffe.docstrings.dataclasses.DocstringSection --> griffe.docstrings.dataclasses.DocstringSectionText
click griffe.docstrings.dataclasses.DocstringSectionText href "" "griffe.docstrings.dataclasses.DocstringSectionText"
click griffe.docstrings.dataclasses.DocstringSection href "" "griffe.docstrings.dataclasses.DocstringSection"
This class represents a text section.
Parameters:
Methods:
-
as_dict
–Return this section's data as a dictionary.
Attributes:
-
kind
(DocstringSectionKind
) –The section kind.
-
title
(str | None
) –The section title.
-
value
(str
) –The section value.
DocstringSectionWarns ¤
DocstringSectionWarns(
value: list[DocstringWarn], title: str | None = None
)
flowchart TD
griffe.docstrings.dataclasses.DocstringSectionWarns[DocstringSectionWarns]
griffe.docstrings.dataclasses.DocstringSection[DocstringSection]
griffe.docstrings.dataclasses.DocstringSection --> griffe.docstrings.dataclasses.DocstringSectionWarns
click griffe.docstrings.dataclasses.DocstringSectionWarns href "" "griffe.docstrings.dataclasses.DocstringSectionWarns"
click griffe.docstrings.dataclasses.DocstringSection href "" "griffe.docstrings.dataclasses.DocstringSection"
This class represents a warns section.
Parameters:
-
value
(list[DocstringWarn]
) –The section warnings.
-
title
(str | None
, default:None
) –An optional title.
Methods:
-
as_dict
–Return this section's data as a dictionary.
Attributes:
-
kind
(DocstringSectionKind
) –The section kind.
-
title
(str | None
) –The section title.
-
value
(list[DocstringWarn]
) –The section value.
DocstringSectionYields ¤
DocstringSectionYields(
value: list[DocstringYield], title: str | None = None
)
flowchart TD
griffe.docstrings.dataclasses.DocstringSectionYields[DocstringSectionYields]
griffe.docstrings.dataclasses.DocstringSection[DocstringSection]
griffe.docstrings.dataclasses.DocstringSection --> griffe.docstrings.dataclasses.DocstringSectionYields
click griffe.docstrings.dataclasses.DocstringSectionYields href "" "griffe.docstrings.dataclasses.DocstringSectionYields"
click griffe.docstrings.dataclasses.DocstringSection href "" "griffe.docstrings.dataclasses.DocstringSection"
This class represents a yields section.
Parameters:
-
value
(list[DocstringYield]
) –The section yielded items.
-
title
(str | None
, default:None
) –An optional title.
Methods:
-
as_dict
–Return this section's data as a dictionary.
Attributes:
-
kind
(DocstringSectionKind
) –The section kind.
-
title
(str | None
) –The section title.
-
value
(list[DocstringYield]
) –The section value.
DocstringWarn ¤
flowchart TD
griffe.docstrings.dataclasses.DocstringWarn[DocstringWarn]
griffe.docstrings.dataclasses.DocstringElement[DocstringElement]
griffe.docstrings.dataclasses.DocstringElement --> griffe.docstrings.dataclasses.DocstringWarn
click griffe.docstrings.dataclasses.DocstringWarn href "" "griffe.docstrings.dataclasses.DocstringWarn"
click griffe.docstrings.dataclasses.DocstringElement href "" "griffe.docstrings.dataclasses.DocstringElement"
This class represents a documented warn value.
Parameters:
-
annotation
(str | Expr | None
, default:None
) –The element annotation, if any.
-
description
(str
) –The element description.
Methods:
-
as_dict
–Return this element's data as a dictionary.
Attributes:
-
annotation
(str | Expr | None
) –The element annotation.
-
description
(str
) –The element description.
DocstringYield ¤
DocstringYield(
name: str,
*,
description: str,
annotation: str | Expr | None = None,
value: str | None = None
)
flowchart TD
griffe.docstrings.dataclasses.DocstringYield[DocstringYield]
griffe.docstrings.dataclasses.DocstringNamedElement[DocstringNamedElement]
griffe.docstrings.dataclasses.DocstringElement[DocstringElement]
griffe.docstrings.dataclasses.DocstringNamedElement --> griffe.docstrings.dataclasses.DocstringYield
griffe.docstrings.dataclasses.DocstringElement --> griffe.docstrings.dataclasses.DocstringNamedElement
click griffe.docstrings.dataclasses.DocstringYield href "" "griffe.docstrings.dataclasses.DocstringYield"
click griffe.docstrings.dataclasses.DocstringNamedElement href "" "griffe.docstrings.dataclasses.DocstringNamedElement"
click griffe.docstrings.dataclasses.DocstringElement href "" "griffe.docstrings.dataclasses.DocstringElement"
This class represents a documented yield value.
Parameters:
-
name
(str
) –The element name.
-
description
(str
) –The element description.
-
annotation
(str | Expr | None
, default:None
) –The element annotation, if any.
-
value
(str | None
, default:None
) –The element value, as a string.
Methods:
-
as_dict
–Return this element's data as a dictionary.
Attributes:
-
annotation
(str | Expr | None
) –The element annotation.
-
description
(str
) –The element description.
-
name
(str
) –The element name.
-
value
(str | None
) –The element value, if any