Skip to content

Include some ruff lint rules previously in lint.ignore#1376

Merged
bharat-thotakura merged 7 commits into
mainfrom
bt/include-the-exclude-ruff
Apr 17, 2026
Merged

Include some ruff lint rules previously in lint.ignore#1376
bharat-thotakura merged 7 commits into
mainfrom
bt/include-the-exclude-ruff

Conversation

@bharat-thotakura

Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
Signed-off-by: Bharath <bharath.thotakura@infleqtion.com>
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables several additional ruff rules that were previously suppressed via lint.ignore, and updates code (and a few docs notebooks) to comply with those rules across the repo.

Changes:

  • Removes a set of ignored ruff rules from checks_superstaq/checks-pyproject.toml.
  • Refactors multiple Python modules to satisfy the newly-enabled lint rules (e.g., simplified conditionals, safer dict iteration, corrected TypeVar variance naming).
  • Updates documentation notebooks to remove unnecessary dict comprehensions and improve iteration patterns.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
supermarq-benchmarks/supermarq/qcvv/base_experiment.py Renames the covariant TypeVar to follow variance naming conventions and propagates the new type throughout the class signatures.
supermarq-benchmarks/supermarq/plotting.py Simplifies small conditional blocks into expressions to satisfy simplify rules.
supermarq-benchmarks/supermarq/converters/qiskit.py Iterates over dict .items() to avoid key-index patterns and improve clarity.
qiskit-superstaq/qiskit_superstaq/superstaq_job.py Collapses an if/else block into an expression for index selection.
general-superstaq/general_superstaq/superstaq_exceptions.py Adds a targeted noqa for N818 on a public exception class.
general-superstaq/general_superstaq/superstaq_client.py Simplifies query-string construction into a single expression.
general-superstaq/general_superstaq/job.py Collapses if/else block into an expression when selecting circuits to check.
docs/source/optimizations/eeroq/eeroq_qss.ipynb Replaces unnecessary dict comprehension with dict.fromkeys.
docs/source/apps/max_sharpe_ratio_optimization.ipynb Refactors dict iteration to avoid indexing by loop variable; uses dict.fromkeys.
docs/source/apps/cudaq_logical_aim.ipynb Uses .items() to avoid redundant dict indexing.
cirq-superstaq/cirq_superstaq/service.py Collapses trivial if/else into an expression for linestyle selection.
cirq-superstaq/cirq_superstaq/ops/qubit_gates.py Simplifies conditional assignment into an expression.
checks-superstaq/checks_superstaq/checks-pyproject.toml Removes several lint ignores so ruff enforces those rules going forward.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dowusu-antwi dowusu-antwi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bharat-thotakura bharat-thotakura merged commit 19b3417 into main Apr 17, 2026
25 checks passed
@bharat-thotakura bharat-thotakura deleted the bt/include-the-exclude-ruff branch April 17, 2026 20:03
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.

3 participants