Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 7, 2024
1 parent d9694e2 commit 3f2ad16
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions batchspawner/singleuser.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import os
import sys

from runpy import run_path
from shutil import which
from urllib.parse import urlparse
Expand Down Expand Up @@ -39,9 +38,9 @@ def main(argv=None):
url = urlparse(os.environ.get("JUPYTERHUB_SERVICE_URL", ""))
# Updated URL. We are effectively passing the port arg via env var
if url.hostname:
os.environ[
"JUPYTERHUB_SERVICE_URL"
] = f"{url.scheme}://{url.hostname}:{port}{url.path}"
os.environ["JUPYTERHUB_SERVICE_URL"] = (
f"{url.scheme}://{url.hostname}:{port}{url.path}"
)

cmd_path = which(sys.argv[1])
sys.argv = sys.argv[1:]
Expand Down

0 comments on commit 3f2ad16

Please sign in to comment.