Skip to content

Naming things: OutlineItems.to_dict() is semantically wrong #55

@amotl

Description

@amotl

Problem

The method name to_dict() here is obviously wrong, because the method returns a list type.

class OutlineItems(list):
    """List of `OutlineItem` elements, including additional features"""

    def to_dict(self):
        return [item.to_dict() for item in self]

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions