Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
c7a5684
migrate from black to ruff
daniel-sanche Aug 17, 2026
97a69d9
migrate resumable media
daniel-sanche Aug 17, 2026
9a029a5
re-formatted resumable media
daniel-sanche Aug 17, 2026
1a89fa5
updated bigquery-magics
daniel-sanche Aug 17, 2026
5301a50
reformatted db-dtypes
daniel-sanche Aug 17, 2026
c8873f0
reformatted google-auth
daniel-sanche Aug 17, 2026
d818be9
reformat remaining packages
daniel-sanche Aug 17, 2026
5d3fcdd
updated auth-oauthlib and auth-httplib2
daniel-sanche Aug 17, 2026
5176f16
updated python variable
daniel-sanche Aug 17, 2026
ba43f6a
fixed mypy issue
daniel-sanche Aug 17, 2026
52668b9
fixed google-auth lint
daniel-sanche Aug 17, 2026
63a9c6a
fixed pandas lint
daniel-sanche Aug 17, 2026
ad8f3b6
Merge branch 'main' into migrate-black-to-ruff-lint
daniel-sanche Aug 31, 2026
2c05058
fixed merge issue
daniel-sanche Aug 31, 2026
19d3132
Merge branch 'main' into migrate-black-to-ruff-lint
daniel-sanche Sep 1, 2026
d8015af
fixed django lint
daniel-sanche Sep 1, 2026
c9158b6
added missing import
daniel-sanche Sep 1, 2026
258768b
fix mypy for crc32c
daniel-sanche Sep 1, 2026
9a1e54a
fixded mypy annotation
daniel-sanche Sep 1, 2026
7f5b55c
Merge branch 'main' into migrate-black-to-ruff-lint
daniel-sanche Sep 3, 2026
e082df8
fixed format
daniel-sanche Sep 3, 2026
6a81b0a
Merge branch 'main' into migrate-black-to-ruff-lint
daniel-sanche Sep 18, 2026
a3365ad
reformatted google-auth
daniel-sanche Sep 18, 2026
a82d644
removed black sessions
daniel-sanche Sep 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ ignore_missing_imports = True
[mypy-google.oauth2,google.oauth2.*]
ignore_missing_imports = True

[mypy-google_auth_oauthlib,google_auth_oauthlib.*]
ignore_missing_imports = True

[mypy-google.protobuf,google.protobuf.*]
ignore_missing_imports = True

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

from typing import Any

from google.cloud.bigquery import exceptions
import packaging.version
from google.cloud.bigquery import exceptions

_MIN_BQ_STORAGE_VERSION = packaging.version.Version("2.0.0")

Expand Down
19 changes: 10 additions & 9 deletions packages/bigquery-magics/bigquery_magics/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,33 +106,33 @@
from __future__ import print_function

import ast
from concurrent import futures
import copy
import json
import re
import sys
import threading
import time
from typing import Any, List, Tuple
import warnings
from concurrent import futures
from typing import Any, List, Tuple

import IPython # type: ignore
from IPython.core import magic_arguments # type: ignore
from IPython.core.getipython import get_ipython
import pandas
from google.api_core.exceptions import NotFound
from google.cloud import bigquery
from google.cloud.bigquery import exceptions
from google.cloud.bigquery.dataset import DatasetReference
from google.cloud.bigquery.dbapi import _helpers
from google.cloud.bigquery.job import QueryJobConfig
import pandas
from IPython.core import magic_arguments # type: ignore
from IPython.core.getipython import get_ipython

from bigquery_magics import core
from bigquery_magics import line_arg_parser as lap
import bigquery_magics._versions_helpers
import bigquery_magics.config
import bigquery_magics.graph_server as graph_server
import bigquery_magics.pyformat
from bigquery_magics import core
from bigquery_magics import line_arg_parser as lap

try:
from google.cloud import bigquery_storage # type: ignore
Expand Down Expand Up @@ -471,8 +471,9 @@ def _parse_magic_args(line: str) -> Tuple[List[Any], Any]:

except lap.ParseError as exc:
raise ValueError(
"Unrecognized input, are option values correct? "
"Error details: {}".format(exc.args[0])
"Unrecognized input, are option values correct? Error details: {}".format(
exc.args[0]
)
) from exc

params = []
Expand Down
2 changes: 1 addition & 1 deletion packages/bigquery-magics/bigquery_magics/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import warnings
from dataclasses import dataclass
from typing import Optional
import warnings

import google.api_core.client_options as client_options
import google.cloud.bigquery as bigquery
Expand Down
2 changes: 1 addition & 1 deletion packages/bigquery-magics/bigquery_magics/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
from google.api_core import client_info
from google.cloud import bigquery

from bigquery_magics import environment
import bigquery_magics.config
import bigquery_magics.version
from bigquery_magics import environment

context = bigquery_magics.config.context

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.

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

Token = namedtuple("Token", ("type_", "lexeme", "pos"))
StateTransition = namedtuple("StateTransition", ("new_state", "total_offset"))
Expand Down
18 changes: 16 additions & 2 deletions packages/bigquery-magics/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,24 @@ def lint(session):
Returns a failure if the linters find linting errors or sufficiently
serious code quality issues.
"""
session.install("setuptools", FLAKE8_VERSION, BLACK_VERSION)
session.install("setuptools", FLAKE8_VERSION, RUFF_VERSION)
# 1. Check imports
session.run(
"black",
"ruff",
"check",
"--select",
"I",
f"--target-version=py{UNIT_TEST_PYTHON_VERSIONS[0].replace('.', '')}",
"--line-length=88",
*LINT_PATHS,
)
# 2. Check formatting
session.run(
"ruff",
"format",
"--check",
f"--target-version=py{UNIT_TEST_PYTHON_VERSIONS[0].replace('.', '')}",
"--line-length=88",
*LINT_PATHS,
)
session.run("flake8", "bigquery_magics", "tests")
Expand Down
Loading
Loading