Skip to content

Commit 45edec2

Browse files
committed
chore: updates linting
1 parent 22714cb commit 45edec2

File tree

9 files changed

+20
-11
lines changed

9 files changed

+20
-11
lines changed

packages/bigframes/bigframes/core/compile/ibis_compiler/operations/geo_ops.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ def st_buffer(
182182

183183
@ibis_udf.scalar.builtin
184184
def st_distance(
185-
a: ibis_dtypes.geography, b: ibis_dtypes.geography, use_spheroid: bool # type: ignore
185+
a: ibis_dtypes.geography,
186+
b: ibis_dtypes.geography,
187+
use_spheroid: bool, # type: ignore
186188
) -> ibis_dtypes.float: # type: ignore
187189
"""Convert string to geography."""
188190

packages/bigframes/bigframes/core/compile/ibis_compiler/scalar_op_registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2172,7 +2172,7 @@ def obj_make_ref_json(objectref_json: ibis_dtypes.JSON) -> _OBJ_REF_IBIS_DTYPE:
21722172
# _OBJ_REF_IBIS_DTYPE is a variable holding a type, Mypy complains about it being used as type hint.
21732173
def obj_get_access_url( # type: ignore[empty-body]
21742174
obj_ref: _OBJ_REF_IBIS_DTYPE, # type: ignore[valid-type]
2175-
mode: ibis_dtypes.String
2175+
mode: ibis_dtypes.String,
21762176
) -> ibis_dtypes.JSON:
21772177
"""Get access url (as ObjectRefRumtime JSON) from ObjectRef."""
21782178

packages/bigframes/bigframes/core/compile/sqlglot/compiler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ def compile_sql(request: configs.CompileRequest) -> configs.CompileResult:
5454
# Need to do this before replacing unsupported ops, as that will rewrite slice ops
5555
result_node = rewrite.pull_up_limits(result_node)
5656
result_node = typing.cast(nodes.ResultNode, _replace_unsupported_ops(result_node))
57-
result_node = typing.cast(nodes.ResultNode, result_node.bottom_up(rewrite.simplify_join))
57+
result_node = typing.cast(
58+
nodes.ResultNode, result_node.bottom_up(rewrite.simplify_join)
59+
)
5860
# prune before pulling up order to avoid unnnecessary row_number() ops
5961
result_node = typing.cast(nodes.ResultNode, rewrite.column_pruning(result_node))
6062
result_node = rewrite.defer_order(

packages/bigframes/bigframes/core/expression_factoring.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,12 @@ def factor_aggregation(root: nodes.ColumnDef) -> FactoredAggregation:
243243
}
244244

245245
root_scalar_expr = nodes.ColumnDef(
246-
sub_expressions(root.expression, cast(Mapping[expression.Expression, expression.Expression], agg_outputs_dict)),
246+
sub_expressions(
247+
root.expression,
248+
cast(
249+
Mapping[expression.Expression, expression.Expression], agg_outputs_dict
250+
),
251+
),
247252
root.id, # type: ignore
248253
)
249254

packages/bigframes/bigframes/core/local_data.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333

3434
import bigframes.core.schema as schemata
3535
import bigframes.dtypes
36-
from bigframes.core import identifiers
37-
from bigframes.core import pyarrow_utils
36+
from bigframes.core import identifiers, pyarrow_utils
3837

3938

4039
@dataclasses.dataclass(frozen=True)

packages/bigframes/bigframes/core/nodes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,9 @@ def fields(self) -> Sequence[Field]:
674674
Field(
675675
col_id,
676676
self.local_data_source.schema.get_type(source_id),
677-
nullable=self.local_data_source.is_nullable(identifiers.ColumnId(source_id)),
677+
nullable=self.local_data_source.is_nullable(
678+
identifiers.ColumnId(source_id)
679+
),
678680
)
679681
for col_id, source_id in self.scan_list.items
680682
)

packages/bigframes/noxfile.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@ def run_system(
364364
)
365365

366366

367-
368367
@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)
369368
def system(session: nox.sessions.Session):
370369
"""Run the system test suite."""
@@ -982,7 +981,7 @@ def core_deps_from_source(session, protobuf_implementation):
982981
# added to the list below so that it is installed from source, rather than PyPI
983982
# Note: If a dependency is added to the `core_dependencies_from_source` list,
984983
# the `prerel_deps` list in the `prerelease_deps` nox session should also be updated.
985-
core_dependencies_from_source = [
984+
core_dependencies_from_source = [
986985
"googleapis-common-protos @ git+https://github.com/googleapis/google-cloud-python#egg=googleapis-common-protos&subdirectory=packages/googleapis-common-protos",
987986
"google-api-core @ git+https://github.com/googleapis/google-cloud-python#egg=google-api-core&subdirectory=packages/google-api-core",
988987
"google-auth @ git+https://github.com/googleapis/google-cloud-python#egg=google-auth&subdirectory=packages/google-auth",

packages/bigframes/tests/unit/core/compile/sqlglot/tpch/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def read_gbq_table_no_snapshot(*args, **kwargs):
158158
return original_read_gbq_table(*args, **kwargs)
159159

160160
session._executor = compiler_session.SQLCompilerExecutor()
161-
161+
162162
with mock.patch.object(
163163
session._loader, "read_gbq_table", new=read_gbq_table_no_snapshot
164164
):

packages/bigframes/tests/unit/test_col.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
import pathlib
1717
from typing import Generator
1818

19+
import numpy as np
1920
import pandas as pd
2021
import pytest
2122

2223
import bigframes
2324
import bigframes.pandas as bpd
2425
from bigframes.testing.utils import assert_frame_equal, convert_pandas_dtypes
25-
import numpy as np
2626

2727
pytest.importorskip("polars")
2828
pytest.importorskip("pandas", minversion="3.0.0")

0 commit comments

Comments
 (0)