execution-spec-tests
execution-spec-tests copied to clipboard
'"Literal[Opcodes.CALL]" not callable' errors after updating mypy from 0.98 to 1.4
Didn't manage to find a quick fix. Tried to subclass Opcodes as Callable; didn't work. Ran out of ideas.
➜ mypy tests
tests/cancun/eip4788_beacon_root/conftest.py:103: error: "Literal[Opcodes.CALL]" not callable [misc]
tests/cancun/eip4788_beacon_root/conftest.py:103: error: "Literal[Opcodes.CALLCODE]" not callable [misc]
tests/cancun/eip4788_beacon_root/conftest.py:117: error: "Literal[Opcodes.DELEGATECALL]" not callable [misc]
tests/cancun/eip4788_beacon_root/conftest.py:117: error: "Literal[Opcodes.STATICCALL]" not callable [misc]
tests/cancun/eip4844_blobs/test_point_evaluation_precompile_gas.py:93: error: "Literal[Opcodes.CALL]" not callable [misc]
tests/cancun/eip4844_blobs/test_point_evaluation_precompile_gas.py:93: error: "Literal[Opcodes.CALLCODE]" not callable [misc]
tests/cancun/eip4844_blobs/test_point_evaluation_precompile_gas.py:105: error: "Literal[Opcodes.DELEGATECALL]" not callable [misc]
tests/cancun/eip4844_blobs/test_point_evaluation_precompile_gas.py:105: error: "Literal[Opcodes.STATICCALL]" not callable [misc]
tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py:117: error: "Literal[Opcodes.CALL]" not callable [misc]
tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py:117: error: "Literal[Opcodes.CALLCODE]" not callable [misc]
tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py:131: error: "Literal[Opcodes.DELEGATECALL]" not callable [misc]
tests/cancun/eip4844_blobs/test_point_evaluation_precompile.py:131: error: "Literal[Opcodes.STATICCALL]" not callable [misc]
Found 12 errors in 3 files (checked 61 source files)
Disabled typechecking on the offending lines, find them by searching for this issue. Applied:
# type: ignore # https://github.com/ethereum/execution-spec-tests/issues/348 # noqa: E501