@@ -214,7 +214,8 @@ def download_jar(
214
214
spark_version = "2.4.0" ,
215
215
skip_download = False ,
216
216
):
217
- assert (spark_version in SUPPORTED_SPARK ), f"Received unsupported spark version { spark_version } . Supported spark versions are { SUPPORTED_SPARK } "
217
+ assert (spark_version in SUPPORTED_SPARK ), (f"Received unsupported spark version { spark_version } . "
218
+ f"Supported spark versions are { SUPPORTED_SPARK } " )
218
219
scala_version = SCALA_VERSION_FOR_SPARK [spark_version ]
219
220
maven_url_prefix = os .environ .get ("CHRONON_MAVEN_MIRROR_PREFIX" , None )
220
221
default_url_prefix = (
@@ -429,9 +430,10 @@ def __init__(self, args, jar_path):
429
430
raise e
430
431
possible_modes = list (
431
432
ROUTES [self .conf_type ].keys ()) + UNIVERSAL_ROUTES
432
- assert (args ["mode" ] in possible_modes ), "Invalid mode:{} for conf:{} of type:{}, please choose from {}" .format (
433
- args ["mode" ], self .conf , self .conf_type , possible_modes
434
- )
433
+ assert (
434
+ args ["mode" ] in possible_modes ), ("Invalid mode:{} for conf:{} of type:{}, please choose from {}"
435
+ .format (args ["mode" ], self .conf , self .conf_type , possible_modes
436
+ ))
435
437
else :
436
438
self .conf_type = args ["conf_type" ]
437
439
self .ds = args ["end_ds" ] if "end_ds" in args and args ["end_ds" ] else args ["ds" ]
@@ -550,8 +552,8 @@ def run(self):
550
552
for start_ds , end_ds in date_ranges :
551
553
if not self .dataproc :
552
554
command = (
553
- "bash {script} --class ai.chronon.spark.Driver " +
554
- "{jar} {subcommand} {args} {additional_args}"
555
+ "bash {script} --class ai.chronon.spark.Driver " +
556
+ "{jar} {subcommand} {args} {additional_args}"
555
557
).format (
556
558
script = self .spark_submit ,
557
559
jar = self .jar_path ,
@@ -598,8 +600,8 @@ def run(self):
598
600
else :
599
601
if not self .dataproc :
600
602
command = (
601
- "bash {script} --class ai.chronon.spark.Driver "
602
- + "{jar} {subcommand} {args} {additional_args}"
603
+ "bash {script} --class ai.chronon.spark.Driver "
604
+ + "{jar} {subcommand} {args} {additional_args}"
603
605
).format (
604
606
script = self .spark_submit ,
605
607
jar = self .jar_path ,
@@ -662,8 +664,7 @@ def _gen_final_args(self, start_ds=None, end_ds=None, override_conf_path=None):
662
664
" --start-partition-override=" + start_ds if start_ds else ""
663
665
)
664
666
665
- final_args = base_args + " " + \
666
- str (self .args ) + override_start_partition_arg
667
+ final_args = base_args + " " + str (self .args ) + override_start_partition_arg
667
668
668
669
return final_args
669
670
0 commit comments