Skip to content
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

Ruff enable a few more categories #10342

Merged
merged 4 commits into from
Mar 24, 2024
Merged

Conversation

levbishop
Copy link
Member

Turning on:

  • flake8-logging-format(G)
  • flake8-pyi(PYI)
  • flake8-quotes (Q)
  • flake8-debugger (T10)

They look helpful and the codebase already complies so no other changes needed.

@levbishop levbishop requested a review from a team as a code owner June 25, 2023 23:57
@qiskit-bot
Copy link
Collaborator

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

  • @Qiskit/terra-core

@coveralls
Copy link

coveralls commented Jun 26, 2023

Pull Request Test Coverage Report for Build 5378031649

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 19 unchanged lines in 6 files lost coverage.
  • Overall coverage increased (+0.01%) to 85.953%

Files with Coverage Reduction New Missed Lines %
qiskit/circuit/tools/pi_check.py 1 91.23%
qiskit/transpiler/passes/synthesis/unitary_synthesis.py 1 90.39%
crates/accelerate/src/vf2_layout.rs 3 94.74%
qiskit/pulse/library/waveform.py 3 93.75%
crates/qasm2/src/lex.rs 5 90.89%
crates/qasm2/src/parse.rs 6 97.11%
Totals Coverage Status
Change from base Build 5371730451: 0.01%
Covered Lines: 71478
Relevant Lines: 83159

💛 - Coveralls

@levbishop levbishop added type: qa Issues and PRs that relate to testing and code quality Changelog: None Do not include in changelog labels Jun 26, 2023
Copy link
Member

@jakelishman jakelishman left a comment

Choose a reason for hiding this comment

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

The logging and breakpoint ones look fine. I'd not enable the quotes one because Black already enforces it, and duplicating it risks the two tools having conflicts of opinion (Black will occasionally switch the outer quotes to reduce the number of escapes needed). We also don't use .pyi files in Terra.

I wish ruff would allow the descriptive names in its settings - these codes are completely illegible and I don't understand why linter designers think that this is good design.

@levbishop
Copy link
Member Author

The logging and breakpoint ones look fine. I'd not enable the quotes one because Black already enforces it, and duplicating it risks the two tools having conflicts of opinion (Black will occasionally switch the outer quotes to reduce the number of escapes needed). We also don't use .pyi files in Terra.

Removed Q and PYI

I wish ruff would allow the descriptive names in its settings - these codes are completely illegible and I don't understand why linter designers think that this is good design.

I completely agree. They already have the unique descriptive name tags for each of these categories flake8-quotes so I don't get why they don't let you use them. I guess they aren't completely against the idea if this issue is to be believed : astral-sh/ruff#1773

@1ucian0 1ucian0 enabled auto-merge March 24, 2024 20:48
@coveralls
Copy link

Pull Request Test Coverage Report for Build 8412014070

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

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

Files with Coverage Reduction New Missed Lines %
crates/qasm2/src/lex.rs 4 93.38%
crates/qasm2/src/parse.rs 6 97.61%
Totals Coverage Status
Change from base Build 8409548651: 0.007%
Covered Lines: 59815
Relevant Lines: 66955

💛 - Coveralls

@1ucian0 1ucian0 added this pull request to the merge queue Mar 24, 2024
Merged via the queue into Qiskit:main with commit 3986868 Mar 24, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: None Do not include in changelog type: qa Issues and PRs that relate to testing and code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants