Skip to content

Commit e611748

Browse files
lint with py 3.7 and fix test
1 parent 885003c commit e611748

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

sync/awsdatabricks.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import logging
33
from pathlib import Path
44
from time import sleep
5-
from typing import Generator, List, Tuple
5+
from typing import Dict, Generator, List, Optional, Tuple
66
from urllib.parse import urlparse
77

88
import boto3 as boto
@@ -351,10 +351,10 @@ def _get_aws_cluster_info_from_s3(bucket: str, file_key: str, cluster_id):
351351

352352
def save_cluster_report(
353353
cluster_id: str,
354-
instance_timelines: list[dict],
355-
cluster_log_destination: tuple[str, ...] | None = None,
356-
cluster_report_destination_override: dict[str, str] | None = None,
357-
write_function=None
354+
instance_timelines: List[dict],
355+
cluster_log_destination: Optional[Tuple[str, ...]] = None,
356+
cluster_report_destination_override: Optional[Dict[str, str]] = None,
357+
write_function=None,
358358
) -> bool:
359359
cluster = get_default_client().get_cluster(cluster_id)
360360
spark_context_id = cluster.get("spark_context_id")
@@ -474,7 +474,10 @@ def _monitor_cluster(
474474
all_timelines = retired_timelines + list(active_timelines_by_id.values())
475475

476476
save_cluster_report(
477-
cluster_id, all_timelines, cluster_log_destination=cluster_log_destination, write_function=write_function
477+
cluster_id,
478+
all_timelines,
479+
cluster_log_destination=cluster_log_destination,
480+
write_function=write_function,
478481
)
479482

480483
if kill_on_termination:

0 commit comments

Comments
 (0)