Skip to content

Commit

Permalink
blackify
Browse files Browse the repository at this point in the history
  • Loading branch information
aktech committed Aug 28, 2023
1 parent b70ed28 commit 86d2831
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
22 changes: 3 additions & 19 deletions jhub_apps/spawner/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ def replace(self, **kwargs):
for k, v in kwargs.items():
if f"${k}" in self.value:
keys_to_substitute.add(k)
subs = {
k: v for k, v in kwargs.items()
if k in keys_to_substitute
}
subs = {k: v for k, v in kwargs.items() if k in keys_to_substitute}
return template.substitute(subs)


Expand All @@ -48,20 +45,6 @@ def get_substituted_args(self, **kwargs):
return subs_args


panel_cmd = Command(args=[
"--destport=0",
"python",
"{-}m",
"bokeh_root_cmd.main",
TString("$filepath"),
"{--}port={port}",
"{--}debug",
TString("{--}allow-websocket-origin=$origin_host"),
"{--}server=panel",
TString("{--}prefix=$base_url"),
"--ready-check-path=/ready-check",
])

COMMANDS = {
"gradio": Command(
args=[
Expand Down Expand Up @@ -136,5 +119,6 @@ def get_substituted_args(self, **kwargs):
"{--}server=panel",
TString("{--}prefix=$base_url"),
"--ready-check-path=/ready-check",
]),
]
),
}
2 changes: 1 addition & 1 deletion jhub_apps/spawner/spawner.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def get_args(self):
command_args = command.get_substituted_args(
filepath=EXAMPLES_PATH.get(framework),
origin_host=ORIGIN_HOST,
base_url=BASE_URL
base_url=BASE_URL,
)
argv.extend(command_args)
env = self.get_env()
Expand Down

0 comments on commit 86d2831

Please sign in to comment.