diff --git a/pmb/commands/log.py b/pmb/commands/log.py index 414b53d5..e19351dc 100644 --- a/pmb/commands/log.py +++ b/pmb/commands/log.py @@ -2,7 +2,6 @@ # SPDX-License-Identifier: GPL-3.0-or-later from __future__ import annotations -from typing import List from pmb import commands from pmb.types import PathString from pmb.helpers import run @@ -26,7 +25,7 @@ class Log(commands.Command): run.user(["truncate", "-s", "0", context.log]) run.user(["truncate", "-s", "0", log_testsuite]) - cmd: List[PathString] = ["tail", "-n", str(self.lines), "-F"] + cmd: list[PathString] = ["tail", "-n", str(self.lines), "-F"] # Follow the testsuite's log file too if it exists. It will be created when # starting a test case that writes to it (git -C test grep log_testsuite). diff --git a/pmb/core/chroot.py b/pmb/core/chroot.py index df648a2e..0fe2c330 100644 --- a/pmb/core/chroot.py +++ b/pmb/core/chroot.py @@ -3,7 +3,7 @@ from __future__ import annotations import enum -from typing import Generator, Optional, Union +from typing import Generator from pathlib import Path, PosixPath, PurePosixPath import pmb.config from pmb.core.arch import Arch @@ -25,7 +25,7 @@ class Chroot: __type: ChrootType __name: str - def __init__(self, suffix_type: ChrootType, name: Optional[Union[str, Arch]] = ""): + def __init__(self, suffix_type: ChrootType, name: str | Arch | None = ""): # We use the native chroot as the buildroot when building for the host arch if suffix_type == ChrootType.BUILDROOT and isinstance(name, Arch): if name.is_native():