mirror of
https://github.com/nix-community/nix-direnv.git
synced 2025-11-08 19:46:11 +01:00
test: use builtins for type annotations instead of List / Optional
This commit is contained in:
parent
26b7fce564
commit
9ac34be48f
2 changed files with 6 additions and 7 deletions
|
|
@ -1,19 +1,19 @@
|
|||
import subprocess
|
||||
from pathlib import Path
|
||||
from typing import IO, Any, List, Optional, Union
|
||||
from typing import IO, Any
|
||||
|
||||
_FILE = Union[None, int, IO[Any]]
|
||||
_DIR = Union[None, Path, str]
|
||||
_FILE = None | int | IO[Any]
|
||||
_DIR = None | Path | str
|
||||
|
||||
|
||||
def run(
|
||||
cmd: List[str],
|
||||
cmd: list[str],
|
||||
text: bool = True,
|
||||
check: bool = True,
|
||||
cwd: _DIR = None,
|
||||
stderr: _FILE = None,
|
||||
stdout: _FILE = None,
|
||||
env: Optional[dict[str, str]] = None,
|
||||
env: dict[str, str] | None = None,
|
||||
) -> subprocess.CompletedProcess:
|
||||
if cwd is not None:
|
||||
print(f"cd {cwd}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue