Skip to content

Multiline terminal command isn't processed properly #657

@ivanmkc

Description

@ivanmkc

I've included two notebooks, which are identical except for the terminal command.

  • one with a single-line terminal command
! bq --location=US load --autodetect --skip_leading_rows=1 --source_format=CSV {dataset_id}.us_states_local_file 'resources/us-states.csv'
  • one with a multi-line terminal command
!bq \
--location=US load \
--autodetect \
--skip_leading_rows=1 \
--source_format=CSV \
{dataset_id}.us_states_local_file \
'resources/us-states.csv'

The one with multiline doesn't process properly, so when I run nbqa with black, I get:

Running black...
error: cannot format notebooks/official/bigquery_command_line_tool.ipynb: Cannot parse: cell_6:2:5: --lo 0x6AA55214

Archive.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions