Skip to content

Fix parameter inspection for defaults containing equals#897

Open
paranoa233 wants to merge 1 commit into
nteract:mainfrom
paranoa233:fix-parameter-string-equals
Open

Fix parameter inspection for defaults containing equals#897
paranoa233 wants to merge 1 commit into
nteract:mainfrom
paranoa233:fix-parameter-string-equals

Conversation

@paranoa233

Copy link
Copy Markdown

Summary

  • Use Python tokenization when inspecting parameter cells so = inside string literals or nested calls is not mistaken for another assignment.
  • Preserve the existing behavior of skipping non-introspectable top-level comparisons and multiple assignments.
  • Add regression coverage for msg = a=b and execution-time unknown-parameter warnings.

Fixes #864

Tests

  • .\.venv\Scripts\python.exe -m pytest papermill/tests/test_translators.py papermill/tests/test_inspect.py papermill/tests/test_execute.py::TestNotebookHelpers -q (297 passed)
  • Attempted broader local suite. Full collection needs missing optional cloud deps (azure, boto3); excluding those, 513 passed with 6 environment/backend failures in unrelated GCS/HDFS/kernel-output tests.

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.

Parameter strings cannot contain "="

1 participant