Skip to content

ruff - enable and fix N805#7903

Merged
pavoljuhas merged 3 commits intoquantumlib:mainfrom
joesho112358:ruff-N805-implementation
Feb 20, 2026
Merged

ruff - enable and fix N805#7903
pavoljuhas merged 3 commits intoquantumlib:mainfrom
joesho112358:ruff-N805-implementation

Conversation

@joesho112358
Copy link
Contributor

Adding checks for #7505 :
N805 - invalid-first-argument-name-for-method

This is mostly exclusion of the rule because it conflicts with pylint in these areas

@joesho112358 joesho112358 requested review from a team and vtomole as code owners February 19, 2026 03:13
@github-actions github-actions bot added the size: S 10< lines changed <50 label Feb 19, 2026
@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.62%. Comparing base (d86ac03) to head (030ee72).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7903   +/-   ##
=======================================
  Coverage   99.62%   99.62%           
=======================================
  Files        1104     1104           
  Lines       99339    99339           
=======================================
  Hits        98963    98963           
  Misses        376      376           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@pavoljuhas pavoljuhas left a comment

Choose a reason for hiding this comment

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

Let us disable that rule for the entire class instead:

diff --git a/cirq-core/cirq/ops/clifford_gate.py b/cirq-core/cirq/ops/clifford_gate.py
index 30e15dc38..375e31f42 100644
--- a/cirq-core/cirq/ops/clifford_gate.py
+++ b/cirq-core/cirq/ops/clifford_gate.py
@@ -139,4 +139,6 @@ class CommonCliffordGateMetaClass(value.ABCMetaImplementAnyOneOf):
     # These are class properties so we define them as properties on a metaclass.
 
+    # ruff: disable[N805]
+
     @property
     def all_single_qubit_cliffords(cls) -> Sequence[cirq.SingleQubitCliffordGate]:

PS: Please merge with main to clean up the typecheck failure.

@github-actions github-actions bot added Size: XS <10 lines changed and removed size: S 10< lines changed <50 labels Feb 20, 2026
@pavoljuhas pavoljuhas changed the title Ruff N805 implementation ruff - enable and fix N805 Feb 20, 2026
@pavoljuhas pavoljuhas enabled auto-merge February 20, 2026 19:31
@pavoljuhas pavoljuhas added this pull request to the merge queue Feb 20, 2026
Merged via the queue into quantumlib:main with commit 349378a Feb 20, 2026
39 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size: XS <10 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants