Skip to content

API checks¤

find_breaking_changes ¤

find_breaking_changes(
    old_obj: Object | Alias, new_obj: Object | Alias
) -> Iterator[Breakage]

Find breaking changes between two versions of the same API.

The function will iterate recursively on all objects and yield breaking changes with detailed information.

Parameters:

Yields:

Examples:

>>> import sys, griffe
>>> new = griffe.load("pkg")
>>> old = griffe.load_git("pkg", "1.2.3")
>>> for breakage in griffe.find_breaking_changes(old, new)
...     print(breakage.explain(style=style), file=sys.stderr)

ExplanationStyle ¤


              flowchart TD
              griffe.ExplanationStyle[ExplanationStyle]

              

              click griffe.ExplanationStyle href "" "griffe.ExplanationStyle"
            

Enumeration of the possible styles for explanations.

Attributes:

  • GITHUB (str) –

    Explanation as GitHub workflow commands warnings, adapted to CI.

  • MARKDOWN (str) –

    Explanations in Markdown, adapted to changelogs.

  • ONE_LINE (str) –

    Explanations on one-line.

  • VERBOSE (str) –

    Explanations on multiple lines.

GITHUB class-attribute instance-attribute ¤

GITHUB: str = 'github'

Explanation as GitHub workflow commands warnings, adapted to CI.

MARKDOWN class-attribute instance-attribute ¤

MARKDOWN: str = 'markdown'

Explanations in Markdown, adapted to changelogs.

ONE_LINE class-attribute instance-attribute ¤

ONE_LINE: str = 'oneline'

Explanations on one-line.

VERBOSE class-attribute instance-attribute ¤

VERBOSE: str = 'verbose'

Explanations on multiple lines.

Breakage ¤

Breakage(
    obj: Object,
    old_value: Any,
    new_value: Any,
    details: str = "",
)

Breakages can explain what broke from a version to another.

Parameters:

  • obj ¤

    (Object) –

    The object related to the breakage.

  • old_value ¤

    (Any) –

    The old value.

  • new_value ¤

    (Any) –

    The new, incompatible value.

  • details ¤

    (str, default: '' ) –

    Some details about the breakage.

Methods:

  • as_dict

    Return this object's data as a dictionary.

  • explain

    Explain the breakage by showing old and new value.

Attributes:

details instance-attribute ¤

details = details

Some details about the breakage.

kind instance-attribute ¤

The kind of breakage.

new_value instance-attribute ¤

new_value = new_value

The new, incompatible value.

obj instance-attribute ¤

obj = obj

The object related to the breakage.

old_value instance-attribute ¤

old_value = old_value

The old value.

as_dict ¤

as_dict(
    *, full: bool = False, **kwargs: Any
) -> dict[str, Any]

Return this object's data as a dictionary.

Parameters:

  • full ¤

    (bool, default: False ) –

    Whether to return full info, or just base info.

  • **kwargs ¤

    (Any, default: {} ) –

    Additional serialization options.

Returns:

explain ¤

Explain the breakage by showing old and new value.

Parameters:

Returns:

  • str

    An explanation.

BreakageKind ¤


              flowchart TD
              griffe.BreakageKind[BreakageKind]

              

              click griffe.BreakageKind href "" "griffe.BreakageKind"
            

Enumeration of the possible API breakages.

Attributes:

ATTRIBUTE_CHANGED_TYPE class-attribute instance-attribute ¤

ATTRIBUTE_CHANGED_TYPE: str = (
    "Attribute types are incompatible"
)

Attribute types are incompatible

ATTRIBUTE_CHANGED_VALUE class-attribute instance-attribute ¤

ATTRIBUTE_CHANGED_VALUE: str = "Attribute value was changed"

Attribute value was changed

CLASS_REMOVED_BASE class-attribute instance-attribute ¤

CLASS_REMOVED_BASE: str = 'Base class was removed'

Base class was removed

OBJECT_CHANGED_KIND class-attribute instance-attribute ¤

