We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Likely a duplicate of the same issue encountered in #17321, but posting because that issue was closed.
Bug Report
Mypyc seems to encounter an error when handling Literal[<anything>]
Literal[<anything>]
To Reproduce
base_io.py
from __future__ import annotations from enum import Enum from typing import Literal, TypeAlias class StructFormat(str, Enum): """All possible write/read struct types. .. seealso: :module:`struct` module documentation. """ BOOL = "?" CHAR = "c" BYTE = "b" UBYTE = "B" SHORT = "h" USHORT = "H" INT = "i" UINT = "I" LONG = "l" ULONG = "L" FLOAT = "f" DOUBLE = "d" HALFFLOAT = "e" LONGLONG = "q" ULONGLONG = "Q" INT_FORMATS_TYPE: TypeAlias = Literal[ StructFormat.BYTE, StructFormat.UBYTE, StructFormat.SHORT, StructFormat.USHORT, StructFormat.INT, StructFormat.UINT, StructFormat.LONG, StructFormat.ULONG, StructFormat.LONGLONG, StructFormat.ULONGLONG, ] FLOAT_FORMATS_TYPE: TypeAlias = Literal[ StructFormat.FLOAT, StructFormat.DOUBLE, StructFormat.HALFFLOAT, ]
mypyc base_io.py
Expected Behavior
No issues
Actual Behavior
Traceback (most recent call last): base_io.py:32: KeyError: <mypy.nodes.MemberExpr object at 0x7038e01022a0>
Your Environment
mypy 1.11.2 (compiled: yes)
mypy.ini
Python 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] on linux
The text was updated successfully, but these errors were encountered:
Closing in favor of mypyc/mypyc#1064
Sorry, something went wrong.
No branches or pull requests
Likely a duplicate of the same issue encountered in #17321, but posting because that issue was closed.
Bug Report
Mypyc seems to encounter an error when handling
Literal[<anything>]
To Reproduce
base_io.py
mypyc base_io.py
Expected Behavior
No issues
Actual Behavior
Your Environment
mypy 1.11.2 (compiled: yes)
mypy.ini
(and other config files): NonePython 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] on linux
The text was updated successfully, but these errors were encountered: