Skip to content

fix: Document.parts() returns [] instead of raising NotImplementedError#637

Merged
jakelorocco merged 1 commit into
generative-computing:mainfrom
planetf1:fix/document-parts-636
Mar 13, 2026
Merged

fix: Document.parts() returns [] instead of raising NotImplementedError#637
jakelorocco merged 1 commit into
generative-computing:mainfrom
planetf1:fix/document-parts-636

Conversation

@planetf1
Copy link
Copy Markdown
Contributor

@planetf1 planetf1 commented Mar 13, 2026

Type of PR

  • Bug Fix
  • New Feature
  • Documentation
  • Other

Description

Document.parts() raises NotImplementedError instead of returning an empty list, causing crashes when a Document is passed inside a Message to act()/aact() via generate_walk().

Returns [] to match the pattern used by RichDocument and Table.

Closes #636

Testing

  • Tests added to the respective file if code was changed
  • New code has 100% coverage if code as added
  • Ensure existing tests and github automation passes (a maintainer will kick off the github automation when the rest of the PR is populated)

@planetf1 planetf1 requested review from a team, jakelorocco and nrfulton as code owners March 13, 2026 08:57
@mergify
Copy link
Copy Markdown

mergify Bot commented Mar 13, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|release)(?:\(.+\))?:

Copy link
Copy Markdown
Contributor

@jakelorocco jakelorocco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm; I think you built off the branch for #619. Not sure if you will have to do anything to resolve that. Please ensure the other one is approved and merged before this one.

@planetf1 planetf1 force-pushed the fix/document-parts-636 branch from 6c75b19 to 402b448 Compare March 13, 2026 13:32
@planetf1 planetf1 force-pushed the fix/document-parts-636 branch from 402b448 to 0a8c736 Compare March 13, 2026 13:33
@planetf1
Copy link
Copy Markdown
Contributor Author

lgtm; I think you built off the branch for #619. Not sure if you will have to do anything to resolve that. Please ensure the other one is approved and merged before this one.

ah. yes - found it when working on the docs & didn't rebase on main

Fixed

@planetf1 planetf1 enabled auto-merge March 13, 2026 13:35
@planetf1 planetf1 added this pull request to the merge queue Mar 13, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Mar 13, 2026
@jakelorocco jakelorocco added this pull request to the merge queue Mar 13, 2026
Merged via the queue into generative-computing:main with commit 3888476 Mar 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants