Skip to content

Commit cb535fe

Browse files
committed
correct typing unions
1 parent 6047baf commit cb535fe

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

installation_and_upgrade/ibex_install_utils/run_process.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import os
66
import subprocess
7-
from typing import IO, List, Optional
7+
from typing import IO, List, Optional, Union
88

99
from ibex_install_utils.exceptions import ErrorInRun
1010

@@ -16,15 +16,17 @@ class RunProcess:
1616

1717
def __init__(
1818
self,
19-
working_dir: Optional[str | bytes | os.PathLike[str] | os.PathLike[bytes]],
19+
working_dir: Optional[Union[str | bytes | os.PathLike[str] | os.PathLike[bytes]]],
2020
executable_file: str,
21-
executable_directory: Optional[str | bytes | os.PathLike[str] | os.PathLike[bytes]] = None,
21+
executable_directory: Optional[
22+
Union[str | bytes | os.PathLike[str] | os.PathLike[bytes]]
23+
] = None,
2224
press_any_key: bool = False,
2325
prog_args: Optional[List[str]] = None,
2426
capture_pipes: bool = True,
2527
std_in: Optional[int, IO] = None,
2628
log_command_args: bool = True,
27-
expected_return_codes: Optional[int, List[int]] = None,
29+
expected_return_codes: Optional[Union[int, List[int]]] = None,
2830
capture_last_output: bool = False,
2931
progress_metric: Optional[List[str]] = None,
3032
env: dict | None = None,

0 commit comments

Comments
 (0)