mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-13 03:19:47 +03:00
Run ruff check --fix (MR 2357)
Now that we have target-version = "py310" in [tool.ruff] in pyproject.toml, ruff check complains about using typing.Optional and typing.Union instead of newer syntax. Run the tool to fix it.
This commit is contained in:
parent
9fd45fb334
commit
36dd53f402
25 changed files with 116 additions and 130 deletions
10
pmb/types.py
10
pmb/types.py
|
@ -7,7 +7,7 @@ from typing import Literal, Optional, TypedDict, Union
|
|||
|
||||
from pmb.core.arch import Arch
|
||||
|
||||
CrossCompileType = Optional[Union[Literal["native"], Literal["crossdirect"]]]
|
||||
CrossCompileType = Optional[Literal["native"] | Literal["crossdirect"]]
|
||||
PathString = Union[Path, str]
|
||||
Env = dict[str, PathString]
|
||||
|
||||
|
@ -17,9 +17,9 @@ Env = dict[str, PathString]
|
|||
|
||||
|
||||
class PartitionLayout(TypedDict):
|
||||
kernel: Optional[int]
|
||||
kernel: int | None
|
||||
boot: int
|
||||
reserve: Optional[int]
|
||||
reserve: int | None
|
||||
root: int
|
||||
|
||||
|
||||
|
@ -42,8 +42,8 @@ class PmbArgs(Namespace):
|
|||
all_stable: bool
|
||||
android_recovery_zip: bool
|
||||
apkindex_path: Path
|
||||
aports: Optional[list[Path]]
|
||||
arch: Optional[Arch]
|
||||
aports: list[Path] | None
|
||||
arch: Arch | None
|
||||
as_root: bool
|
||||
assume_yes: bool
|
||||
auto: bool
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue