| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
Sorry, something went wrong.
|
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
Sorry, something went wrong.
|
OK, I'll edit the commit message then to silence the bot. |
Sorry, something went wrong.
| cell_body = "$custom_query" | ||
|
|
||
| with pytest.raises( | ||
| NameError, match=r".*custom_query does not exist.*" |
There was a problem hiding this comment.
Maybe comment to indicate we're testing the first kind of error, as I got the regex string match from context of the other file.
Sorry, something went wrong.
There was a problem hiding this comment.
The name of the test explains which case it covers ("non-existing query variable"), do you think that's not sufficient by itself?
I always look at the name of the test first, although it might be just how my brain is wired...
Update: Added a comment next to the assignment to cell_body to explain which use case it targets.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM - I really like how you added the "non-existing query variable" condition.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM - could do with more comments on test cases, perhaps.
Sorry, something went wrong.
| cell_body = "$custom_query" | ||
|
|
||
| with pytest.raises( | ||
| TypeError, match=r".*must be a string or a bytes-like.*" |
There was a problem hiding this comment.
Might be good to have another comment here to match it to the other else condition in run_query_magic
Sorry, something went wrong.
|
LGTM - appreciate the changes!! |
Sorry, something went wrong.
* feat: allow cell magic body to be a $variable * Fix missing indefinitive article in error msg * Adjust test assertion to error message change * Refactor logic for extracting query variable * Explicitly warn about missing query variable name * Thest the query "variable" is not identifier case
| Back | FazBrowse Home | New Git URL |
Closes #1040.
Thought - we probably want to follow up with a sample demonstrating this new use case.
Also, the length of the _cell_magic() function should be ignored for now, it's been waiting to be split into smaller units since forever. 🙂
PR checklist: