Skip to content

Commit 1ebe446

Browse files
committed
style(sqlalchemy-bigquery): revert formatting-only changes
1 parent c2c2284 commit 1ebe446

22 files changed

Lines changed: 50 additions & 47 deletions

packages/sqlalchemy-bigquery/sqlalchemy_bigquery/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
SQLAlchemy dialect for Google BigQuery
2121
"""
2222

23-
import sys
2423
import warnings
2524

2625
from ._types import (
@@ -44,6 +43,7 @@
4443
)
4544
from .base import BigQueryDialect, dialect
4645
from .version import __version__
46+
import sys
4747

4848
# Now that support for Python 3.7, 3.8 and 3.9 has been removed, we don't expect the
4949
# following check to succeed. The warning is only included for robustness.

packages/sqlalchemy-bigquery/sqlalchemy_bigquery/_helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
import re
1111
from typing import Optional
1212

13-
import google.auth
14-
import sqlalchemy
1513
from google.api_core import client_info
14+
import google.auth
1615
from google.cloud import bigquery
1716
from google.oauth2 import service_account
17+
import sqlalchemy
1818

1919
USER_AGENT_TEMPLATE = "sqlalchemy/{}"
2020
SCOPES = (

packages/sqlalchemy-bigquery/sqlalchemy_bigquery/_struct.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1818
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1919

20+
from sqlalchemy.sql import operators
2021
import sqlalchemy.sql.coercions
2122
import sqlalchemy.sql.default_comparator
2223
import sqlalchemy.sql.roles
2324
import sqlalchemy.sql.sqltypes
2425
import sqlalchemy.types
25-
from sqlalchemy.sql import operators
2626

2727
# from . import base # Moved to _get_subtype_col_spec to break circular import
2828

packages/sqlalchemy-bigquery/sqlalchemy_bigquery/_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1818
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1919

20+
from google.cloud.bigquery.schema import SchemaField
2021
import sqlalchemy.types
2122
import sqlalchemy.util
22-
from google.cloud.bigquery.schema import SchemaField
2323

2424
try:
2525
from .geography import GEOGRAPHY

packages/sqlalchemy-bigquery/sqlalchemy_bigquery/base.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,23 @@
2020
"""Integration between SQLAlchemy and BigQuery."""
2121

2222
import datetime
23+
from decimal import Decimal
2324
import operator
2425
import random
2526
import re
2627
import uuid
27-
from decimal import Decimal
2828

29-
import google.api_core.exceptions
30-
import packaging.version
31-
import sqlalchemy
32-
import sqlalchemy.sql.expression
33-
import sqlalchemy.sql.functions
34-
import sqlalchemy.sql.sqltypes
35-
import sqlalchemy.sql.type_api
36-
import sqlalchemy_bigquery_vendored.sqlalchemy.postgresql.base as vendored_postgresql
3729
from google import auth
30+
import google.api_core.exceptions
3831
from google.api_core.exceptions import NotFound
3932
from google.cloud.bigquery import ConnectionProperty, QueryJobConfig, dbapi
4033
from google.cloud.bigquery.table import (
4134
RangePartitioning,
4235
TableReference,
4336
TimePartitioning,
4437
)
38+
import packaging.version
39+
import sqlalchemy
4540
from sqlalchemy import util
4641
from sqlalchemy.engine.base import Engine
4742
from sqlalchemy.engine.default import DefaultDialect, DefaultExecutionContext
@@ -54,9 +49,14 @@
5449
IdentifierPreparer,
5550
SQLCompiler,
5651
)
52+
import sqlalchemy.sql.expression
53+
import sqlalchemy.sql.functions
5754
from sqlalchemy.sql.schema import Column, Table
5855
from sqlalchemy.sql.selectable import CTE
56+
import sqlalchemy.sql.sqltypes
5957
from sqlalchemy.sql.sqltypes import Integer, NullType, Numeric, String
58+
import sqlalchemy.sql.type_api
59+
import sqlalchemy_bigquery_vendored.sqlalchemy.postgresql.base as vendored_postgresql
6060

6161
from . import _helpers, _types
6262
from .parse_url import parse_url

packages/sqlalchemy-bigquery/sqlalchemy_bigquery/geography.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919

2020
import geoalchemy2
2121
import geoalchemy2.functions
22-
import sqlalchemy.ext.compiler
2322
from geoalchemy2.shape import to_shape
2423
from shapely import wkb, wkt
24+
import sqlalchemy.ext.compiler
2525
from sqlalchemy.sql.elements import BindParameter
2626

2727
SRID = 4326 # WGS84, https://spatialreference.org/ref/epsg/wgs-84/

packages/sqlalchemy-bigquery/tests/sqlalchemy_dialect_compliance/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
import traceback
2323

2424
import google.cloud.bigquery.dbapi.connection
25-
import test_utils.prefixer
2625
from sqlalchemy.testing import config
2726
from sqlalchemy.testing.plugin.pytestplugin import * # noqa
2827
from sqlalchemy.testing.plugin.pytestplugin import (
@@ -31,6 +30,7 @@
3130
from sqlalchemy.testing.plugin.pytestplugin import (
3231
pytest_sessionstart as _pytest_sessionstart,
3332
)
33+
import test_utils.prefixer
3434

3535
import sqlalchemy_bigquery.base
3636

packages/sqlalchemy-bigquery/tests/sqlalchemy_dialect_compliance/test_dialect_compliance.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,34 +25,33 @@
2525
import pytest
2626
import pytz
2727
import sqlalchemy
28-
import sqlalchemy.sql.sqltypes
29-
import sqlalchemy.testing.suite.test_types
3028
from sqlalchemy import and_
29+
import sqlalchemy.sql.sqltypes
3130
from sqlalchemy.testing import config, util
3231
from sqlalchemy.testing.assertions import eq_
33-
from sqlalchemy.testing.suite import * # noqa
3432
from sqlalchemy.testing.suite import (
35-
Column,
36-
DistinctOnTest,
37-
HasIndexTest,
38-
IdentityAutoincrementTest,
3933
Integer,
4034
LongNameBlowoutTest,
4135
PostCompileParamsTest,
4236
QuotedNameArgumentTest,
43-
String,
44-
Table,
37+
)
38+
from sqlalchemy.testing.suite import (
4539
WindowFunctionTest,
4640
bindparam,
4741
exists,
4842
select,
4943
testing,
5044
)
45+
from sqlalchemy.testing.suite import * # noqa
5146
from sqlalchemy.testing.suite import CTETest as _CTETest
52-
from sqlalchemy.testing.suite import DifficultParametersTest as _DifficultParametersTest
47+
from sqlalchemy.testing.suite import Column
48+
from sqlalchemy.testing.suite import DistinctOnTest
5349
from sqlalchemy.testing.suite import ExistsTest as _ExistsTest
54-
from sqlalchemy.testing.suite import FetchLimitOffsetTest as _FetchLimitOffsetTest
50+
from sqlalchemy.testing.suite import HasIndexTest, IdentityAutoincrementTest
5551
from sqlalchemy.testing.suite import InsertBehaviorTest as _InsertBehaviorTest
52+
from sqlalchemy.testing.suite import String, Table
53+
from sqlalchemy.testing.suite import DifficultParametersTest as _DifficultParametersTest
54+
from sqlalchemy.testing.suite import FetchLimitOffsetTest as _FetchLimitOffsetTest
5655
from sqlalchemy.testing.suite import SimpleUpdateDeleteTest as _SimpleUpdateDeleteTest
5756
from sqlalchemy.testing.suite import (
5857
TimestampMicrosecondsTest as _TimestampMicrosecondsTest,
@@ -63,6 +62,7 @@
6362
ComponentReflectionTestExtra,
6463
HasTableTest,
6564
)
65+
import sqlalchemy.testing.suite.test_types
6666
from sqlalchemy.testing.suite.test_types import ArrayTest
6767

6868
if packaging.version.parse(sqlalchemy.__version__) >= packaging.version.parse("2.0"):

packages/sqlalchemy-bigquery/tests/system/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@
2020
import pathlib
2121
from typing import List
2222

23+
from google.api_core import exceptions
24+
from google.cloud import bigquery
2325
import pytest
2426
import sqlalchemy
2527
import test_utils.prefixer
2628
import test_utils.retry
27-
from google.api_core import exceptions
28-
from google.cloud import bigquery
2929

3030
from sqlalchemy_bigquery import BigQueryDialect
3131

packages/sqlalchemy-bigquery/tests/system/test_alembic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
import contextlib
2121

2222
import google.api_core.exceptions
23-
import pytest
2423
from google.cloud.bigquery import SchemaField, TimePartitioning
24+
import pytest
2525
from sqlalchemy import Column, DateTime, Integer, Numeric, String
2626

2727
alembic = pytest.importorskip("alembic")

0 commit comments

Comments
 (0)