diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 8ad72d8d..be45db46 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -32,6 +32,11 @@ jobs: uv sync --python 3.12 --frozen uv run --python 3.12 --frozen python src/main.py + - name: Validate conformance invariants + working-directory: conformance + run: | + uv run --python 3.12 --frozen python src/validate_results.py + - name: Assert conformance results are up to date run: | if [ -n "$(git status --porcelain -- conformance/results)" ]; then diff --git a/conformance/results/mypy/constructors_call_metaclass.toml b/conformance/results/mypy/constructors_call_metaclass.toml index 8ee382df..933983b1 100644 --- a/conformance/results/mypy/constructors_call_metaclass.toml +++ b/conformance/results/mypy/constructors_call_metaclass.toml @@ -1,4 +1,4 @@ -conformant = "Unupported" +conformant = "Unsupported" notes = """ Does not honor metaclass __call__ method when evaluating constructor call. Does not skip evaluation of __new__ and __init__ if custom metaclass call returns non-class. diff --git a/conformance/results/mypy/generics_defaults.toml b/conformance/results/mypy/generics_defaults.toml index efa709a2..5b18af90 100644 --- a/conformance/results/mypy/generics_defaults.toml +++ b/conformance/results/mypy/generics_defaults.toml @@ -1,4 +1,8 @@ conformant = "Partial" +notes = """ +Does not detect a TypeVar with a default used after a TypeVarTuple. +Does not fully support defaults on TypeVarTuple and ParamSpec. +""" output = """ generics_defaults.py:24: error: "T" cannot appear after "DefaultStrT" in type parameter list because it has no default type [misc] generics_defaults.py:66: error: "AllTheDefaults" expects between 2 and 5 type arguments, but 1 given [type-arg] diff --git a/conformance/results/mypy/generics_defaults_referential.toml b/conformance/results/mypy/generics_defaults_referential.toml index bad58984..7f28d7cc 100644 --- a/conformance/results/mypy/generics_defaults_referential.toml +++ b/conformance/results/mypy/generics_defaults_referential.toml @@ -1,4 +1,7 @@ conformant = "Partial" +notes = """ +Does not correctly handle defaults referencing other TypeVars. +""" output = """ generics_defaults_referential.py:23: error: Expression is of type "type[slice[StartT, StopT, StepT]]", not "type[slice[int, int, int | None]]" [assert-type] generics_defaults_referential.py:37: error: Argument 1 to "Foo" has incompatible type "str"; expected "int" [arg-type] diff --git a/conformance/results/mypy/generics_defaults_specialization.toml b/conformance/results/mypy/generics_defaults_specialization.toml index b29ba389..a40e0dc9 100644 --- a/conformance/results/mypy/generics_defaults_specialization.toml +++ b/conformance/results/mypy/generics_defaults_specialization.toml @@ -1,4 +1,7 @@ conformant = "Partial" +notes = """ +Does not correctly resolve defaults when classes are used directly. +""" output = """ generics_defaults_specialization.py:30: error: Bad number of arguments for type alias, expected between 0 and 1, given 2 [type-arg] generics_defaults_specialization.py:45: error: Expression is of type "type[Bar[DefaultStrT]]", not "type[Bar[str]]" [assert-type] diff --git a/conformance/results/results.html b/conformance/results/results.html index 249f6b70..d0a5b2aa 100644 --- a/conformance/results/results.html +++ b/conformance/results/results.html @@ -277,21 +277,21 @@
Incorrectly allows constrained type variables to be solved to a union of their constraints.
Does not detect a TypeVar with a default used after a TypeVarTuple.
Does not fully support defaults on TypeVarTuple and ParamSpec.
Does not forbid a `TypeVar` immediately following a `TypeVarTuple` in a parameter list from having a default.
Does not support `TypeVarTuple`.
Does not fully support defaults for `ParamSpec`s.
Does not correctly handle defaults referencing other TypeVars.
Does not correctly resolve defaults when classes are used directly.
Does not reject invalid argument types to an inherited constructor in a specialized subclass of a generic superclass.
Does not reject class-scoped type variables used in the `self` annotation.
Does not support inferring type variables for generic classes where the `__init__` method uses method-scoped type variables.
Does not honor metaclass __call__ method when evaluating constructor call.
Does not skip evaluation of __new__ and __init__ if custom metaclass call returns non-class.
Does not honor metaclass __call__ method when evaluating constructor call.
Does not skip evaluation of __new__ and __init__ if custom metaclass call returns non-class.