-
Notifications
You must be signed in to change notification settings - Fork 101
fix(ci): Fix pre-commit mypy #2069
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ac6b333 to
dfd3fb0
Compare
This was referenced Oct 21, 2025
dfd3fb0 to
8fa13a9
Compare
Collaborator
Author
$ python -m mypy --config-file=skore-local-project/pyproject.toml skore-local-project/
skore-local-project/src/skore_local_project/metadata.py:17: error: Module "skore" has no attribute "CrossValidationReport" [attr-defined]
skore-local-project/src/skore_local_project/metadata.py:17: error: Module "skore" has no attribute "EstimatorReport" [attr-defined]
skore-local-project/src/skore_local_project/metadata.py:31: error: Module "skore" has no attribute "CrossValidationReport" [attr-defined]
skore-local-project/src/skore_local_project/metadata.py:31: error: Module "skore" has no attribute "EstimatorReport" [attr-defined]
skore-local-project/src/skore_local_project/project.py:22: error: Module "skore" has no attribute "CrossValidationReport" [attr-defined]
skore-local-project/src/skore_local_project/project.py:22: error: Module "skore" has no attribute "EstimatorReport" [attr-defined]
skore-local-project/src/skore_local_project/project.py:206: error: Module "skore" has no attribute "CrossValidationReport" [attr-defined]
skore-local-project/src/skore_local_project/project.py:206: error: Module "skore" has no attribute "EstimatorReport" [attr-defined]
Found 8 errors in 2 files (checked 4 source files) $ python -m mypy --config-file=skore-hub-project/pyproject.toml skore-hub-project/
skore-hub-project/src/skore_hub_project/client/api.py:129: error: "HTTPError" has no attribute "response" [attr-defined]
skore-hub-project/src/skore_hub_project/client/client.py:61: error: Incompatible types in assignment (expression has type "tuple[type[TimeoutException], type[NetworkError], type[RemoteProtocolError]]", variable has type "tuple[HTTPError, ...]") [assignment]
skore-hub-project/src/skore_hub_project/client/client.py:96: error: Exception type must be derived from BaseException (or be a tuple of exception classes) [misc]
skore-hub-project/src/skore_hub_project/report/report.py:86: error: Unexpected keyword argument "report" for "Metric" [call-arg]
skore-hub-project/src/skore_hub_project/report/report.py:108: error: Missing named argument "content_type" for "Media" [call-arg]
skore-hub-project/src/skore_hub_project/report/report.py:108: error: Missing named argument "name" for "Media" [call-arg]
Found 6 errors in 3 files (checked 38 source files)Before #2076 and #2077 that fix the typings, and without this PR (commit 3aa7942): $ pre-commit run --all-files mypy
mypy.....................................................................PassedBefore #2076 and #2077 that fix the typings, and with this PR : $ pre-commit run --all-files mypy
mypy skore/..............................................................Passed
mypy skore-hub-project/..................................................Failed
- hook id: mypy
- exit code: 1
skore-hub-project/src/skore_hub_project/client/api.py:129: error: "HTTPError" has no attribute "response" [attr-defined]
skore-hub-project/src/skore_hub_project/client/client.py:61: error: Incompatible types in assignment (expression has type "tuple[type[TimeoutException], type[NetworkError], type[RemoteProtocolError]]", variable has type "tuple[HTTPError, ...]") [assignment]
skore-hub-project/src/skore_hub_project/client/client.py:96: error: Exception type must be derived from BaseException (or be a tuple of exception classes) [misc]
skore-hub-project/src/skore_hub_project/report/report.py:86: error: Unexpected keyword argument "report" for "Metric" [call-arg]
skore-hub-project/src/skore_hub_project/report/report.py:108: error: Missing named argument "content_type" for "Media" [call-arg]
skore-hub-project/src/skore_hub_project/report/report.py:108: error: Missing named argument "name" for "Media" [call-arg]
Found 6 errors in 3 files (checked 38 source files)
mypy skore-local-project/................................................Failed
- hook id: mypy
- exit code: 1
skore-local-project/src/skore_local_project/metadata.py:17: error: Module "skore" has no attribute "CrossValidationReport" [attr-defined]
skore-local-project/src/skore_local_project/metadata.py:17: error: Module "skore" has no attribute "EstimatorReport" [attr-defined]
skore-local-project/src/skore_local_project/metadata.py:31: error: Module "skore" has no attribute "CrossValidationReport" [attr-defined]
skore-local-project/src/skore_local_project/metadata.py:31: error: Module "skore" has no attribute "EstimatorReport" [attr-defined]
skore-local-project/src/skore_local_project/project.py:22: error: Module "skore" has no attribute "CrossValidationReport" [attr-defined]
skore-local-project/src/skore_local_project/project.py:22: error: Module "skore" has no attribute "EstimatorReport" [attr-defined]
skore-local-project/src/skore_local_project/project.py:206: error: Module "skore" has no attribute "CrossValidationReport" [attr-defined]
skore-local-project/src/skore_local_project/project.py:206: error: Module "skore" has no attribute "EstimatorReport" [attr-defined]
Found 8 errors in 2 files (checked 4 source files)it shows that this PR works and fix our mypy hook! |
Contributor
8fa13a9 to
c7eedb7
Compare
Contributor
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 21, 2025
Prerequisite for #2069. ```bash python -m mypy --config-file=skore-hub-project/pyproject.toml skore-hub-project/ skore-hub-project/src/skore_hub_project/client/api.py:129: error: "HTTPError" has no attribute "response" [attr-defined] skore-hub-project/src/skore_hub_project/client/client.py:61: error: Incompatible types in assignment (expression has type "tuple[type[TimeoutException], type[NetworkError], type[RemoteProtocolError]]", variable has type "tuple[HTTPError, ...]") [assignment] skore-hub-project/src/skore_hub_project/client/client.py:96: error: Exception type must be derived from BaseException (or be a tuple of exception classes) [misc] skore-hub-project/src/skore_hub_project/report/report.py:86: error: Unexpected keyword argument "report" for "Metric" [call-arg] skore-hub-project/src/skore_hub_project/report/report.py:108: error: Missing named argument "content_type" for "Media" [call-arg] skore-hub-project/src/skore_hub_project/report/report.py:108: error: Missing named argument "name" for "Media" [call-arg] ``` --- Note that i: - changed the way a subclass of `ReportPayload` / `Media`/`Metric` can restrict the type of `report`: it worked at runtime but broke the static typing (in particular the Liskov Substitution Principle - LSP), - set abstract pydantic property in abstractclass as `Field(init=False)`.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 21, 2025
Prerequisite for #2069. ```bash python -m mypy --config-file=skore-local-project/pyproject.toml skore-local-project/ skore-local-project/src/skore_local_project/metadata.py:17: error: Module "skore" has no attribute "CrossValidationReport" [attr-defined] skore-local-project/src/skore_local_project/metadata.py:17: error: Module "skore" has no attribute "EstimatorReport" [attr-defined] skore-local-project/src/skore_local_project/metadata.py:31: error: Module "skore" has no attribute "CrossValidationReport" [attr-defined] skore-local-project/src/skore_local_project/metadata.py:31: error: Module "skore" has no attribute "EstimatorReport" [attr-defined] skore-local-project/src/skore_local_project/project.py:22: error: Module "skore" has no attribute "CrossValidationReport" [attr-defined] skore-local-project/src/skore_local_project/project.py:22: error: Module "skore" has no attribute "EstimatorReport" [attr-defined] skore-local-project/src/skore_local_project/project.py:206: error: Module "skore" has no attribute "CrossValidationReport" [attr-defined] skore-local-project/src/skore_local_project/project.py:206: error: Module "skore" has no attribute "EstimatorReport" [attr-defined] ```
4cd912c to
267c4bd
Compare
267c4bd to
7e69c45
Compare
Contributor
|
Pretty annoying that it doesn't do the right thing out of the box! |
7e69c45 to
d1328be
Compare
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 28, 2025
Prerequisite for #2069. ```bash $ python -m mypy --config-file=skore/pyproject.toml skore/ skore/src/skore/project/widget.py:469: error: Argument 1 to "_update_dataset_dropdown" of "ModelExplorerWidget" has incompatible type "ndarray[tuple[Any, ...], dtype[Any]]"; expected "list[str]" [arg-type] skore/src/skore/project/widget.py:489: error: Argument 1 to "_update_dataset_dropdown" of "ModelExplorerWidget" has incompatible type "ndarray[tuple[Any, ...], dtype[Any]]"; expected "list[str]" [arg-type] skore/src/skore/_sklearn/train_test_split/train_test_split.py:216: error: Incompatible types in assignment (expression has type "None", variable has type "ndarray[tuple[Any, ...], dtype[Any]]") [assignment] skore/src/skore/_sklearn/_plot/metrics/roc_curve.py:262: error: Incompatible types in assignment (expression has type "None", variable has type "Line2D") [assignment] skore/src/skore/_sklearn/_plot/metrics/roc_curve.py:385: error: Incompatible types in assignment (expression has type "None", variable has type "Line2D") [assignment] skore/src/skore/_sklearn/_plot/metrics/roc_curve.py:508: error: Incompatible types in assignment (expression has type "None", variable has type "Line2D") [assignment] skore/src/skore/_sklearn/_plot/metrics/roc_curve.py:614: error: Incompatible types in assignment (expression has type "None", variable has type "Line2D") [assignment] skore/src/skore/_sklearn/_plot/metrics/roc_curve.py:677: error: Incompatible types in assignment (expression has type "list[Never]", variable has type "Line2D") [assignment] skore/src/skore/_sklearn/_plot/metrics/roc_curve.py:679: error: "Line2D" has no attribute "append" [attr-defined] skore/src/skore/_sklearn/_plot/metrics/roc_curve.py:687: error: Incompatible types in assignment (expression has type "None", variable has type "Line2D") [assignment] skore/src/skore/_sklearn/_plot/metrics/roc_curve.py:953: error: Value of type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" is not indexable [index] skore/src/skore/_sklearn/_plot/metrics/roc_curve.py:953: error: No overload variant of "__getitem__" of "bytes" matches argument type "tuple[slice[None, None, None], int]" [call-overload] skore/src/skore/_sklearn/_plot/metrics/roc_curve.py:953: note: Possible overload variants: skore/src/skore/_sklearn/_plot/metrics/roc_curve.py:953: note: def __getitem__(self, SupportsIndex, /) -> int skore/src/skore/_sklearn/_plot/metrics/roc_curve.py:953: note: def __getitem__(self, slice[Any, Any, Any], /) -> bytes skore/src/skore/_sklearn/_plot/metrics/roc_curve.py:953: error: Invalid index type "tuple[slice[None, None, None], int]" for "_NestedSequence[_SupportsArray[dtype[Any]]]"; expected type "int" [index] skore/src/skore/_sklearn/_plot/metrics/roc_curve.py:953: error: Invalid index type "tuple[slice[None, None, None], int]" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index] skore/src/skore/_sklearn/_plot/metrics/roc_curve.py:953: error: Invalid index type "tuple[slice[None, None, None], int]" for "_NestedSequence[complex | bytes | str]"; expected type "int" [index] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:268: error: Incompatible return value type (got "list[PathCollection]", expected "list[Artist]") [return-value] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:268: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:268: note: Consider using "Sequence" instead, which is covariant skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:268: note: Perhaps you need a type annotation for "scatter"? Suggestion: "list[Artist]" skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:355: error: Incompatible return value type (got "list[PathCollection]", expected "list[Artist]") [return-value] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:355: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:355: note: Consider using "Sequence" instead, which is covariant skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:355: note: Perhaps you need a type annotation for "scatter"? Suggestion: "list[Artist]" skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:438: error: Incompatible return value type (got "list[PathCollection]", expected "list[Artist]") [return-value] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:438: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:438: note: Consider using "Sequence" instead, which is covariant skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:438: note: Perhaps you need a type annotation for "scatter"? Suggestion: "list[Artist]" skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:521: error: Incompatible return value type (got "list[PathCollection]", expected "list[Artist]") [return-value] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:521: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:521: note: Consider using "Sequence" instead, which is covariant skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:521: note: Perhaps you need a type annotation for "scatter"? Suggestion: "list[Artist]" skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: error: Unsupported left operand type for - ("Buffer") [operator] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: error: Unsupported operand types for - ("Buffer" and "complex") [operator] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: error: Unsupported left operand type for - ("_SupportsArray[dtype[Any]]") [operator] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: error: Unsupported operand types for - ("_SupportsArray[dtype[Any]]" and "complex") [operator] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: error: Unsupported left operand type for - ("_NestedSequence[_SupportsArray[dtype[Any]]]") [operator] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: error: Unsupported operand types for - ("_NestedSequence[_SupportsArray[dtype[Any]]]" and "complex") [operator] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: error: Unsupported operand types for - ("complex" and "Buffer") [operator] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: error: Unsupported operand types for - ("complex" and "_SupportsArray[dtype[Any]]") [operator] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: error: Unsupported operand types for - ("complex" and "_NestedSequence[_SupportsArray[dtype[Any]]]") [operator] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: error: Unsupported operand types for - ("complex" and "bytes") [operator] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: error: Unsupported operand types for - ("complex" and "str") [operator] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: error: Unsupported operand types for - ("complex" and "_NestedSequence[complex | bytes | str]") [operator] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: error: Unsupported left operand type for - ("bytes") [operator] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: error: Unsupported operand types for - ("bytes" and "complex") [operator] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: error: Unsupported left operand type for - ("str") [operator] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: error: Unsupported operand types for - ("str" and "complex") [operator] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: error: Unsupported left operand type for - ("_NestedSequence[complex | bytes | str]") [operator] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: error: Unsupported operand types for - ("_NestedSequence[complex | bytes | str]" and "complex") [operator] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:829: note: Both left and right operands are unions skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:832: error: Argument 1 to "zip" has incompatible type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]"; expected "Iterable[_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]]" [arg-type] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:832: error: Argument 1 to "zip" has incompatible type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]"; expected "Iterable[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]]]" [arg-type] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:832: error: Argument 2 to "zip" has incompatible type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]"; expected "Iterable[complex | bytes | str | _NestedSequence[complex | bytes | str] | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]]]" [arg-type] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:832: error: Argument 2 to "zip" has incompatible type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]"; expected "Iterable[_SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]]" [arg-type] skore/src/skore/_sklearn/_plot/metrics/prediction_error.py:832: error: Argument 3 to "zip" has incompatible type "Any | complex"; expected "Iterable[Any]" [arg-type] skore/src/skore/_sklearn/_plot/metrics/precision_recall_curve.py:872: error: Value of type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" is not indexable [index] skore/src/skore/_sklearn/_plot/metrics/precision_recall_curve.py:872: error: No overload variant of "__getitem__" of "bytes" matches argument type "tuple[slice[None, None, None], int]" [call-overload] skore/src/skore/_sklearn/_plot/metrics/precision_recall_curve.py:872: note: Possible overload variants: skore/src/skore/_sklearn/_plot/metrics/precision_recall_curve.py:872: note: def __getitem__(self, SupportsIndex, /) -> int skore/src/skore/_sklearn/_plot/metrics/precision_recall_curve.py:872: note: def __getitem__(self, slice[Any, Any, Any], /) -> bytes skore/src/skore/_sklearn/_plot/metrics/precision_recall_curve.py:872: error: Invalid index type "tuple[slice[None, None, None], int]" for "_NestedSequence[_SupportsArray[dtype[Any]]]"; expected type "int" [index] skore/src/skore/_sklearn/_plot/metrics/precision_recall_curve.py:872: error: Invalid index type "tuple[slice[None, None, None], int]" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index] skore/src/skore/_sklearn/_plot/metrics/precision_recall_curve.py:872: error: Invalid index type "tuple[slice[None, None, None], int]" for "_NestedSequence[complex | bytes | str]"; expected type "int" [index] skore/src/skore/_sklearn/_plot/metrics/precision_recall_curve.py:878: error: Value of type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" is not indexable [index] skore/src/skore/_sklearn/_plot/metrics/precision_recall_curve.py:878: error: No overload variant of "__getitem__" of "bytes" matches argument type "tuple[slice[None, None, None], int]" [call-overload] skore/src/skore/_sklearn/_plot/metrics/precision_recall_curve.py:878: note: Possible overload variants: skore/src/skore/_sklearn/_plot/metrics/precision_recall_curve.py:878: note: def __getitem__(self, SupportsIndex, /) -> int skore/src/skore/_sklearn/_plot/metrics/precision_recall_curve.py:878: note: def __getitem__(self, slice[Any, Any, Any], /) -> bytes skore/src/skore/_sklearn/_plot/metrics/precision_recall_curve.py:878: error: Invalid index type "tuple[slice[None, None, None], int]" for "_NestedSequence[_SupportsArray[dtype[Any]]]"; expected type "int" [index] skore/src/skore/_sklearn/_plot/metrics/precision_recall_curve.py:878: error: Invalid index type "tuple[slice[None, None, None], int]" for "str"; expected type "SupportsIndex | slice[Any, Any, Any]" [index] skore/src/skore/_sklearn/_plot/metrics/precision_recall_curve.py:878: error: Invalid index type "tuple[slice[None, None, None], int]" for "_NestedSequence[complex | bytes | str]"; expected type "int" [index] skore/src/skore/_sklearn/_estimator/report.py:392: error: Argument "estimator_hash" to "_get_cached_response_values" has incompatible type "signedinteger[_64Bit]"; expected "int" [arg-type] skore/src/skore/_sklearn/_estimator/feature_importance_accessor.py:550: error: Item "Buffer" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] skore/src/skore/_sklearn/_estimator/feature_importance_accessor.py:550: error: Item "_SupportsArray[dtype[Any]]" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] skore/src/skore/_sklearn/_estimator/feature_importance_accessor.py:550: error: Item "_NestedSequence[_SupportsArray[dtype[Any]]]" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] skore/src/skore/_sklearn/_estimator/feature_importance_accessor.py:550: error: Item "complex" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] skore/src/skore/_sklearn/_estimator/feature_importance_accessor.py:550: error: Item "bytes" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] skore/src/skore/_sklearn/_estimator/feature_importance_accessor.py:550: error: Item "str" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] skore/src/skore/_sklearn/_estimator/feature_importance_accessor.py:550: error: Item "_NestedSequence[complex | bytes | str]" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] skore/src/skore/_sklearn/_comparison/report.py:410: error: List comprehension has incompatible type List[Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str] | list[Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]]]; expected List[Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]] [misc] skore/src/skore/_sklearn/_estimator/metrics_accessor.py:485: error: Argument "estimator_hash" to "_get_cached_response_values" has incompatible type "signedinteger[_64Bit]"; expected "int" [arg-type] skore/src/skore/_sklearn/_estimator/metrics_accessor.py:1677: error: Argument "estimator_hash" to "_get_cached_response_values" has incompatible type "signedinteger[_64Bit]"; expected "int" [arg-type] skore/src/skore/_sklearn/_cross_validation/metrics_accessor.py:1150: error: Argument "y" to "YPlotData" has incompatible type "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str] | None"; expected "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]" [arg-type] skore/src/skore/_sklearn/_cross_validation/metrics_accessor.py:1155: error: Argument "estimator_hash" to "_get_cached_response_values" has incompatible type "signedinteger[_64Bit]"; expected "int" [arg-type] skore/src/skore/_sklearn/_cross_validation/data_accessor.py:45: error: Item "Buffer" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] skore/src/skore/_sklearn/_cross_validation/data_accessor.py:45: error: Item "_SupportsArray[dtype[Any]]" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] skore/src/skore/_sklearn/_cross_validation/data_accessor.py:45: error: Item "_NestedSequence[_SupportsArray[dtype[Any]]]" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] skore/src/skore/_sklearn/_cross_validation/data_accessor.py:45: error: Item "complex" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] skore/src/skore/_sklearn/_cross_validation/data_accessor.py:45: error: Item "str" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] skore/src/skore/_sklearn/_cross_validation/data_accessor.py:45: error: Item "_NestedSequence[complex | bytes | str]" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] skore/src/skore/_sklearn/_cross_validation/data_accessor.py:55: error: Item "Buffer" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]" has no attribute "ndim" [union-attr] skore/src/skore/_sklearn/_cross_validation/data_accessor.py:55: error: Item "_SupportsArray[dtype[Any]]" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]" has no attribute "ndim" [union-attr] skore/src/skore/_sklearn/_cross_validation/data_accessor.py:55: error: Item "_NestedSequence[_SupportsArray[dtype[Any]]]" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]" has no attribute "ndim" [union-attr] skore/src/skore/_sklearn/_cross_validation/data_accessor.py:55: error: Item "complex" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]" has no attribute "ndim" [union-attr] skore/src/skore/_sklearn/_cross_validation/data_accessor.py:55: error: Item "str" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]" has no attribute "ndim" [union-attr] skore/src/skore/_sklearn/_cross_validation/data_accessor.py:55: error: Item "_NestedSequence[complex | bytes | str]" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]" has no attribute "ndim" [union-attr] skore/src/skore/_sklearn/_cross_validation/data_accessor.py:58: error: Item "Buffer" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] skore/src/skore/_sklearn/_cross_validation/data_accessor.py:58: error: Item "_SupportsArray[dtype[Any]]" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] skore/src/skore/_sklearn/_cross_validation/data_accessor.py:58: error: Item "_NestedSequence[_SupportsArray[dtype[Any]]]" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] skore/src/skore/_sklearn/_cross_validation/data_accessor.py:58: error: Item "complex" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] skore/src/skore/_sklearn/_cross_validation/data_accessor.py:58: error: Item "str" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] skore/src/skore/_sklearn/_cross_validation/data_accessor.py:58: error: Item "_NestedSequence[complex | bytes | str]" of "Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | str | _NestedSequence[complex | bytes | str]" has no attribute "shape" [union-attr] ``` Note that a complete typing review should be done in a next iteration.
d1328be to
30ddf73
Compare
auguste-probabl
approved these changes
Oct 28, 2025
Contributor
auguste-probabl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK for me!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ensure that the pre-commit
mypyhook in our monorepo context is strictly equivalent to runningmypymanually.Note that
additional_dependenciesmust be now synchronized withpyproject.toml. Otherwise, the hook fails in a good way:You will be able to run the hooks using: