Commit 09f601c
committed
Enable missing argument in docstring lint
In the recently merged Qiskit#15603 we migrated from pylint to use
ruff. During the development of that PR the rule group "D" for rules
derived from pydocstyle was investigated but the full rule group was
overly pedantic and even with disabling the most egregious rules also
changed the docs for the worse (at least by autofixing many rules) so
that sphinx would not succesfully build after applying the fixes. So
during Qiskit#15603 the changes for this rule group were reverted. However,
one of the useful rules from that group D417 which checks that all
arguments are documented. This rule found real issues in the
documentation and it is worthwhile to enable it. This commit enables the
rule in our ruff checks and fixes the issues associated with.
During this process ruff flagged one place in the `__call__` method
docstring for the `TwoQubitControlledUDecomposer` class has not
documented several arguments on the method. However, these arguments
are unused currently. It is apparently trying to match the `__call__`
signature of the other two qubit decomposers but is not using most of
the arguments. Most could be conceivably supported by
`TwoQubitControlledUDecomposer` and it's not clear why they were added.
But, for this PR I didn't want to look into adding the support as it was
out of scope. For the time being this PR suppresses the ruff rule and
adds a TODO comment to start using the unused arguments.1 parent cc8fe78 commit 09f601c
37 files changed
Lines changed: 92 additions & 29 deletions
File tree
- qiskit
- circuit
- controlflow
- library
- arithmetic
- adders
- multipliers
- n_local
- standard_gates
- converters
- dagcircuit
- passmanager
- primitives
- containers
- qasm3
- quantum_info/analysis
- result
- distributions
- synthesis
- two_qubit
- unitary/aqc/fast_gradient
- transpiler
- passes
- basis
- layout
- routing/commuting_2q_gate_routing
- scheduling/padding
- utils
- visualization
- circuit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
| 345 | + | |
| 346 | + | |
345 | 347 | | |
346 | 348 | | |
347 | 349 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
157 | 160 | | |
158 | 161 | | |
159 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
155 | 156 | | |
156 | 157 | | |
157 | 158 | | |
| 159 | + | |
158 | 160 | | |
159 | 161 | | |
160 | 162 | | |
| |||
211 | 213 | | |
212 | 214 | | |
213 | 215 | | |
| 216 | + | |
214 | 217 | | |
215 | 218 | | |
216 | 219 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
| 209 | + | |
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | | - | |
| 449 | + | |
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
| |||
666 | 666 | | |
667 | 667 | | |
668 | 668 | | |
669 | | - | |
| 669 | + | |
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1243 | 1243 | | |
1244 | 1244 | | |
1245 | 1245 | | |
| 1246 | + | |
1246 | 1247 | | |
1247 | 1248 | | |
1248 | 1249 | | |
1249 | 1250 | | |
1250 | 1251 | | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
1251 | 1255 | | |
1252 | 1256 | | |
1253 | 1257 | | |
1254 | | - | |
1255 | 1258 | | |
1256 | 1259 | | |
1257 | 1260 | | |
| |||
0 commit comments