Skip to content

Commit

Permalink
amend! machine.linux: Fix a mypy error
Browse files Browse the repository at this point in the history
machine.linux: Fix a mypy error

Mypy was complaining that

    tbot/machine/linux/build.py:65:
    error: Argument 2 to "exec0" of "LinuxShell" has incompatible type
    "Path[H@__init__]"; expected "Union[str, Special[H@enable],
    Path[H@enable]]"

Tweak the code so mypy correctly understands the relationship between
types.
  • Loading branch information
Rahix committed Aug 1, 2024
1 parent d2a9e5a commit 727b771
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tbot/tc/selftest/tc/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def toolchains(self) -> typing.Dict[str, linux.build.Toolchain]:
"""Return toolchains available on this host."""
return {
"selftest-toolchain": linux.build.EnvScriptToolchain(
self.workdir / ".selftest-toolchain.sh"
self.workdir / ".selftest-toolchain.sh" # type: ignore
)
}

Expand Down

0 comments on commit 727b771

Please sign in to comment.