From 131a60fa9b8ec74123ab65baa1a79ed92b461022 Mon Sep 17 00:00:00 2001 From: Antaeus Kleinert-Strand <59579659+antklein@users.noreply.github.com> Date: Thu, 21 Nov 2024 23:27:59 +0000 Subject: [PATCH] Update GetEdk2RelativePathFromAbsolutePath and GetAbsolutePathOnThisSystemFromEdk2RelativePath path input type hinting --- edk2toollib/uefi/edk2/path_utilities.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/edk2toollib/uefi/edk2/path_utilities.py b/edk2toollib/uefi/edk2/path_utilities.py index dfba2a31..341294dc 100644 --- a/edk2toollib/uefi/edk2/path_utilities.py +++ b/edk2toollib/uefi/edk2/path_utilities.py @@ -16,7 +16,7 @@ import logging import os from pathlib import Path -from typing import Iterable, Optional, Tuple +from typing import Iterable, Optional class Edk2Path(object): @@ -144,7 +144,7 @@ def PackagePathList(self: "Edk2Path") -> list[str]: """List of package paths as strings.""" return [str(p) for p in self._package_path_list] - def GetEdk2RelativePathFromAbsolutePath(self, *abspath: Tuple[str, ...]) -> str: + def GetEdk2RelativePathFromAbsolutePath(self, *abspath: str) -> str: """Transforms an absolute path to an edk2 path relative to the workspace or a packages path. Args: @@ -200,9 +200,7 @@ def GetEdk2RelativePathFromAbsolutePath(self, *abspath: Tuple[str, ...]) -> str: self.logger.error(f"AbsolutePath: {abspath}") return None - def GetAbsolutePathOnThisSystemFromEdk2RelativePath( - self, *relpath: Tuple[str, ...], log_errors: Optional[bool] = True - ) -> str: + def GetAbsolutePathOnThisSystemFromEdk2RelativePath(self, *relpath: str, log_errors: Optional[bool] = True) -> str: """Given a relative path return an absolute path to the file in this workspace. Args: