Summary
ty naively assumes sys.implementation.version as equivalent to sys.version_info. This can be seen by the VS Code extension, running the language server, highlighting a branch in the following snippet as reachable when I configure the Python version to be >=3.12:
from sys import implementation as I
match I.name:
case 'cpython':
if I.version < (3, 12): raise ImportError('CPython 3.12 or above required') # unreachable, as expected -> darkened
case 'graalpy':
if I.version[0] < 25: raise ImportError('GraalPy 25 (Python 3.12) or above required') # reachable!
case s: raise ImportError(s)
Version
ty 0.0.42 (7f8cb64 2026-06-01)
Summary
ty naively assumes
sys.implementation.versionas equivalent tosys.version_info. This can be seen by the VS Code extension, running the language server, highlighting a branch in the following snippet as reachable when I configure the Python version to be >=3.12:Version
ty 0.0.42 (7f8cb64 2026-06-01)