Skip to content

Document.parts() raises NotImplementedError instead of returning empty list #636

Closed

Description

@planetf1

Document in mellea/stdlib/components/docs/document.py is a concrete class that users instantiate directly, but parts() raises NotImplementedError (inherited stub from the Component Protocol).

When a Document is passed inside a Message to act()/aact(), the framework calls generate_walk() → parts() → crash.

The sibling RichDocument handles this correctly by returning [].

Suggested fix: Document.parts() should return [] (or [CBlock(self.text)]).

Found during PR #601 review — see review comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdocumentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions