-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Pin numpy<2.2 in lint workflow #722
Merged
Merged
Conversation
This file contains 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
Somehow, with numpy 2.2, the mypy fails with the following error: ``` qiskit_addon_cutting/cut_finding/circuit_interface.py:318: error: No overload variant of "__getitem__" of "Sequence" matches argument type "signedinteger[_32Bit | _64Bit]" [call-overload] qiskit_addon_cutting/cut_finding/circuit_interface.py:318: note: Possible overload variants: qiskit_addon_cutting/cut_finding/circuit_interface.py:318: note: def __getitem__(self, int, /) -> int | tuple[str, int] qiskit_addon_cutting/cut_finding/circuit_interface.py:318: note: def __getitem__(self, slice, /) -> Sequence[int | tuple[str, int]] qiskit_addon_cutting/cut_finding/disjoint_subcircuits_state.py:330: error: Invalid index type "Hashable" for "ndarray[tuple[int, ...], dtype[signedinteger[_32Bit | _64Bit]]]"; expected type "SupportsIndex | slice | EllipsisType | _SupportsArray[dtype[numpy.bool[builtins.bool]] | dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]] | dtype[integer[Any]]]] | builtins.bool | int | _NestedSequence[builtins.bool | int] | tuple[SupportsIndex | slice | EllipsisType | _SupportsArray[dtype[numpy.bool[builtins.bool]] | dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]] | dtype[integer[Any]]]] | builtins.bool | int | _NestedSequence[builtins.bool | int] | None, ...] | None" [index] ``` Hence we pin numpy as a workaround.
garrison
added
cicd
Related to the CICD pipeline
stable backport potential
Suitable to be backported to most recent stable branch by Mergify
labels
Dec 12, 2024
Pull Request Test Coverage Report for Build 12299683720Details
💛 - Coveralls |
mergify bot
pushed a commit
that referenced
this pull request
Dec 12, 2024
Somehow, with numpy 2.2, the mypy fails with the following error: ``` qiskit_addon_cutting/cut_finding/circuit_interface.py:318: error: No overload variant of "__getitem__" of "Sequence" matches argument type "signedinteger[_32Bit | _64Bit]" [call-overload] qiskit_addon_cutting/cut_finding/circuit_interface.py:318: note: Possible overload variants: qiskit_addon_cutting/cut_finding/circuit_interface.py:318: note: def __getitem__(self, int, /) -> int | tuple[str, int] qiskit_addon_cutting/cut_finding/circuit_interface.py:318: note: def __getitem__(self, slice, /) -> Sequence[int | tuple[str, int]] qiskit_addon_cutting/cut_finding/disjoint_subcircuits_state.py:330: error: Invalid index type "Hashable" for "ndarray[tuple[int, ...], dtype[signedinteger[_32Bit | _64Bit]]]"; expected type "SupportsIndex | slice | EllipsisType | _SupportsArray[dtype[numpy.bool[builtins.bool]] | dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]] | dtype[integer[Any]]]] | builtins.bool | int | _NestedSequence[builtins.bool | int] | tuple[SupportsIndex | slice | EllipsisType | _SupportsArray[dtype[numpy.bool[builtins.bool]] | dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]] | dtype[integer[Any]]]] | builtins.bool | int | _NestedSequence[builtins.bool | int] | None, ...] | None" [index] ``` Hence we pin numpy as a workaround. (cherry picked from commit d44ca0a) # Conflicts: # pyproject.toml
garrison
added a commit
that referenced
this pull request
Dec 12, 2024
* Pin numpy<2.2 in lint workflow (#722) Somehow, with numpy 2.2, the mypy fails with the following error: ``` qiskit_addon_cutting/cut_finding/circuit_interface.py:318: error: No overload variant of "__getitem__" of "Sequence" matches argument type "signedinteger[_32Bit | _64Bit]" [call-overload] qiskit_addon_cutting/cut_finding/circuit_interface.py:318: note: Possible overload variants: qiskit_addon_cutting/cut_finding/circuit_interface.py:318: note: def __getitem__(self, int, /) -> int | tuple[str, int] qiskit_addon_cutting/cut_finding/circuit_interface.py:318: note: def __getitem__(self, slice, /) -> Sequence[int | tuple[str, int]] qiskit_addon_cutting/cut_finding/disjoint_subcircuits_state.py:330: error: Invalid index type "Hashable" for "ndarray[tuple[int, ...], dtype[signedinteger[_32Bit | _64Bit]]]"; expected type "SupportsIndex | slice | EllipsisType | _SupportsArray[dtype[numpy.bool[builtins.bool]] | dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]] | dtype[integer[Any]]]] | builtins.bool | int | _NestedSequence[builtins.bool | int] | tuple[SupportsIndex | slice | EllipsisType | _SupportsArray[dtype[numpy.bool[builtins.bool]] | dtype[integer[Any]]] | _NestedSequence[_SupportsArray[dtype[numpy.bool[builtins.bool]] | dtype[integer[Any]]]] | builtins.bool | int | _NestedSequence[builtins.bool | int] | None, ...] | None" [index] ``` Hence we pin numpy as a workaround. (cherry picked from commit d44ca0a) # Conflicts: # pyproject.toml * resolve conflict --------- Co-authored-by: Jim Garrison <garrison@ibm.com>
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
cicd
Related to the CICD pipeline
stable backport potential
Suitable to be backported to most recent stable branch by Mergify
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.
Somehow, with numpy 2.2, the mypy fails with the following error:
Hence we pin numpy as a workaround.