Skip to content

Commit 3f58ad4

Browse files
committed
chore: change custom_labels type
1 parent 6a1c4c2 commit 3f58ad4

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

gokart/gcs_obj_metadata_client.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def _path_to_bucket_and_key(path: str) -> tuple[str, str]:
4040
def add_task_state_labels(
4141
path: str,
4242
task_params: dict[str, str] | None = None,
43-
custom_labels: dict[str, Any] | None = None,
43+
custom_labels: dict[str, str] | None = None,
4444
required_task_outputs: FlattenableItems[RequiredTaskOutput] | None = None,
4545
) -> None:
4646
if GCSObjectMetadataClient._is_log_related_path(path):
@@ -90,7 +90,7 @@ def _normalize_labels(labels: dict[str, Any] | None) -> dict[str, str]:
9090
def _get_patched_obj_metadata(
9191
metadata: Any,
9292
task_params: dict[str, str] | None = None,
93-
custom_labels: dict[str, Any] | None = None,
93+
custom_labels: dict[str, str] | None = None,
9494
required_task_outputs: FlattenableItems[RequiredTaskOutput] | None = None,
9595
) -> dict | Any:
9696
# If metadata from response when getting bucket and object information is not dictionary,
@@ -134,7 +134,7 @@ def _iterable_flatten(nested_list: Iterable) -> Iterable[str]:
134134
def _merge_custom_labels_and_task_params_labels(
135135
normalized_labels_list: list[dict[str, str]],
136136
) -> dict[str, str]:
137-
def __merge_two_dicts_helper(merged: dict[str, str], current_labels: dict[str, Any]) -> dict[str, str]:
137+
def __merge_two_dicts_helper(merged: dict[str, str], current_labels: dict[str, str]) -> dict[str, str]:
138138
next_merged = copy.deepcopy(merged)
139139
for label_name, label_value in current_labels.items():
140140
if len(label_value) == 0:

gokart/target.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def dump(
3737
obj,
3838
lock_at_dump: bool = True,
3939
task_params: dict[str, str] | None = None,
40-
custom_labels: dict[str, Any] | None = None,
40+
custom_labels: dict[str, str] | None = None,
4141
required_task_outputs: FlattenableItems[RequiredTaskOutput] | None = None,
4242
) -> None:
4343
if lock_at_dump:
@@ -120,7 +120,7 @@ def _dump(
120120
self,
121121
obj,
122122
task_params: dict[str, str] | None = None,
123-
custom_labels: dict[str, Any] | None = None,
123+
custom_labels: dict[str, str] | None = None,
124124
required_task_outputs: FlattenableItems[RequiredTaskOutput] | None = None,
125125
) -> None:
126126
with self._target.open('w') as f:
@@ -172,7 +172,7 @@ def _dump(
172172
self,
173173
obj,
174174
task_params: dict[str, str] | None = None,
175-
custom_labels: dict[str, Any] | None = None,
175+
custom_labels: dict[str, str] | None = None,
176176
required_task_outputs: FlattenableItems[RequiredTaskOutput] | None = None,
177177
) -> None:
178178
self._make_temporary_directory()

0 commit comments

Comments
 (0)