Skip to content

Accept list args in ctx.install_packages#8703

Merged
manzt merged 2 commits intomainfrom
push-onpvzulvyspz
Mar 16, 2026
Merged

Accept list args in ctx.install_packages#8703
manzt merged 2 commits intomainfrom
push-onpvzulvyspz

Conversation

@manzt
Copy link
Collaborator

@manzt manzt commented Mar 16, 2026

I've seen this hallucinated a couple times in code_mode sessions. install_packages now accepts both *args and a list/tuple so ctx.install_packages(["foo", "bar"]) works alongside the existing ctx.install_packages("foo", "bar").

I've seen this hallucinated a couple times in code_mode sessions.
`install_packages` now accepts both `*args` and a list/tuple so
`ctx.install_packages(["foo", "bar"])` works alongside the existing
`ctx.install_packages("foo", "bar")`.
Copilot AI review requested due to automatic review settings March 16, 2026 12:43
@vercel
Copy link

vercel bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marimo-docs Ready Ready Preview, Comment Mar 16, 2026 0:46am

Request Review

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR expands the AsyncCodeModeContext.install_packages API to support passing a list/tuple of package specifiers (in addition to individual string args), flattening the input into the queued installation list.

Changes:

  • Broaden install_packages type signature to accept str, list[str], and tuple[str, ...] as varargs items.
  • Flatten list/tuple inputs into _packages_to_install.
  • Update docstring examples and argument documentation to reflect the new calling form.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1026 to +1027
self._packages_to_install.extend(pkg)
else:
@manzt manzt merged commit 3c15580 into main Mar 16, 2026
42 of 43 checks passed
@manzt manzt deleted the push-onpvzulvyspz branch March 16, 2026 16:51
@github-actions
Copy link

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.20.5-dev77

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants