Skip to content

Commit ffe67d9

Browse files
committed
Revert "fix: update type annotations to use Python 3.12 syntax"
This reverts commit 8a24f61.
1 parent b2e48a4 commit ffe67d9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/hybrid_jobs/7_Running_notebooks_as_hybrid_jobs/src/notebook_runner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import logging
66
import os
77
import pathlib
8-
from typing import Any
8+
from typing import Any, TypeVar
99

1010
import papermill as pm
1111

@@ -30,7 +30,7 @@
3030
subprocess.check_call([python, "-m", "pip", "install", *missing])
3131

3232

33-
type PathLike = str | pathlib.Path | None
33+
PathLike = TypeVar("PathLike", str, pathlib.Path, None)
3434

3535

3636
def convert_to_value(value: str) -> Any:
@@ -79,7 +79,7 @@ def convert_jobs_hyperparams_to_pm_params(braket_hyperparams: dict[str, str]) ->
7979
return papermill_params
8080

8181

82-
def get_notebook_name[T: PathLike](input_dir: T) -> str:
82+
def get_notebook_name(input_dir: PathLike) -> str:
8383
"""Returns the notebook name from an input path.
8484
8585
Args:

0 commit comments

Comments
 (0)