pmb/types: manual ruff fixes (MR 2357)

Manual fixes for things that ruff didn't fix automatically.

From python3 docs:
> Union[X, Y] is equivalent to X | Y and means either X or Y.
This commit is contained in:
Oliver Smith 2024-07-08 22:38:11 +02:00
parent 7b451b25de
commit 3e0eba8561
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -3,12 +3,12 @@
from argparse import Namespace from argparse import Namespace
from pathlib import Path from pathlib import Path
from typing import Literal, Optional, TypedDict, Union from typing import Literal, TypedDict
from pmb.core.arch import Arch from pmb.core.arch import Arch
CrossCompileType = Optional[Literal["native"] | Literal["crossdirect"]] CrossCompileType = Literal["native"] | Literal["crossdirect"] | None
PathString = Union[Path, str] PathString = Path | str
Env = dict[str, PathString] Env = dict[str, PathString]
# These types are not definitive / API, they exist to describe the current # These types are not definitive / API, they exist to describe the current