Skip to content

Fix mypy errors (scheduler)#8256

Closed
Randl wants to merge 2 commits intoQiskit:mainfrom
Randl:mypy-5
Closed

Fix mypy errors (scheduler)#8256
Randl wants to merge 2 commits intoQiskit:mainfrom
Randl:mypy-5

Conversation

@Randl
Copy link
Contributor

@Randl Randl commented Jun 28, 2022

Summary

Following discussion, I'm splitting #8187 by module.

Details and comments

There are two errors left:

qiskit/scheduler/lowering.py:91: error: Incompatible types in assignment (expression has type "Union[int, ParameterExpression]", target has type "int")  [assignment]
qiskit/scheduler/lowering.py:96: error: Incompatible types in assignment (expression has type "List[int]", variable has type "Tuple[int, ...]")  [assignment]

The first is quite common and is related mostly to parametric expressions: indices of channels can technically be ParameterExpression but I believe in this case index is supposed to be int?

The second is inconsistency between two branches of if where in first qubits is a tuple and in second is a list. Since it is not modified, the solution is probably to change it to tuple (I've added todo in the relevant line)

@Randl Randl requested review from a team, DanPuzzuoli, eggerdj and nkanazawa1989 as code owners June 28, 2022 13:59
@qiskit-bot
Copy link
Collaborator

Thank you for opening a new pull request.

Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient.

While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone.

One or more of the the following people are requested to review this:

  • @Qiskit/terra-core

@javabster javabster added the Community PR PRs from contributors that are not 'members' of the Qiskit repo label Jun 28, 2022
@1ucian0 1ucian0 added the mypy label Mar 30, 2023
@Randl Randl requested a review from wshanks as a code owner May 23, 2023 13:25
@coveralls
Copy link

coveralls commented May 23, 2023

Pull Request Test Coverage Report for Build 5058923131

  • 7 of 7 (100.0%) changed or added relevant lines in 2 files are covered.
  • 6 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.02%) to 85.89%

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/expr.rs 1 93.76%
crates/qasm2/src/lex.rs 5 90.89%
Totals Coverage Status
Change from base Build 5050064110: 0.02%
Covered Lines: 70924
Relevant Lines: 82575

💛 - Coveralls

@coveralls
Copy link

Pull Request Test Coverage Report for Build 7375421297

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.007%) to 87.56%

Totals Coverage Status
Change from base Build 7369683756: 0.007%
Covered Lines: 59260
Relevant Lines: 67679

💛 - Coveralls

@jakelishman
Copy link
Member

Sorry this never merged at the time. This stuff got removed in Qiskit 2.0, so the PR is obsolete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community PR PRs from contributors that are not 'members' of the Qiskit repo

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants