Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GetEdk2RelativePathFromAbsolutePath and GetAbsolutePathOnThisSystemFromEdk2RelativePath path input type hinting #672

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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