OBJECT_CHANGED_KIND: str = (
    "Public object points to a different kind of object"
)

Public object points to a different kind of object

OBJECT_REMOVED class-attribute instance-attribute ¤

OBJECT_REMOVED: str = 'Public object was removed'

Public object was removed

PARAMETER_ADDED_REQUIRED class-attribute instance-attribute ¤

PARAMETER_ADDED_REQUIRED: str = (
    "Parameter was added as required"
)

Parameter was added as required

PARAMETER_CHANGED_DEFAULT class-attribute instance-attribute ¤

PARAMETER_CHANGED_DEFAULT: str = (
    "Parameter default was changed"
)

Parameter default was changed

PARAMETER_CHANGED_KIND class-attribute instance-attribute ¤

PARAMETER_CHANGED_KIND: str = 'Parameter kind was changed'

Parameter kind was changed

PARAMETER_CHANGED_REQUIRED class-attribute instance-attribute ¤

PARAMETER_CHANGED_REQUIRED: str = (
    "Parameter is now required"
)

Parameter is now required

PARAMETER_MOVED class-attribute instance-attribute ¤

PARAMETER_MOVED: str = 'Positional parameter was moved'

Positional parameter was moved

PARAMETER_REMOVED class-attribute instance-attribute ¤

PARAMETER_REMOVED: str = 'Parameter was removed'

Parameter was removed

RETURN_CHANGED_TYPE class-attribute instance-attribute ¤

RETURN_CHANGED_TYPE: str = 'Return types are incompatible'

Return types are incompatible

AttributeChangedTypeBreakage ¤

AttributeChangedTypeBreakage(
    obj: Object,
    old_value: Any,
    new_value: Any,
    details: str = "",
)

              flowchart TD
              griffe.AttributeChangedTypeBreakage[AttributeChangedTypeBreakage]
              _griffe.diff.Breakage[Breakage]

                              _griffe.diff.Breakage --> griffe.AttributeChangedTypeBreakage
                


              click griffe.AttributeChangedTypeBreakage href "" "griffe.AttributeChangedTypeBreakage"
              click _griffe.diff.Breakage href "" "_griffe.diff.Breakage"
            

Specific breakage class for attributes whose type changed.

Parameters:

  • obj ¤

    (Object) –

    The object related to the breakage.

  • old_value ¤

    (Any) –

    The old value.

  • new_value ¤

    (Any) –

    The new, incompatible value.

  • details ¤

    (str, default: '' ) –

    Some details about the breakage.

Methods:

  • as_dict

    Return this object's data as a dictionary.

  • explain

    Explain the breakage by showing old and new value.

Attributes:

details instance-attribute ¤

details = details

Some details about the breakage.

kind class-attribute instance-attribute ¤

The kind of breakage.

new_value instance-attribute ¤

new_value = new_value

The new, incompatible value.

obj instance-attribute ¤

obj = obj

The object related to the breakage.

old_value instance-attribute ¤

old_value = old_value

The old value.

as_dict ¤

as_dict(
    *, full: bool = False, **kwargs: Any
) -> dict[str, Any]

Return this object's data as a dictionary.

Parameters:

  • full ¤

    (bool, default: False ) –

    Whether to return full info, or just base info.

  • **kwargs ¤

    (Any, default: {} ) –

    Additional serialization options.

Returns:

explain ¤

Explain the breakage by showing old and new value.

Parameters:

Returns:

  • str

    An explanation.

AttributeChangedValueBreakage ¤

AttributeChangedValueBreakage(
    obj: Object,
    old_value: Any,
    new_value: Any,
    details: str = "",
)

              flowchart TD
              griffe.AttributeChangedValueBreakage[AttributeChangedValueBreakage]
              _griffe.diff.Breakage[Breakage]

                              _griffe.diff.Breakage --> griffe.AttributeChangedValueBreakage
                


              click griffe.AttributeChangedValueBreakage href "" "griffe.AttributeChangedValueBreakage"
              click _griffe.diff.Breakage href "" "_griffe.diff.Breakage"
            

Specific breakage class for attributes whose value changed.

Parameters:

  • obj ¤

    (Object) –

    The object related to the breakage.

  • old_value ¤

    (Any) –

    The old value.

  • new_value ¤

    (Any) –

    The new, incompatible value.

  • details ¤

    (str, default: '' ) –

    Some details about the breakage.

Methods:

  • as_dict

    Return this object's data as a dictionary.

  • explain

    Explain the breakage by showing old and new value.

Attributes:

details instance-attribute ¤

details = details

Some details about the breakage.

kind class-attribute instance-attribute ¤

The kind of breakage.

new_value instance-attribute ¤

new_value = new_value

The new, incompatible value.

obj instance-attribute ¤

obj = obj

The object related to the breakage.

old_value instance-attribute ¤

old_value = old_value

The old value.

as_dict ¤

as_dict(
    *, full: bool = False, **kwargs: Any
) -> dict[str, Any]

Return this object's data as a dictionary.

Parameters:

  • full ¤

    (bool, default: False ) –

    Whether to return full info, or just base info.

  • **kwargs ¤

    (Any, default: {} ) –

    Additional serialization options.

Returns:

explain ¤

Explain the breakage by showing old and new value.

Parameters:

Returns:

  • str

    An explanation.

ClassRemovedBaseBreakage ¤

ClassRemovedBaseBreakage(
    obj: Object,
    old_value: Any,
    new_value: Any,
    details: str = "",
)

              flowchart TD
              griffe.ClassRemovedBaseBreakage[ClassRemovedBaseBreakage]
              _griffe.diff.Breakage[Breakage]

                              _griffe.diff.Breakage --> griffe.ClassRemovedBaseBreakage
                


              click griffe.ClassRemovedBaseBreakage href "" "griffe.ClassRemovedBaseBreakage"
              click _griffe.diff.Breakage href "" "_griffe.diff.Breakage"
            

Specific breakage class for removed base classes.

Parameters:

  • obj ¤

    (Object) –

    The object related to the breakage.

  • old_value ¤

    (Any) –

    The old value.

  • new_value ¤

    (Any) –

    The new, incompatible value.

  • details ¤

    (str, default: '' ) –

    Some details about the breakage.

Methods:

  • as_dict

    Return this object's data as a dictionary.

  • explain

    Explain the breakage by showing old and new value.

Attributes:

details instance-attribute ¤

details = details

Some details about the breakage.

kind class-attribute instance-attribute ¤

The kind of breakage.

new_value instance-attribute ¤

new_value = new_value

The new, incompatible value.

obj instance-attribute ¤

obj = obj

The object related to the breakage.

old_value instance-attribute ¤

old_value = old_value

The old value.

as_dict ¤

as_dict(
    *, full: bool = False, **kwargs: Any
) -> dict[str, Any]

Return this object's data as a dictionary.

Parameters:

  • full ¤

    (bool, default: False ) –

    Whether to return full info, or just base info.

  • **kwargs ¤

    (Any, default: {} ) –

    Additional serialization options.

Returns:

explain ¤

Explain the breakage by showing old and new value.

Parameters:

Returns:

  • str

    An explanation.

ObjectChangedKindBreakage ¤

ObjectChangedKindBreakage(
    obj: Object,
    old_value: Any,
    new_value: Any,
    details: str = "",
)

              flowchart TD
              griffe.ObjectChangedKindBreakage[ObjectChangedKindBreakage]
              _griffe.diff.Breakage[Breakage]

                              _griffe.diff.Breakage --> griffe.ObjectChangedKindBreakage
                


              click griffe.ObjectChangedKindBreakage href "" "griffe.ObjectChangedKindBreakage"
              click _griffe.diff.Breakage href "" "_griffe.diff.Breakage"
            

Specific breakage class for objects whose kind changed.

Parameters:

  • obj ¤

    (Object) –

    The object related to the breakage.

  • old_value ¤

    (Any) –

    The old value.

  • new_value ¤

    (Any) –

    The new, incompatible value.

  • details ¤

    (str, default: '' ) –

    Some details about the breakage.

Methods:

  • as_dict

    Return this object's data as a dictionary.

  • explain

    Explain the breakage by showing old and new value.

Attributes:

details instance-attribute ¤

details = details

Some details about the breakage.

kind class-attribute instance-attribute ¤

The kind of breakage.

new_value instance-attribute ¤

new_value = new_value

The new, incompatible value.

obj instance-attribute ¤

obj = obj

The object related to the breakage.

old_value instance-attribute ¤

old_value = old_value

The old value.

as_dict ¤

as_dict(
    *, full: bool = False, **kwargs: Any
) -> dict[str, Any]

Return this object's data as a dictionary.

Parameters:

  • full ¤

    (bool, default: False ) –

    Whether to return full info, or just base info.

  • **kwargs ¤

    (Any, default: {} ) –

    Additional serialization options.

Returns:

explain ¤

Explain the breakage by showing old and new value.

Parameters:

Returns:

  • str

    An explanation.

ObjectRemovedBreakage ¤

ObjectRemovedBreakage(
    obj: Object,
    old_value: Any,
    new_value: Any,
    details: str = "",
)

              flowchart TD
              griffe.ObjectRemovedBreakage[ObjectRemovedBreakage]
              _griffe.diff.Breakage[Breakage]

                              _griffe.diff.Breakage --> griffe.ObjectRemovedBreakage
                


              click griffe.ObjectRemovedBreakage href "" "griffe.ObjectRemovedBreakage"
              click _griffe.diff.Breakage href "" "_griffe.diff.Breakage"
            

Specific breakage class for removed objects.

Parameters:

  • obj ¤

    (Object) –

    The object related to the breakage.

  • old_value ¤

    (Any) –

    The old value.

  • new_value ¤

    (Any) –

    The new, incompatible value.

  • details ¤

    (str, default: '' ) –

    Some details about the breakage.

Methods:

  • as_dict

    Return this object's data as a dictionary.

  • explain

    Explain the breakage by showing old and new value.

Attributes:

details instance-attribute ¤

details = details

Some details about the breakage.

kind class-attribute instance-attribute ¤

The kind of breakage.

new_value instance-attribute ¤

new_value = new_value

The new, incompatible value.

obj instance-attribute ¤

obj = obj

The object related to the breakage.

old_value instance-attribute ¤

old_value = old_value

The old value.

as_dict ¤

as_dict(
    *, full: bool = False, **kwargs: Any
) -> dict[str, Any]

Return this object's data as a dictionary.

Parameters:

  • full ¤

    (bool, default: False ) –

    Whether to return full info, or just base info.

  • **kwargs ¤

    (Any, default: {} ) –

    Additional serialization options.

Returns:

explain ¤

Explain the breakage by showing old and new value.

Parameters:

Returns:

  • str

    An explanation.

ParameterAddedRequiredBreakage ¤

ParameterAddedRequiredBreakage(
    obj: Object,
    old_value: Any,
    new_value: Any,
    details: str = "",
)

              flowchart TD
              griffe.ParameterAddedRequiredBreakage[ParameterAddedRequiredBreakage]
              _griffe.diff.Breakage[Breakage]

                              _griffe.diff.Breakage --> griffe.ParameterAddedRequiredBreakage
                


              click griffe.ParameterAddedRequiredBreakage href "" "griffe.ParameterAddedRequiredBreakage"
              click _griffe.diff.Breakage href "" "_griffe.diff.Breakage"
            

Specific breakage class for new parameters added as required.

Parameters:

  • obj ¤

    (Object) –

    The object related to the breakage.

  • old_value ¤

    (Any) –

    The old value.

  • new_value ¤

    (Any) –

    The new, incompatible value.

  • details ¤

    (str, default: '' ) –

    Some details about the breakage.

Methods:

  • as_dict

    Return this object's data as a dictionary.

  • explain

    Explain the breakage by showing old and new value.

Attributes:

details instance-attribute ¤

details = details

Some details about the breakage.

kind class-attribute instance-attribute ¤

The kind of breakage.

new_value instance-attribute ¤

new_value = new_value

The new, incompatible value.

obj instance-attribute ¤

obj = obj

The object related to the breakage.

old_value instance-attribute ¤

old_value = old_value

The old value.

as_dict ¤

as_dict(
    *, full: bool = False, **kwargs: Any
) -> dict[str, Any]

Return this object's data as a dictionary.

Parameters:

  • full ¤

    (bool, default: False ) –

    Whether to return full info, or just base info.

  • **kwargs ¤

    (Any, default: {} ) –

    Additional serialization options.

Returns:

explain ¤

Explain the breakage by showing old and new value.

Parameters:

Returns:

  • str

    An explanation.

ParameterChangedDefaultBreakage ¤

ParameterChangedDefaultBreakage(
    obj: Object,
    old_value: Any,
    new_value: Any,
    details: str = "",
)

              flowchart TD
              griffe.ParameterChangedDefaultBreakage[ParameterChangedDefaultBreakage]
              _griffe.diff.Breakage[Breakage]

                              _griffe.diff.Breakage --> griffe.ParameterChangedDefaultBreakage
                


              click griffe.ParameterChangedDefaultBreakage href "" "griffe.ParameterChangedDefaultBreakage"
              click _griffe.diff.Breakage href "" "_griffe.diff.Breakage"
            

Specific breakage class for parameters whose default value changed.

Parameters:

  • obj ¤

    (Object) –

    The object related to the breakage.

  • old_value ¤

    (Any) –

    The old value.

  • new_value ¤

    (Any) –

    The new, incompatible value.

  • details ¤

    (str, default: '' ) –

    Some details about the breakage.

Methods:

  • as_dict

    Return this object's data as a dictionary.

  • explain

    Explain the breakage by showing old and new value.

Attributes:

details instance-attribute ¤

details = details

Some details about the breakage.

kind class-attribute instance-attribute ¤

The kind of breakage.

new_value instance-attribute ¤

new_value = new_value

The new, incompatible value.

obj instance-attribute ¤

obj = obj

The object related to the breakage.

old_value instance-attribute ¤

old_value = old_value

The old value.

as_dict ¤

as_dict(
    *, full: bool = False, **kwargs: Any
) -> dict[str, Any]

Return this object's data as a dictionary.

Parameters:

  • full ¤

    (bool, default: False ) –

    Whether to return full info, or just base info.

  • **kwargs ¤

    (Any, default: {} ) –

    Additional serialization options.

Returns:

explain ¤

Explain the breakage by showing old and new value.

Parameters:

Returns:

  • str

    An explanation.

ParameterChangedKindBreakage ¤

ParameterChangedKindBreakage(
    obj: Object,
    old_value: Any,
    new_value: Any,
    details: str = "",
)

              flowchart TD
              griffe.ParameterChangedKindBreakage[ParameterChangedKindBreakage]
              _griffe.diff.Breakage[Breakage]

                              _griffe.diff.Breakage --> griffe.ParameterChangedKindBreakage
                


              click griffe.ParameterChangedKindBreakage href "" "griffe.ParameterChangedKindBreakage"
              click _griffe.diff.Breakage href "" "_griffe.diff.Breakage"
            

Specific breakage class for parameters whose kind changed.

Parameters:

  • obj ¤

    (Object) –

    The object related to the breakage.

  • old_value ¤

    (Any) –

    The old value.

  • new_value ¤

    (Any) –

    The new, incompatible value.

  • details ¤

    (str, default: '' ) –

    Some details about the breakage.

Methods:

  • as_dict

    Return this object's data as a dictionary.

  • explain

    Explain the breakage by showing old and new value.

Attributes:

details instance-attribute ¤

details = details

Some details about the breakage.

kind class-attribute instance-attribute ¤

The kind of breakage.

new_value instance-attribute ¤

new_value = new_value

The new, incompatible value.

obj instance-attribute ¤

obj = obj

The object related to the breakage.

old_value instance-attribute ¤

old_value = old_value

The old value.

as_dict ¤

as_dict(
    *, full: bool = False, **kwargs: Any
) -> dict[str, Any]

Return this object's data as a dictionary.

Parameters:

  • full ¤

    (bool, default: False ) –

    Whether to return full info, or just base info.

  • **kwargs ¤

    (Any, default: {} ) –

    Additional serialization options.

Returns:

explain ¤

Explain the breakage by showing old and new value.

Parameters:

Returns:

  • str

    An explanation.

ParameterChangedRequiredBreakage ¤

ParameterChangedRequiredBreakage(
    obj: Object,
    old_value: Any,
    new_value: Any,
    details: str = "",
)

              flowchart TD
              griffe.ParameterChangedRequiredBreakage[ParameterChangedRequiredBreakage]
              _griffe.diff.Breakage[Breakage]

                              _griffe.diff.Breakage --> griffe.ParameterChangedRequiredBreakage
                


              click griffe.ParameterChangedRequiredBreakage href "" "griffe.ParameterChangedRequiredBreakage"
              click _griffe.diff.Breakage href "" "_griffe.diff.Breakage"
            

Specific breakage class for parameters which became required.

Parameters:

  • obj ¤

    (Object) –

    The object related to the breakage.

  • old_value ¤

    (Any) –

    The old value.

  • new_value ¤

    (Any) –

    The new, incompatible value.

  • details ¤

    (str, default: '' ) –

    Some details about the breakage.

Methods:

  • as_dict

    Return this object's data as a dictionary.

  • explain

    Explain the breakage by showing old and new value.

Attributes:

details instance-attribute ¤

details = details

Some details about the breakage.

kind class-attribute instance-attribute ¤

The kind of breakage.

new_value instance-attribute ¤

new_value = new_value

The new, incompatible value.

obj instance-attribute ¤

obj = obj

The object related to the breakage.

old_value instance-attribute ¤

old_value = old_value

The old value.

as_dict ¤

as_dict(
    *, full: bool = False, **kwargs: Any
) -> dict[str, Any]

Return this object's data as a dictionary.

Parameters:

  • full ¤

    (bool, default: False ) –

    Whether to return full info, or just base info.

  • **kwargs ¤

    (Any, default: {} ) –

    Additional serialization options.

Returns:

explain ¤

Explain the breakage by showing old and new value.

Parameters:

Returns:

  • str

    An explanation.

ParameterMovedBreakage ¤

ParameterMovedBreakage(
    obj: Object,
    old_value: Any,
    new_value: Any,
    details: str = "",
)

              flowchart TD
              griffe.ParameterMovedBreakage[ParameterMovedBreakage]
              _griffe.diff.Breakage[Breakage]

                              _griffe.diff.Breakage --> griffe.ParameterMovedBreakage
                


              click griffe.ParameterMovedBreakage href "" "griffe.ParameterMovedBreakage"
              click _griffe.diff.Breakage href "" "_griffe.diff.Breakage"
            

Specific breakage class for moved parameters.

Parameters:

  • obj ¤

    (Object) –

    The object related to the breakage.

  • old_value ¤

    (Any) –

    The old value.

  • new_value ¤

    (Any) –

    The new, incompatible value.

  • details ¤

    (str, default: '' ) –

    Some details about the breakage.

Methods:

  • as_dict

    Return this object's data as a dictionary.

  • explain

    Explain the breakage by showing old and new value.

Attributes:

details instance-attribute ¤

details = details

Some details about the breakage.

kind class-attribute instance-attribute ¤

The kind of breakage.

new_value instance-attribute ¤

new_value = new_value

The new, incompatible value.

obj instance-attribute ¤

obj = obj

The object related to the breakage.

old_value instance-attribute ¤

old_value = old_value

The old value.

as_dict ¤

as_dict(
    *, full: bool = False, **kwargs: Any
) -> dict[str, Any]

Return this object's data as a dictionary.

Parameters:

  • full ¤

    (bool, default: False ) –

    Whether to return full info, or just base info.

  • **kwargs ¤

    (Any, default: {} ) –

    Additional serialization options.

Returns:

explain ¤

Explain the breakage by showing old and new value.

Parameters:

Returns:

  • str

    An explanation.

ParameterRemovedBreakage ¤

ParameterRemovedBreakage(
    obj: Object,
    old_value: Any,
    new_value: Any,
    details: str = "",
)

              flowchart TD
              griffe.ParameterRemovedBreakage[ParameterRemovedBreakage]
              _griffe.diff.Breakage[Breakage]

                              _griffe.diff.Breakage --> griffe.ParameterRemovedBreakage
                


              click griffe.ParameterRemovedBreakage href "" "griffe.ParameterRemovedBreakage"
              click _griffe.diff.Breakage href "" "_griffe.diff.Breakage"
            

Specific breakage class for removed parameters.

Parameters:

  • obj ¤

    (Object) –

    The object related to the breakage.

  • old_value ¤

    (Any) –

    The old value.

  • new_value ¤

    (Any) –

    The new, incompatible value.

  • details ¤

    (str, default: '' ) –

    Some details about the breakage.

Methods:

  • as_dict

    Return this object's data as a dictionary.

  • explain

    Explain the breakage by showing old and new value.

Attributes:

details instance-attribute ¤

details = details

Some details about the breakage.

kind class-attribute instance-attribute ¤

The kind of breakage.

new_value instance-attribute ¤

new_value = new_value

The new, incompatible value.

obj instance-attribute ¤

obj = obj

The object related to the breakage.

old_value instance-attribute ¤

old_value = old_value

The old value.

as_dict ¤

as_dict(
    *, full: bool = False, **kwargs: Any
) -> dict[str, Any]

Return this object's data as a dictionary.

Parameters:

  • full ¤

    (bool, default: False ) –

    Whether to return full info, or just base info.

  • **kwargs ¤

    (Any, default: {} ) –

    Additional serialization options.

Returns:

explain ¤

Explain the breakage by showing old and new value.

Parameters:

Returns:

  • str

    An explanation.

ReturnChangedTypeBreakage ¤

ReturnChangedTypeBreakage(
    obj: Object,
    old_value: Any,
    new_value: Any,
    details: str = "",
)

              flowchart TD
              griffe.ReturnChangedTypeBreakage[ReturnChangedTypeBreakage]
              _griffe.diff.Breakage[Breakage]

                              _griffe.diff.Breakage --> griffe.ReturnChangedTypeBreakage
                


              click griffe.ReturnChangedTypeBreakage href "" "griffe.ReturnChangedTypeBreakage"
              click _griffe.diff.Breakage href "" "_griffe.diff.Breakage"
            

Specific breakage class for return values which changed type.

Parameters:

  • obj ¤

    (Object) –

    The object related to the breakage.

  • old_value ¤

    (Any) –

    The old value.

  • new_value ¤

    (Any) –

    The new, incompatible value.

  • details ¤

    (str, default: '' ) –

    Some details about the breakage.

Methods:

  • as_dict

    Return this object's data as a dictionary.

  • explain

    Explain the breakage by showing old and new value.

Attributes:

details instance-attribute ¤

details = details

Some details about the breakage.

kind class-attribute instance-attribute ¤

The kind of breakage.

new_value instance-attribute ¤

new_value = new_value

The new, incompatible value.

obj instance-attribute ¤

obj = obj

The object related to the breakage.

old_value instance-attribute ¤

old_value = old_value

The old value.

as_dict ¤

as_dict(
    *, full: bool = False, **kwargs: Any
) -> dict[str, Any]

Return this object's data as a dictionary.

Parameters:

  • full ¤

    (bool, default: False ) –

    Whether to return full info, or just base info.

  • **kwargs ¤

    (Any, default: {} ) –

    Additional serialization options.

Returns:

explain ¤

Explain the breakage by showing old and new value.

Parameters:

Returns:

  • str

    An explanation.