Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python parameter with None | union type is logged as unknown #806

Open
calbach opened this issue Sep 5, 2024 · 0 comments
Open

Python parameter with None | union type is logged as unknown #806

calbach opened this issue Sep 5, 2024 · 0 comments

Comments

@calbach
Copy link

calbach commented Sep 5, 2024

🐛 Bug

# template.ipynb parameters block
foo: None|str = None
$ papermill -p foo BAR ...
Passed unknown parameter: foo

Expected: this warning not to show up, foo should be recognized as a valid parameter.

Also note:

  • Despite the warning, the above example still properly injects the parameter value
  • Optional[str] does not suffer from this issue, just type union style
  • str|None (change the type order) produces the same warning log

papermill version == 2.6.0

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

No branches or pull requests

1 participant