Follow-up after #19025: test and cleanup
As requested by @ilevkivskyi in #19025
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
Diff from mypy_primer, showing the effect of this PR on open source code:
colour (https://github.com/colour-science/colour)
+ colour/io/luts/tests/test_lut.py:521: note: "dict" is missing following "_NestedSequence" protocol members:
+ colour/io/luts/tests/test_lut.py:521: note: count, index
+ colour/io/luts/tests/test_lut.py:521: note: Following member(s) of "dict[str, object]" have conflicts:
+ colour/io/luts/tests/test_lut.py:521: note: Expected:
+ colour/io/luts/tests/test_lut.py:521: note: def __getitem__(self, int, /) -> _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]]
+ colour/io/luts/tests/test_lut.py:521: note: Got:
+ colour/io/luts/tests/test_lut.py:521: note: def __getitem__(self, str, /) -> object
+ colour/io/luts/tests/test_lut.py:521: note: Expected:
+ colour/io/luts/tests/test_lut.py:521: note: def __iter__(self) -> Iterator[_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]]]
+ colour/io/luts/tests/test_lut.py:521: note: Got:
+ colour/io/luts/tests/test_lut.py:521: note: def __iter__(self) -> Iterator[str]
+ colour/io/luts/tests/test_lut.py:521: note: <1 more conflict(s) not shown>
+ colour/io/luts/tests/test_lut.py:521: note: "dict" is missing following "_NestedSequence" protocol members:
+ colour/io/luts/tests/test_lut.py:521: note: count, index
+ colour/io/luts/tests/test_lut.py:521: note: Following member(s) of "dict[str, object]" have conflicts:
+ colour/io/luts/tests/test_lut.py:521: note: Expected:
+ colour/io/luts/tests/test_lut.py:521: note: def __getitem__(self, int, /) -> complex | bytes | str | _NestedSequence[complex | bytes | str]
+ colour/io/luts/tests/test_lut.py:521: note: Got:
+ colour/io/luts/tests/test_lut.py:521: note: def __getitem__(self, str, /) -> object
The primer change is bad but unrelated. Opened #19358 to address it.
Diff from mypy_primer, showing the effect of this PR on open source code:
colour (https://github.com/colour-science/colour)
+ colour/io/luts/tests/test_lut.py:521: note: "dict" is missing following "_NestedSequence" protocol members:
+ colour/io/luts/tests/test_lut.py:521: note: count, index
+ colour/io/luts/tests/test_lut.py:521: note: Following member(s) of "dict[str, object]" have conflicts:
+ colour/io/luts/tests/test_lut.py:521: note: Expected:
+ colour/io/luts/tests/test_lut.py:521: note: def __getitem__(self, int, /) -> _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]]
+ colour/io/luts/tests/test_lut.py:521: note: Got:
+ colour/io/luts/tests/test_lut.py:521: note: def __getitem__(self, str, /) -> object
+ colour/io/luts/tests/test_lut.py:521: note: Expected:
+ colour/io/luts/tests/test_lut.py:521: note: def __iter__(self) -> Iterator[_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]]]
+ colour/io/luts/tests/test_lut.py:521: note: Got:
+ colour/io/luts/tests/test_lut.py:521: note: def __iter__(self) -> Iterator[str]
+ colour/io/luts/tests/test_lut.py:521: note: <1 more conflict(s) not shown>
+ colour/io/luts/tests/test_lut.py:521: note: "dict" is missing following "_NestedSequence" protocol members:
+ colour/io/luts/tests/test_lut.py:521: note: count, index
+ colour/io/luts/tests/test_lut.py:521: note: Following member(s) of "dict[str, object]" have conflicts:
+ colour/io/luts/tests/test_lut.py:521: note: Expected:
+ colour/io/luts/tests/test_lut.py:521: note: def __getitem__(self, int, /) -> complex | bytes | str | _NestedSequence[complex | bytes | str]
+ colour/io/luts/tests/test_lut.py:521: note: Got:
+ colour/io/luts/tests/test_lut.py:521: note: def __getitem__(self, str, /) -> object
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
Oh well, now the test fails because type var ids need to be updated. I am too lazy to checkout and fix myself, so I will wait for you :-)
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