Skip to content

Commit 65861d9

Browse files
committed
chore: fix lint and formatting
1 parent 7208833 commit 65861d9

120 files changed

Lines changed: 26671 additions & 16463 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1017,7 +1017,8 @@ def remote_function_op_impl(*values: ibis_types.Value, op: ops.RemoteFunctionOp)
10171017
signature=ibis_py_sig,
10181018
param_name_overrides=arg_names,
10191019
)
1020-
def udf(*inputs): ...
1020+
def udf(*inputs):
1021+
...
10211022

10221023
return udf(*values)
10231024

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,7 @@ def handler(py_struct):
597597
args = list(py_struct.values())
598598
series_arg = function_template.get_pd_series(args[0])
599599
return code(series_arg, *args[1:])
600+
600601
else:
601602

602603
def handler(py_struct):

packages/bigframes/bigframes/core/compile/sqlglot/expressions/generic_ops.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ def _(*operands: TypedExpr, op: ops.GoogleSqlScalarOp) -> sge.Expression:
8383
if i < len(op.args):
8484
arg_spec = op.args[i]
8585
else:
86-
assert op.args[-1].is_vararg, (
86+
assert op.args[
87+
-1
88+
].is_vararg, (
8789
f"Too many arguments, for {op.sql_name}, expected {len(op.args)}"
8890
)
8991
arg_spec = op.args[-1]

packages/gapic-generator/noxfile.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ def lint(session):
725725
"""
726726

727727
# TODO(https://github.com/googleapis/google-cloud-python/issues/16186):
728-
# SKIP: This session was not enforced in the standalone (split) repo
728+
# SKIP: This session was not enforced in the standalone (split) repo
729729
# and is disabled here to ensure a "move-only" migration.
730730
session.skip(
731731
"Linting was not enforced in the split repo. "
@@ -755,9 +755,11 @@ def lint(session):
755755
@nox.session(python=NEWEST_PYTHON)
756756
def lint_setup_py(session):
757757
# TODO(https://github.com/googleapis/google-cloud-python/issues/16186):
758-
# SKIP: This session was not enforced in the standalone (split) repo
758+
# SKIP: This session was not enforced in the standalone (split) repo
759759
# and is disabled here to ensure a "move-only" migration.
760-
session.skip("Skipping now to avoid changing code during migration. See Issue #16186")
760+
session.skip(
761+
"Skipping now to avoid changing code during migration. See Issue #16186"
762+
)
761763

762764

763765
@nox.session(python="3.10")
@@ -832,9 +834,11 @@ def prerelease_deps(session, protobuf_implementation):
832834
"""
833835
Run all tests with pre-release versions of dependencies installed.
834836
"""
835-
# TODO(https://github.com/googleapis/google-cloud-python/issues/16184):
837+
# TODO(https://github.com/googleapis/google-cloud-python/issues/16184):
836838
# Implement pre-release dependency logic to test against upcoming runtime changes.
837-
session.skip("prerelease_deps session is not yet implemented for gapic-generator-python.")
839+
session.skip(
840+
"prerelease_deps session is not yet implemented for gapic-generator-python."
841+
)
838842

839843

840844
@nox.session(python=NEWEST_PYTHON)
@@ -844,6 +848,8 @@ def prerelease_deps(session, protobuf_implementation):
844848
)
845849
def core_deps_from_source(session, protobuf_implementation):
846850
"""Run all tests with core dependencies installed from source."""
847-
# TODO(https://github.com/googleapis/google-cloud-python/issues/16185):
851+
# TODO(https://github.com/googleapis/google-cloud-python/issues/16185):
848852
# Implement logic to install core packages directly from the mono-repo directories.
849-
session.skip("core_deps_from_source session is not yet implemented for gapic-generator-python.")
853+
session.skip(
854+
"core_deps_from_source session is not yet implemented for gapic-generator-python."
855+
)

packages/gapic-generator/tests/integration/goldens/asset/google/cloud/asset_v1/__init__.py

Lines changed: 119 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,12 @@
108108
from .types.assets import TimeWindow
109109
from .types.assets import VersionedResource
110110

111-
if hasattr(api_core, "check_python_version") and hasattr(api_core, "check_dependency_versions"): # pragma: NO COVER
112-
api_core.check_python_version("google.cloud.asset_v1") # type: ignore
113-
api_core.check_dependency_versions("google.cloud.asset_v1") # type: ignore
114-
else: # pragma: NO COVER
111+
if hasattr(api_core, "check_python_version") and hasattr(
112+
api_core, "check_dependency_versions"
113+
): # pragma: NO COVER
114+
api_core.check_python_version("google.cloud.asset_v1") # type: ignore
115+
api_core.check_dependency_versions("google.cloud.asset_v1") # type: ignore
116+
else: # pragma: NO COVER
115117
# An older version of api_core is installed which does not define the
116118
# functions above. We do equivalent checks manually.
117119
try:
@@ -120,12 +122,14 @@
120122
_py_version_str = sys.version.split()[0]
121123
_package_label = "google.cloud.asset_v1"
122124
if sys.version_info < (3, 10):
123-
warnings.warn("You are using a non-supported Python version " +
124-
f"({_py_version_str}). Google will not post any further " +
125-
f"updates to {_package_label} supporting this Python version. " +
126-
"Please upgrade to the latest Python version, or at " +
127-
f"least to Python 3.10, and then update {_package_label}.",
128-
FutureWarning)
125+
warnings.warn(
126+
"You are using a non-supported Python version "
127+
+ f"({_py_version_str}). Google will not post any further "
128+
+ f"updates to {_package_label} supporting this Python version. "
129+
+ "Please upgrade to the latest Python version, or at "
130+
+ f"least to Python 3.10, and then update {_package_label}.",
131+
FutureWarning,
132+
)
129133

130134
def parse_version_to_tuple(version_string: str):
131135
"""Safely converts a semantic version string to a comparable tuple of integers.
@@ -163,108 +167,112 @@ def _get_version(dependency_name):
163167
_recommendation = " (we recommend 7.x)"
164168
(_version_used, _version_used_string) = _get_version(_dependency_package)
165169
if _version_used and _version_used < _next_supported_version_tuple:
166-
warnings.warn(f"Package {_package_label} depends on " +
167-
f"{_dependency_package}, currently installed at version " +
168-
f"{_version_used_string}. Future updates to " +
169-
f"{_package_label} will require {_dependency_package} at " +
170-
f"version {_next_supported_version} or higher{_recommendation}." +
171-
" Please ensure " +
172-
"that either (a) your Python environment doesn't pin the " +
173-
f"version of {_dependency_package}, so that updates to " +
174-
f"{_package_label} can require the higher version, or " +
175-
"(b) you manually update your Python environment to use at " +
176-
f"least version {_next_supported_version} of " +
177-
f"{_dependency_package}.",
178-
FutureWarning)
170+
warnings.warn(
171+
f"Package {_package_label} depends on "
172+
+ f"{_dependency_package}, currently installed at version "
173+
+ f"{_version_used_string}. Future updates to "
174+
+ f"{_package_label} will require {_dependency_package} at "
175+
+ f"version {_next_supported_version} or higher{_recommendation}."
176+
+ " Please ensure "
177+
+ "that either (a) your Python environment doesn't pin the "
178+
+ f"version of {_dependency_package}, so that updates to "
179+
+ f"{_package_label} can require the higher version, or "
180+
+ "(b) you manually update your Python environment to use at "
181+
+ f"least version {_next_supported_version} of "
182+
+ f"{_dependency_package}.",
183+
FutureWarning,
184+
)
179185
except Exception:
180-
warnings.warn("Could not determine the version of Python " +
181-
"currently being used. To continue receiving " +
182-
"updates for {_package_label}, ensure you are " +
183-
"using a supported version of Python; see " +
184-
"https://devguide.python.org/versions/")
186+
warnings.warn(
187+
"Could not determine the version of Python "
188+
+ "currently being used. To continue receiving "
189+
+ "updates for {_package_label}, ensure you are "
190+
+ "using a supported version of Python; see "
191+
+ "https://devguide.python.org/versions/"
192+
)
185193

186194
__all__ = (
187-
'AssetServiceAsyncClient',
188-
'AnalyzeIamPolicyLongrunningMetadata',
189-
'AnalyzeIamPolicyLongrunningRequest',
190-
'AnalyzeIamPolicyLongrunningResponse',
191-
'AnalyzeIamPolicyRequest',
192-
'AnalyzeIamPolicyResponse',
193-
'AnalyzeMoveRequest',
194-
'AnalyzeMoveResponse',
195-
'AnalyzeOrgPoliciesRequest',
196-
'AnalyzeOrgPoliciesResponse',
197-
'AnalyzeOrgPolicyGovernedAssetsRequest',
198-
'AnalyzeOrgPolicyGovernedAssetsResponse',
199-
'AnalyzeOrgPolicyGovernedContainersRequest',
200-
'AnalyzeOrgPolicyGovernedContainersResponse',
201-
'AnalyzerOrgPolicy',
202-
'AnalyzerOrgPolicyConstraint',
203-
'Asset',
204-
'AssetEnrichment',
205-
'AssetServiceClient',
206-
'AttachedResource',
207-
'BatchGetAssetsHistoryRequest',
208-
'BatchGetAssetsHistoryResponse',
209-
'BatchGetEffectiveIamPoliciesRequest',
210-
'BatchGetEffectiveIamPoliciesResponse',
211-
'BigQueryDestination',
212-
'ConditionEvaluation',
213-
'ContentType',
214-
'CreateFeedRequest',
215-
'CreateSavedQueryRequest',
216-
'DeleteFeedRequest',
217-
'DeleteSavedQueryRequest',
218-
'EffectiveTagDetails',
219-
'ExportAssetsRequest',
220-
'ExportAssetsResponse',
221-
'Feed',
222-
'FeedOutputConfig',
223-
'GcsDestination',
224-
'GcsOutputResult',
225-
'GetFeedRequest',
226-
'GetSavedQueryRequest',
227-
'IamPolicyAnalysisOutputConfig',
228-
'IamPolicyAnalysisQuery',
229-
'IamPolicyAnalysisResult',
230-
'IamPolicyAnalysisState',
231-
'IamPolicySearchResult',
232-
'ListAssetsRequest',
233-
'ListAssetsResponse',
234-
'ListFeedsRequest',
235-
'ListFeedsResponse',
236-
'ListSavedQueriesRequest',
237-
'ListSavedQueriesResponse',
238-
'MoveAnalysis',
239-
'MoveAnalysisResult',
240-
'MoveImpact',
241-
'OutputConfig',
242-
'OutputResult',
243-
'PartitionSpec',
244-
'PubsubDestination',
245-
'QueryAssetsOutputConfig',
246-
'QueryAssetsRequest',
247-
'QueryAssetsResponse',
248-
'QueryResult',
249-
'RelatedAsset',
250-
'RelatedAssets',
251-
'RelatedResource',
252-
'RelatedResources',
253-
'RelationshipAttributes',
254-
'Resource',
255-
'ResourceOwners',
256-
'ResourceSearchResult',
257-
'SavedQuery',
258-
'SearchAllIamPoliciesRequest',
259-
'SearchAllIamPoliciesResponse',
260-
'SearchAllResourcesRequest',
261-
'SearchAllResourcesResponse',
262-
'TableFieldSchema',
263-
'TableSchema',
264-
'Tag',
265-
'TemporalAsset',
266-
'TimeWindow',
267-
'UpdateFeedRequest',
268-
'UpdateSavedQueryRequest',
269-
'VersionedResource',
195+
"AssetServiceAsyncClient",
196+
"AnalyzeIamPolicyLongrunningMetadata",
197+
"AnalyzeIamPolicyLongrunningRequest",
198+
"AnalyzeIamPolicyLongrunningResponse",
199+
"AnalyzeIamPolicyRequest",
200+
"AnalyzeIamPolicyResponse",
201+
"AnalyzeMoveRequest",
202+
"AnalyzeMoveResponse",
203+
"AnalyzeOrgPoliciesRequest",
204+
"AnalyzeOrgPoliciesResponse",
205+
"AnalyzeOrgPolicyGovernedAssetsRequest",
206+
"AnalyzeOrgPolicyGovernedAssetsResponse",
207+
"AnalyzeOrgPolicyGovernedContainersRequest",
208+
"AnalyzeOrgPolicyGovernedContainersResponse",
209+
"AnalyzerOrgPolicy",
210+
"AnalyzerOrgPolicyConstraint",
211+
"Asset",
212+
"AssetEnrichment",
213+
"AssetServiceClient",
214+
"AttachedResource",
215+
"BatchGetAssetsHistoryRequest",
216+
"BatchGetAssetsHistoryResponse",
217+
"BatchGetEffectiveIamPoliciesRequest",
218+
"BatchGetEffectiveIamPoliciesResponse",
219+
"BigQueryDestination",
220+
"ConditionEvaluation",
221+
"ContentType",
222+
"CreateFeedRequest",
223+
"CreateSavedQueryRequest",
224+
"DeleteFeedRequest",
225+
"DeleteSavedQueryRequest",
226+
"EffectiveTagDetails",
227+
"ExportAssetsRequest",
228+
"ExportAssetsResponse",
229+
"Feed",
230+
"FeedOutputConfig",
231+
"GcsDestination",
232+
"GcsOutputResult",
233+
"GetFeedRequest",
234+
"GetSavedQueryRequest",
235+
"IamPolicyAnalysisOutputConfig",
236+
"IamPolicyAnalysisQuery",
237+
"IamPolicyAnalysisResult",
238+
"IamPolicyAnalysisState",
239+
"IamPolicySearchResult",
240+
"ListAssetsRequest",
241+
"ListAssetsResponse",
242+
"ListFeedsRequest",
243+
"ListFeedsResponse",
244+
"ListSavedQueriesRequest",
245+
"ListSavedQueriesResponse",
246+
"MoveAnalysis",
247+
"MoveAnalysisResult",
248+
"MoveImpact",
249+
"OutputConfig",
250+
"OutputResult",
251+
"PartitionSpec",
252+
"PubsubDestination",
253+
"QueryAssetsOutputConfig",
254+
"QueryAssetsRequest",
255+
"QueryAssetsResponse",
256+
"QueryResult",
257+
"RelatedAsset",
258+
"RelatedAssets",
259+
"RelatedResource",
260+
"RelatedResources",
261+
"RelationshipAttributes",
262+
"Resource",
263+
"ResourceOwners",
264+
"ResourceSearchResult",
265+
"SavedQuery",
266+
"SearchAllIamPoliciesRequest",
267+
"SearchAllIamPoliciesResponse",
268+
"SearchAllResourcesRequest",
269+
"SearchAllResourcesResponse",
270+
"TableFieldSchema",
271+
"TableSchema",
272+
"Tag",
273+
"TemporalAsset",
274+
"TimeWindow",
275+
"UpdateFeedRequest",
276+
"UpdateSavedQueryRequest",
277+
"VersionedResource",
270278
)

0 commit comments

Comments
 (0)