nteract/papermill

Parameter docstring does not show in `--help-notebook` if it contains equal sign (`=`)

Open

#721 opened on Apr 25, 2023

 (0 comments) (0 reactions) (0 assignees)Python (402 forks)batch import
bughelp wanted

Repository metrics

Stars
 (5,381 stars)
PR merge metrics
 (PR metrics pending)

Description

🐛 Bug

If I create a notebook with some parameter and a docstring to be shown by --help-notebook:

image

papermill --help-notebook example.ipynb 
Usage: papermill [OPTIONS] NOTEBOOK_PATH [OUTPUT_PATH]

Parameters inferred for notebook 'example.ipynb':
  alpha: float (default 0.5)      Alpha value
  n_jobs: int (default 1)         Number of workers to launch

But if the docstring of the parameter contains =, --help-notebook does not show it:

image

papermill --help-notebook example.ipynb 
Usage: papermill [OPTIONS] NOTEBOOK_PATH [OUTPUT_PATH]

Parameters inferred for notebook 'example.ipynb':
  alpha: float (default 0.5)      Alpha value

papermill version 2.4.0

Contributor guide