Skip to content

'"Literal[Opcodes.CALL]" not callable' errors after updating mypy from 0.98 to 1.4 #348

Open
@danceratopz

Description

@danceratopz

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope:toolingScope: Python tools (uv, ruff, tox,...)type:choreType: Chore

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions