File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
qiskit_algorithms/minimum_eigensolvers Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 11# This code is part of a Qiskit project.
22#
3- # (C) Copyright IBM 2022, 2023 .
3+ # (C) Copyright IBM 2022, 2024 .
44#
55# This code is licensed under the Apache License, Version 2.0. You may
66# obtain a copy of this license in the LICENSE.txt file in the root directory
@@ -236,7 +236,11 @@ def compute_minimum_eigenvalue(
236236 # pick maximum gradient
237237 max_grad_index , max_grad = max ( # type: ignore[assignment]
238238 enumerate (cur_grads ),
239- key = lambda item : np .abs (item [1 ][0 ]), # type: ignore[call-overload]
239+ # mypy <= 1.10 needs call-overload, for 1.11 its arg-type to suppress the error
240+ # below then the other is seen as unused hence the additional unused-ignore
241+ key = lambda item : np .abs (
242+ item [1 ][0 ] # type: ignore[arg-type, unused-ignore]
243+ ), # type: ignore[call-overload, unused-ignore]
240244 )
241245 logger .info (
242246 "Found maximum gradient %s at index %s" ,
You can’t perform that action at this time.
0 commit comments