diff --git a/.github/package.json b/.github/package.json index 19e0a77406b7..c391d2f6b20c 100644 --- a/.github/package.json +++ b/.github/package.json @@ -1,5 +1,5 @@ { "devDependencies": { - "pyright": "1.1.371" + "pyright": "1.1.373" } } diff --git a/tests/test_command.py b/tests/test_command.py index 80df32138e13..31e375a97e73 100644 --- a/tests/test_command.py +++ b/tests/test_command.py @@ -112,15 +112,21 @@ def myexp(a: float, b: float) -> float: return a**b # input parsing + # since the Command class is not generic + # in the input type this does not understand + # that this command should only be called with + # float/int. We ignore this below cmd: Command[float, float] = Command( - 1, abs, input_parser=lambda x: x + 1 - ) # pyright: ignore + 1, + abs, # pyright: ignore + input_parser=lambda x: x + 1, + ) assert cmd(-10) == 9 # input *and* output parsing cmd = Command( 1, - abs, + abs, # pyright: ignore input_parser=lambda x: x + 2, output_parser=lambda y: 3 * y, # pyright: ignore )