mypy icon indicating copy to clipboard operation
mypy copied to clipboard

Follow-up after #19025: test and cleanup

Open sterliakov opened this issue 7 months ago • 2 comments

As requested by @ilevkivskyi in #19025

sterliakov avatar Jun 13 '25 16:06 sterliakov

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

github-actions[bot] avatar Jun 13 '25 17:06 github-actions[bot]

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

github-actions[bot] avatar Jun 18 '25 16:06 github-actions[bot]

The primer change is bad but unrelated. Opened #19358 to address it.

sterliakov avatar Jun 29 '25 23:06 sterliakov

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

github-actions[bot] avatar Jun 30 '25 00:06 github-actions[bot]

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

github-actions[bot] avatar Jun 30 '25 02:06 github-actions[bot]

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 :-)

ilevkivskyi avatar Aug 03 '25 00:08 ilevkivskyi

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

github-actions[bot] avatar Aug 03 '25 00:08 github-actions[bot]

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

github-actions[bot] avatar Aug 03 '25 12:08 github-actions[bot]