Skip to content

Commit

Permalink
Update GetEdk2RelativePathFromAbsolutePath and GetAbsolutePathOnThisS…
Browse files Browse the repository at this point in the history
…ystemFromEdk2RelativePath path input type hinting
  • Loading branch information
antklein authored Nov 21, 2024
1 parent 1d941cf commit 131a60f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions edk2toollib/uefi/edk2/path_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 131a60f

Please sign in to comment.