Skip to content

Commit

Permalink
🦉 Updates from OwlBot post-processor
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] committed Apr 10, 2024
1 parent 49089ae commit 50b2266
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 24 deletions.
1 change: 0 additions & 1 deletion bigquery_magics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

from google.cloud.bigquery.magics.magics import context


# For backwards compatibility we need to make the context available in the path
# google.cloud.bigquery.magics.context
__all__ = ("context",)
6 changes: 2 additions & 4 deletions bigquery_magics/line_arg_parser/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from google.cloud.bigquery.magics.line_arg_parser.exceptions import ParseError
from google.cloud.bigquery.magics.line_arg_parser.exceptions import (
DuplicateQueryParamsError,
ParseError,
QueryParamsParseError,
)
from google.cloud.bigquery.magics.line_arg_parser.lexer import Lexer
from google.cloud.bigquery.magics.line_arg_parser.lexer import TokenType
from google.cloud.bigquery.magics.line_arg_parser.lexer import Lexer, TokenType
from google.cloud.bigquery.magics.line_arg_parser.parser import Parser
from google.cloud.bigquery.magics.line_arg_parser.visitors import QueryParamsExtractor


__all__ = (
"DuplicateQueryParamsError",
"Lexer",
Expand Down
7 changes: 2 additions & 5 deletions bigquery_magics/line_arg_parser/lexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from collections import namedtuple
from collections import OrderedDict
from collections import OrderedDict, namedtuple
import enum
import itertools
import re

import enum


Token = namedtuple("Token", ("type_", "lexeme", "pos"))
StateTransition = namedtuple("StateTransition", ("new_state", "total_offset"))

Expand Down
10 changes: 6 additions & 4 deletions bigquery_magics/line_arg_parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from google.cloud.bigquery.magics.line_arg_parser import DuplicateQueryParamsError
from google.cloud.bigquery.magics.line_arg_parser import ParseError
from google.cloud.bigquery.magics.line_arg_parser import QueryParamsParseError
from google.cloud.bigquery.magics.line_arg_parser import TokenType
from google.cloud.bigquery.magics.line_arg_parser import (
DuplicateQueryParamsError,
ParseError,
QueryParamsParseError,
TokenType,
)


class ParseNode(object):
Expand Down
11 changes: 4 additions & 7 deletions bigquery_magics/magics.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@

from __future__ import print_function

import re
import ast
from concurrent import futures
import copy
import functools
import re
import sys
import time
import warnings
from concurrent import futures

try:
import IPython # type: ignore
Expand All @@ -98,18 +98,15 @@
except ImportError: # pragma: NO COVER
raise ImportError("This module can only be loaded in IPython.")

from google.api_core import client_info
from google.api_core import client_options
from google.api_core import client_info, client_options
from google.api_core.exceptions import NotFound
import google.auth # type: ignore
from google.cloud import bigquery
from google.cloud.bigquery import _versions_helpers, exceptions
import google.cloud.bigquery.dataset
from google.cloud.bigquery import _versions_helpers
from google.cloud.bigquery import exceptions
from google.cloud.bigquery.dbapi import _helpers
from google.cloud.bigquery.magics import line_arg_parser as lap


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


Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os
import shlex
import sys

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand Down
4 changes: 3 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
"pytest-cov",
"pytest-asyncio",
]
UNIT_TEST_EXTERNAL_DEPENDENCIES: List[str] = []
UNIT_TEST_EXTERNAL_DEPENDENCIES: List[str] = [
"google-cloud-testutils",
]
UNIT_TEST_LOCAL_DEPENDENCIES: List[str] = []
UNIT_TEST_DEPENDENCIES: List[str] = []
UNIT_TEST_EXTRAS: List[str] = [
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import setuptools


# Package metadata.

name = "google-cloud-bigquery"
Expand Down

0 comments on commit 50b2266

Please sign in to comment.