Skip to content
New issue

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

Added support for evaluating the slice class type arguments for sli… #9534

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

erictraut
Copy link
Collaborator

…ce expressions. This addresses #9533.

Copy link
Contributor

github-actions bot commented Dec 2, 2024

Diff from mypy_primer, showing the effect of this PR on open source code:

kornia (https://github.com/kornia/kornia)
-   /tmp/mypy_primer/projects/kornia/kornia/filters/gaussian.py:64:46 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[1]]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/kornia/kornia/filters/gaussian.py:64:46 - error: Argument of type "tuple[slice[None, None, None], Literal[1]]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[1]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[None, None, None], Literal[1]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/kornia/kornia/filters/gaussian.py:65:46 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[0]]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/kornia/kornia/filters/gaussian.py:65:46 - error: Argument of type "tuple[slice[None, None, None], Literal[0]]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[0]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[None, None, None], Literal[0]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/kornia/kornia/filters/kernels.py:658:24 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[0], None]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/kornia/kornia/filters/kernels.py:658:24 - error: Argument of type "tuple[slice[None, None, None], Literal[0], None]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[0], None]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[None, None, None], Literal[0], None]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/kornia/kornia/filters/kernels.py:658:43 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[1], None]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/kornia/kornia/filters/kernels.py:658:43 - error: Argument of type "tuple[slice[None, None, None], Literal[1], None]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[1], None]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[None, None, None], Literal[1], None]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/kornia/kornia/filters/kernels.py:716:33 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[0], None]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/kornia/kornia/filters/kernels.py:716:33 - error: Argument of type "tuple[slice[None, None, None], Literal[0], None]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[0], None]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[None, None, None], Literal[0], None]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/kornia/kornia/filters/kernels.py:716:52 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[1], None]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/kornia/kornia/filters/kernels.py:716:52 - error: Argument of type "tuple[slice[None, None, None], Literal[1], None]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[1], None]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[None, None, None], Literal[1], None]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/kornia/kornia/filters/kernels.py:716:71 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[2], None]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/kornia/kornia/filters/kernels.py:716:71 - error: Argument of type "tuple[slice[None, None, None], Literal[2], None]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[2], None]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[None, None, None], Literal[2], None]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/kornia/kornia/filters/kernels_geometry.py:184:31 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[0]]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/kornia/kornia/filters/kernels_geometry.py:184:31 - error: Argument of type "tuple[slice[None, None, None], Literal[0]]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[0]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[None, None, None], Literal[0]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/kornia/kornia/filters/kernels_geometry.py:184:44 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[1]]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/kornia/kornia/filters/kernels_geometry.py:184:44 - error: Argument of type "tuple[slice[None, None, None], Literal[1]]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[1]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[None, None, None], Literal[1]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/kornia/kornia/filters/kernels_geometry.py:184:57 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[2]]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/kornia/kornia/filters/kernels_geometry.py:184:57 - error: Argument of type "tuple[slice[None, None, None], Literal[2]]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Literal[2]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[None, None, None], Literal[2]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/kornia/kornia/geometry/boxes.py:326:21 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], None, slice[_StartT@slice, _StopT@slice, _StepT@slice]]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], None, slice[_StartT@slice, _StopT@slice, _StepT@slice]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+   /tmp/mypy_primer/projects/kornia/kornia/geometry/boxes.py:326:21 - error: Argument of type "tuple[slice[None, None, None], None, slice[None, Literal[1], None]]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
+     "tuple[slice[None, None, None], None, slice[None, Literal[1], None]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/kornia/kornia/geometry/boxes.py:329:21 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], None, slice[_StartT@slice, _StopT@slice, _StepT@slice]]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], None, slice[_StartT@slice, _StopT@slice, _StepT@slice]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+   /tmp/mypy_primer/projects/kornia/kornia/geometry/boxes.py:329:21 - error: Argument of type "tuple[slice[None, None, None], None, slice[Literal[1], None, None]]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
+     "tuple[slice[None, None, None], None, slice[Literal[1], None, None]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/kornia/kornia/geometry/boxes.py:332:22 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], None, slice[_StartT@slice, _StopT@slice, _StepT@slice]]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"

... (truncated 7 lines) ...

sympy (https://github.com/sympy/sympy)
-   /tmp/mypy_primer/projects/sympy/sympy/polys/subresultants_qq_zz.py:453:28 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], slice[_StartT@slice, _StopT@slice, _StepT@slice]]" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/sympy/sympy/polys/subresultants_qq_zz.py:453:28 - error: Argument of type "tuple[slice[None, None, None], slice[Literal[0], Unknown, None]]" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], slice[_StartT@slice, _StopT@slice, _StepT@slice]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[None, None, None], slice[Literal[0], Unknown, None]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/polys/subresultants_qq_zz.py:521:28 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], slice[_StartT@slice, _StopT@slice, _StepT@slice]]" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/sympy/sympy/polys/subresultants_qq_zz.py:521:28 - error: Argument of type "tuple[slice[None, None, None], slice[Literal[0], Unknown, None]]" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], slice[_StartT@slice, _StopT@slice, _StepT@slice]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[None, None, None], slice[Literal[0], Unknown, None]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/polys/subresultants_qq_zz.py:777:28 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], slice[_StartT@slice, _StopT@slice, _StepT@slice]]" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], slice[_StartT@slice, _StopT@slice, _StepT@slice]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+   /tmp/mypy_primer/projects/sympy/sympy/polys/subresultants_qq_zz.py:777:28 - error: Argument of type "tuple[slice[None, None, None], slice[Literal[0], Unbound | int, None]]" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"
+     "tuple[slice[None, None, None], slice[Literal[0], Unbound | int, None]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/sympy/sympy/polys/subresultants_qq_zz.py:852:28 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], slice[_StartT@slice, _StopT@slice, _StepT@slice]]" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], slice[_StartT@slice, _StopT@slice, _StepT@slice]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+   /tmp/mypy_primer/projects/sympy/sympy/polys/subresultants_qq_zz.py:852:28 - error: Argument of type "tuple[slice[None, None, None], slice[Literal[0], Unbound | int, None]]" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"
+     "tuple[slice[None, None, None], slice[Literal[0], Unbound | int, None]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)

scikit-learn (https://github.com/scikit-learn/scikit-learn)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/discriminant_analysis.py:1009:18 - error: Argument of type "tuple[Unknown, slice[_StartT@slice, _StopT@slice, _StepT@slice]]" cannot be assigned to parameter "key" of type "SupportsIndex | slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/discriminant_analysis.py:1009:18 - error: Argument of type "tuple[Unknown, slice[None, None, None]]" cannot be assigned to parameter "key" of type "SupportsIndex | slice[Any, Any, Any]" in function "__getitem__"
-     Type "tuple[Unknown, slice[_StartT@slice, _StopT@slice, _StepT@slice]]" is not assignable to type "SupportsIndex | slice[Any, Any, Any]"
+     Type "tuple[Unknown, slice[None, None, None]]" is not assignable to type "SupportsIndex | slice[Any, Any, Any]"
-       "tuple[Unknown, slice[_StartT@slice, _StopT@slice, _StepT@slice]]" is incompatible with protocol "SupportsIndex"
+       "tuple[Unknown, slice[None, None, None]]" is incompatible with protocol "SupportsIndex"
-       "tuple[Unknown, slice[_StartT@slice, _StopT@slice, _StepT@slice]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+       "tuple[Unknown, slice[None, None, None]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/multiclass.py:985:19 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Any]" cannot be assigned to parameter "key" of type "SupportsIndex | slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/multiclass.py:985:19 - error: Argument of type "tuple[slice[None, None, None], Any]" cannot be assigned to parameter "key" of type "SupportsIndex | slice[Any, Any, Any]" in function "__getitem__"
-     Type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Any]" is not assignable to type "SupportsIndex | slice[Any, Any, Any]"
+     Type "tuple[slice[None, None, None], Any]" is not assignable to type "SupportsIndex | slice[Any, Any, Any]"
-       "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Any]" is incompatible with protocol "SupportsIndex"
+       "tuple[slice[None, None, None], Any]" is incompatible with protocol "SupportsIndex"
-       "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Any]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+       "tuple[slice[None, None, None], Any]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/multiclass.py:985:19 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Any]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/multiclass.py:985:19 - error: Argument of type "tuple[slice[None, None, None], Any]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Any]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[None, None, None], Any]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/multioutput.py:193:17 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], int]" cannot be assigned to parameter "key" of type "SupportsIndex | slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/multioutput.py:193:17 - error: Argument of type "tuple[slice[None, None, None], int]" cannot be assigned to parameter "key" of type "SupportsIndex | slice[Any, Any, Any]" in function "__getitem__"
-     Type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], int]" is not assignable to type "SupportsIndex | slice[Any, Any, Any]"
+     Type "tuple[slice[None, None, None], int]" is not assignable to type "SupportsIndex | slice[Any, Any, Any]"
-       "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], int]" is incompatible with protocol "SupportsIndex"
+       "tuple[slice[None, None, None], int]" is incompatible with protocol "SupportsIndex"
-       "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], int]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+       "tuple[slice[None, None, None], int]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/multioutput.py:193:17 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], int]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/multioutput.py:193:17 - error: Argument of type "tuple[slice[None, None, None], int]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], int]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[None, None, None], int]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/multioutput.py:276:36 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], int]" cannot be assigned to parameter "key" of type "SupportsIndex | slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/multioutput.py:276:36 - error: Argument of type "tuple[slice[None, None, None], int]" cannot be assigned to parameter "key" of type "SupportsIndex | slice[Any, Any, Any]" in function "__getitem__"
-     Type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], int]" is not assignable to type "SupportsIndex | slice[Any, Any, Any]"
+     Type "tuple[slice[None, None, None], int]" is not assignable to type "SupportsIndex | slice[Any, Any, Any]"
-       "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], int]" is incompatible with protocol "SupportsIndex"
+       "tuple[slice[None, None, None], int]" is incompatible with protocol "SupportsIndex"
-       "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], int]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+       "tuple[slice[None, None, None], int]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/multioutput.py:276:36 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], int]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/multioutput.py:276:36 - error: Argument of type "tuple[slice[None, None, None], int]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], int]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[None, None, None], int]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/multioutput.py:740:28 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Unknown | str]" cannot be assigned to parameter "key" of type "SupportsIndex | slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/multioutput.py:740:28 - error: Argument of type "tuple[slice[None, None, None], Unknown | str]" cannot be assigned to parameter "key" of type "SupportsIndex | slice[Any, Any, Any]" in function "__getitem__"
-     Type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Unknown | str]" is not assignable to type "SupportsIndex | slice[Any, Any, Any]"
+     Type "tuple[slice[None, None, None], Unknown | str]" is not assignable to type "SupportsIndex | slice[Any, Any, Any]"
-       "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Unknown | str]" is incompatible with protocol "SupportsIndex"
+       "tuple[slice[None, None, None], Unknown | str]" is incompatible with protocol "SupportsIndex"
-       "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Unknown | str]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+       "tuple[slice[None, None, None], Unknown | str]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/scikit-learn/sklearn/multioutput.py:790:17 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Unknown | str]" cannot be assigned to parameter "key" of type "SupportsIndex | slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/scikit-learn/sklearn/multioutput.py:790:17 - error: Argument of type "tuple[slice[None, None, None], Unknown | str]" cannot be assigned to parameter "key" of type "SupportsIndex | slice[Any, Any, Any]" in function "__getitem__"
-     Type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Unknown | str]" is not assignable to type "SupportsIndex | slice[Any, Any, Any]"
+     Type "tuple[slice[None, None, None], Unknown | str]" is not assignable to type "SupportsIndex | slice[Any, Any, Any]"
-       "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Unknown | str]" is incompatible with protocol "SupportsIndex"
+       "tuple[slice[None, None, None], Unknown | str]" is incompatible with protocol "SupportsIndex"
-       "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], Unknown | str]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+       "tuple[slice[None, None, None], Unknown | str]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)

... (truncated 955 lines) ...

streamlit (https://github.com/streamlit/streamlit)
-   /tmp/mypy_primer/projects/streamlit/lib/streamlit/elements/lib/image_utils.py:318:25 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], slice[_StartT@slice, _StopT@slice, _StepT@slice], list[int]]" cannot be assigned to parameter "key" of type "SupportsIndex | slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/streamlit/lib/streamlit/elements/lib/image_utils.py:318:25 - error: Argument of type "tuple[slice[None, None, None], slice[None, None, None], list[int]]" cannot be assigned to parameter "key" of type "SupportsIndex | slice[Any, Any, Any]" in function "__getitem__"
-     Type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], slice[_StartT@slice, _StopT@slice, _StepT@slice], list[int]]" is not assignable to type "SupportsIndex | slice[Any, Any, Any]"
+     Type "tuple[slice[None, None, None], slice[None, None, None], list[int]]" is not assignable to type "SupportsIndex | slice[Any, Any, Any]"
-       "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], slice[_StartT@slice, _StopT@slice, _StepT@slice], list[int]]" is incompatible with protocol "SupportsIndex"
+       "tuple[slice[None, None, None], slice[None, None, None], list[int]]" is incompatible with protocol "SupportsIndex"
-       "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], slice[_StartT@slice, _StopT@slice, _StepT@slice], list[int]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+       "tuple[slice[None, None, None], slice[None, None, None], list[int]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/streamlit/lib/streamlit/elements/lib/image_utils.py:318:25 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], slice[_StartT@slice, _StopT@slice, _StepT@slice], list[int]]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/streamlit/lib/streamlit/elements/lib/image_utils.py:318:25 - error: Argument of type "tuple[slice[None, None, None], slice[None, None, None], list[int]]" cannot be assigned to parameter "key" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], slice[_StartT@slice, _StopT@slice, _StepT@slice], list[int]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[None, None, None], slice[None, None, None], list[int]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)

ignite (https://github.com/pytorch/ignite)
-   /tmp/mypy_primer/projects/ignite/tests/ignite/metrics/test_accuracy.py:383:17 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], slice[_StartT@slice, _StopT@slice, _StepT@slice]]" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/ignite/tests/ignite/metrics/test_accuracy.py:383:17 - error: Argument of type "tuple[slice[Unknown, Unknown, None], slice[None, None, None]]" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], slice[_StartT@slice, _StopT@slice, _StepT@slice]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[Unknown, Unknown, None], slice[None, None, None]]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/ignite/tests/ignite/metrics/test_accuracy.py:444:17 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], EllipsisType]" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/ignite/tests/ignite/metrics/test_accuracy.py:444:17 - error: Argument of type "tuple[slice[Unknown, Unknown, None], EllipsisType]" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], EllipsisType]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[Unknown, Unknown, None], EllipsisType]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/ignite/tests/ignite/metrics/test_accuracy.py:445:17 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], EllipsisType]" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/ignite/tests/ignite/metrics/test_accuracy.py:445:17 - error: Argument of type "tuple[slice[Unknown, Unknown, None], EllipsisType]" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], EllipsisType]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[Unknown, Unknown, None], EllipsisType]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/ignite/tests/ignite/metrics/test_accuracy.py:517:29 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], EllipsisType]" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/ignite/tests/ignite/metrics/test_accuracy.py:517:29 - error: Argument of type "tuple[slice[Unknown, Unknown, None], EllipsisType]" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"
-     "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], EllipsisType]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
+     "tuple[slice[Unknown, Unknown, None], EllipsisType]" is not assignable to "slice[Any, Any, Any]" (reportArgumentType)
-   /tmp/mypy_primer/projects/ignite/tests/ignite/metrics/test_classification_report.py:26:17 - error: Argument of type "tuple[slice[_StartT@slice, _StopT@slice, _StepT@slice], slice[_StartT@slice, _StopT@slice, _StepT@slice]]" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"
+   /tmp/mypy_primer/projects/ignite/tests/ignite/metrics/test_classification_report.py:26:17 - error: Argument of type "tuple[slice[Unknown, Unknown, None], slice[None, None, None]]" cannot be assigned to parameter "s" of type "slice[Any, Any, Any]" in function "__getitem__"

... (truncated 151 lines) ...```

@erictraut erictraut merged commit b0cd5f1 into main Dec 2, 2024
18 checks passed
@erictraut erictraut deleted the issue-9533 branch December 2, 2024 19:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant