Skip to content

Commit 4acbd0b

Browse files
committed
fix formatting
1 parent 42af777 commit 4acbd0b

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

api/py/ai/chronon/repo/run.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ def download_jar(
214214
spark_version="2.4.0",
215215
skip_download=False,
216216
):
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}")
218219
scala_version = SCALA_VERSION_FOR_SPARK[spark_version]
219220
maven_url_prefix = os.environ.get("CHRONON_MAVEN_MIRROR_PREFIX", None)
220221
default_url_prefix = (
@@ -429,9 +430,10 @@ def __init__(self, args, jar_path):
429430
raise e
430431
possible_modes = list(
431432
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+
))
435437
else:
436438
self.conf_type = args["conf_type"]
437439
self.ds = args["end_ds"] if "end_ds" in args and args["end_ds"] else args["ds"]
@@ -550,8 +552,8 @@ def run(self):
550552
for start_ds, end_ds in date_ranges:
551553
if not self.dataproc:
552554
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}"
555557
).format(
556558
script=self.spark_submit,
557559
jar=self.jar_path,
@@ -598,8 +600,8 @@ def run(self):
598600
else:
599601
if not self.dataproc:
600602
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}"
603605
).format(
604606
script=self.spark_submit,
605607
jar=self.jar_path,
@@ -662,8 +664,7 @@ def _gen_final_args(self, start_ds=None, end_ds=None, override_conf_path=None):
662664
" --start-partition-override=" + start_ds if start_ds else ""
663665
)
664666

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
667668

668669
return final_args
669670

0 commit comments

Comments
 (0)