Skip to content

Commit

Permalink
fix the merging conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleyxuu committed Apr 12, 2024
1 parent d4fd1ae commit 962085e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 20 deletions.
18 changes: 1 addition & 17 deletions bigquery_magics/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@
import time
import warnings

import IPython # type: ignore
from IPython import display # type: ignore
from IPython.core import magic_arguments # type: ignore
import IPython # type: ignore
from IPython import display # type: ignore
from IPython.core import magic_arguments # type: ignore
Expand All @@ -114,7 +111,6 @@

IPYTHON_USER_AGENT = "ipython-{}".format(IPython.__version__)
context = bigquery_magics.config.context
context = bigquery_magics.config.context


def _handle_error(error, destination_var=None):
Expand Down Expand Up @@ -351,15 +347,6 @@ def _create_dataset_if_necessary(client, dataset_id):
"Defaults to location set in query setting in console."
),
)
@magic_arguments.argument(
"--location",
type=str,
default=None,
help=(
"Set the location to execute query."
"Defaults to location set in query setting in console."
),
)
def _cell_magic(line, query):
"""Underlying function for bigquery cell magic
Expand Down Expand Up @@ -404,8 +391,6 @@ def _cell_magic(line, query):
)
use_bqstorage_api = not args.use_rest_api and (bigquery_storage is not None)
location = args.location
use_bqstorage_api = not args.use_rest_api and (bigquery_storage is not None)
location = args.location

params = []
if params_option_value:
Expand Down Expand Up @@ -435,7 +420,6 @@ def _cell_magic(line, query):
client_info=client_info.ClientInfo(user_agent=IPYTHON_USER_AGENT),
client_options=bigquery_client_options,
location=location,
location=location,
)
if context._connection:
client._connection = context._connection
Expand Down Expand Up @@ -667,4 +651,4 @@ def _close_transports(client, bqstorage_client):
"""
client.close()
if bqstorage_client is not None:
bqstorage_client._transport.grpc_channel.close()
bqstorage_client._transport.grpc_channel.close()
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ of this library (from ``1.x`` to ``2.x``, or from ``2.x`` to ``3.x``).
.. toctree::
:maxdepth: 2

UPGRADING

Changelog
---------
Expand Down
4 changes: 2 additions & 2 deletions docs/magics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ Code Samples

Running a query:

.. literalinclude:: ./samples/magics/query.py
.. literalinclude:: ./samples/snippets/query.py
:dedent: 4
:start-after: [START bigquery_jupyter_query]
:end-before: [END bigquery_jupyter_query]

Running a parameterized query:

.. literalinclude:: ./samples/magics/query_params_scalars.py
.. literalinclude:: ./samples/snippets/query_params_scalars.py
:dedent: 4
:start-after: [START bigquery_jupyter_query_params_scalars]
:end-before: [END bigquery_jupyter_query_params_scalars]
Expand Down

0 comments on commit 962085e

Please sign in to comment.