forked from Mirror/pmbootstrap
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
|
@ -5,17 +5,16 @@ from pathlib import Path
|
|||
import subprocess
|
||||
from pmb.core.arch import Arch
|
||||
import pmb.helpers.run_core
|
||||
from typing import Optional
|
||||
from collections.abc import Sequence
|
||||
from pmb.types import Env, PathString
|
||||
|
||||
|
||||
def user(
|
||||
cmd: Sequence[PathString],
|
||||
working_dir: Optional[Path] = None,
|
||||
working_dir: Path | None = None,
|
||||
output: str = "log",
|
||||
output_return: bool = False,
|
||||
check: Optional[bool] = None,
|
||||
check: bool | None = None,
|
||||
env: Env = {},
|
||||
sudo: bool = False,
|
||||
) -> str | int | subprocess.Popen:
|
||||
|
@ -56,9 +55,9 @@ def user(
|
|||
# FIXME: should probably use some kind of wrapper class / builder pattern for all these parameters...
|
||||
def user_output(
|
||||
cmd: Sequence[PathString],
|
||||
working_dir: Optional[Path] = None,
|
||||
working_dir: Path | None = None,
|
||||
output: str = "log",
|
||||
check: Optional[bool] = None,
|
||||
check: bool | None = None,
|
||||
env: Env = {},
|
||||
sudo: bool = False,
|
||||
) -> str:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue