meta: include path in RunnerInfo
This is so that once we have a `RunnerInfo` we can directly run it without needed a back-reference to the index.
This commit is contained in:
parent
683a8cbfa7
commit
7c399f15df
1 changed files with 3 additions and 2 deletions
|
|
@ -493,15 +493,16 @@ class RunnerInfo:
|
|||
specific distribution and version.
|
||||
"""
|
||||
|
||||
def __init__(self, distro: str, version: int) -> None:
|
||||
def __init__(self, distro: str, version: int, path: str) -> None:
|
||||
self.distro = distro
|
||||
self.version = version
|
||||
self.path = path
|
||||
|
||||
@classmethod
|
||||
def from_path(cls, path: str):
|
||||
name = os.path.basename(path)
|
||||
distro, version = cls.parse_name(name)
|
||||
return cls(distro, version)
|
||||
return cls(distro, version, path)
|
||||
|
||||
@staticmethod
|
||||
def parse_name(name: str) -> Tuple[str, int]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue