-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Multiline terminal command isn't processed properly #657
Comments
I have had an almost identical error with this file and in addition |
Can't reproduce either example with the latest version (1.1.0): (venv) marcogorelli@OVMG025 mcve % cat Untitled.ipynb
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "f013878e-4ee4-4d12-ba40-2afac49d4c29",
"metadata": {},
"outputs": [],
"source": [
"!bq \\\n",
"--location=US load \\\n",
"--autodetect \\\n",
"--skip_leading_rows=1 \\\n",
"--source_format=CSV \\\n",
"{dataset_id}.us_states_local_file \\\n",
"'resources/us-states.csv'\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "good-bayesian",
"language": "python",
"name": "good-bayesian"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.4"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
(venv) marcogorelli@OVMG025 mcve % nbqa black Untitled.ipynb
All done! ✨ 🍰 ✨
1 file left unchanged. From https://github.com/GoogleCloudPlatform/ai-platform-samples/blob/eed2ac7af3d552f16690c858439f22347a4d616e/.github/workflows/linter/requirements.txt it looks like you're on on an old version of nbQA Please upgrade to the latest version (1.1.0) or use If this still doesn't work for you with the latest version of nbqa, let me know and I'll reopen |
@MarcoGorelli With the linter as currently defined, the same error is occurring with the updated version of nbqa. I am now seeing about using black directly to see if this solves the problem. |
Thanks @loferris - reopening for now then, I'll take another look |
when I run the latest version of black directly |
I just ran both
There's no way that this could happen, |
(the file is here: https://github.com/GoogleCloudPlatform/bigquery-notebooks/blob/update_linter/.github/workflows/linter/run_linter.sh) Oh, and you're right, I misread the original error! |
When I go to that line in the
Another thing worth mentioning is that these odd changes seemed to have happened after I ran |
OK, I see what's happened - you're missing the extra Jupyter requirements when running black on the notebooks, and so they're been formatted as if they were Python files. You probably ran If you want Jupyter support for
I'd advise:
The previous commit was fine btw (GoogleCloudPlatform/bigquery-notebooks@56712e9) |
As an aside, seeing as you're using |
HI @ivanmkc and @loferris - it looks like https://github.com/GoogleCloudPlatform/bigquery-notebooks/pull/18/files , so I gather this is now resolved? Closing for now then, but please do let me know if you run into any other issues 👍 |
I've included two notebooks, which are identical except for the terminal command.
The one with multiline doesn't process properly, so when I run nbqa with
black
, I get:Archive.zip
The text was updated successfully, but these errors were encountered: