Skip to content

Translate tuple parameters through the list translator#891

Open
8rief wants to merge 1 commit into
nteract:mainfrom
8rief:fix/tuple-parameters-as-lists
Open

Translate tuple parameters through the list translator#891
8rief wants to merge 1 commit into
nteract:mainfrom
8rief:fix/tuple-parameters-as-lists

Conversation

@8rief

@8rief 8rief commented Jun 29, 2026

Copy link
Copy Markdown

What does this PR do?

Tuple parameter values currently fall through to the generic escaped-string translation path. This changes their type in generated parameter cells, including when a tuple is nested inside a dictionary.

This change routes tuples through the existing list translator. It preserves the tuple's values while producing the JSON-compatible list representation recommended in the issue discussion. A regression case covers a nested tuple matching the reported configuration shape.

Fixes #784

Verification

  • pytest papermill/tests/test_translators.py -k test_translate_type_python -q
  • pytest papermill/tests/test_translators.py -q
  • pytest -q
  • pre-commit run --files papermill/translators.py papermill/tests/test_translators.py

All 548 tests and the changed-file pre-commit hooks passed locally.

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.

Tuple in the config dictionary changed to string when run a python notebook with papermill

1 participant