Skip to content

Commit e8e6689

Browse files
committed
cloud logging sink:pre-commit check fix
1 parent ae3b1cb commit e8e6689

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

providers/google/src/airflow/providers/google/cloud/operators/cloud_logging_sink.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def execute(self, context: Context) -> dict[str, Any]:
268268
elif hasattr(self.update_mask, "paths"):
269269
paths = self.update_mask.paths
270270

271-
self.log.info("Updating fields: %s", ", ".join(paths))
271+
self.log.info("Updating fields: %s", ", ".join(paths))
272272

273273
response = hook.update_sink(
274274
sink_name=self.sink_name,

providers/google/tests/system/google/cloud/cloud_logging_sink/example_cloud_logging_protobuf_obj.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
# [START howto_operator_import_protobuf_obj]
2424
from google.cloud.logging_v2.types import LogSink
2525
from google.protobuf.field_mask_pb2 import FieldMask
26-
# [END howto_operator_import_protobuf_obj]
2726

27+
# [END howto_operator_import_protobuf_obj]
2828
from airflow import DAG
2929
from airflow.providers.google.cloud.operators.cloud_logging_sink import (
3030
CloudLoggingCreateSinkOperator,
@@ -52,7 +52,7 @@
5252
create_sink = CloudLoggingCreateSinkOperator(
5353
task_id="create_sink",
5454
project_id=PROJECT_ID,
55-
unique_writer_identity = False,
55+
unique_writer_identity=False,
5656
sink_config=LogSink(
5757
**{
5858
"name": SINK_NAME,
@@ -92,7 +92,7 @@
9292
"disabled": False,
9393
}
9494
),
95-
unique_writer_identity = True,
95+
unique_writer_identity=True,
9696
update_mask=FieldMask(paths=["description", "filter", "disabled"]),
9797
gcp_conn_id=CONN_ID,
9898
)

providers/google/tests/system/google/cloud/cloud_logging_sink/example_cloud_logging_sink.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"disabled": False,
8383
},
8484
update_mask={"paths": ["description", "filter", "disabled"]},
85-
unique_writer_identity = True,
85+
unique_writer_identity=True,
8686
gcp_conn_id=CONN_ID,
8787
)
8888
# [END howto_operator_cloud_logging_update_sink_sink_native_obj]

providers/google/tests/unit/google/cloud/hooks/test_cloud_logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def test_update_sink_invalid_dict_format(self, cloud_logging_hook):
197197
@mock.patch("airflow.providers.google.cloud.hooks.cloud_logging.ConfigServiceV2Client")
198198
def test_update_sink_failure(self, mock_config_client, cloud_logging_hook):
199199
updated_sink = LogSink(name=SINK_NAME, destination="storage.googleapis.com/new-bucket")
200-
updated_mask = {"paths":["name","destination"]}
200+
updated_mask = {"paths": ["name", "destination"]}
201201

202202
mock_config_client.return_value.update_sink.side_effect = Exception("Permission denied")
203203

0 commit comments

Comments
 (0)