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
Parameter parsing fails for strings containing =
character
#772
Comments
For now it's a constraint of the implementation it seems. We could improve that '=' check to check after doing quoted string capture groups to get around it. But someone would need to write a fairly good suite of unittests to ensure it works correctly in all cases (harder problem to get right than it may seem). |
Hello, would it be possible to use the built-in ast package to parse the python code? I saw some comments from ~2020 about this not being compatible with other languages, but I would argue it's a safer approach than the regex version and would catch corner cases that are not yet properly supported by the regex, such as the one shared here or if the type provided contains a "." (cf sample below) Sample parameter cell
Sample parsing code:
I get the following output:
@MSeal: if that would be of interest to you, I can propose a PR for this :) |
Hello there! I'm using Papermill to automate some Jupyter notebook execution and I think I may have caught a potential bug: when running Papermill using strings containing a
=
character as the default parameter, the parser fails.I get an error that looks like the following, but anonymized:
After a little digging, I think this is because of the following code in translators.py:
Since my
parameter
has=
characters in it,nequal > 1 == True
and we run into the warning.Is this a desired behavior? i.e., is it expected that there should not be any
=
within default strong parameters?Or are there plans to enable parameterization of strings containing
=
as defaults?Thank you!
The text was updated successfully, but these errors were encountered: