Skip to content

Introduction of informational pydoclint CI job on push and PR - #446

Draft
emlynsg wants to merge 15 commits into
TeamGraphix:masterfrom
qat-inria:pydoclint
Draft

Introduction of informational pydoclint CI job on push and PR#446
emlynsg wants to merge 15 commits into
TeamGraphix:masterfrom
qat-inria:pydoclint

Conversation

@emlynsg

@emlynsgemlynsg commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Draft PR for presentation and discussion

This draft PR:

  • introduces a new job in the CI that runs pydoclint, and reports on failing lines in each file of the repository
  • adds to the pre-commit hook to include Ruff and a commented pydoclint step (to be reactivated when we have completed standardising the docstrings of the repository)
  • fixes docstrings/type annotations that were causing pydoclint to fail when run.

Note: The graphix-qasm-parser dependency was causing the CI to fail, and was commented out.

Example output:

pydoclint report

graphix/_linalg.py — 11 violation(s)
 18: DOC102: Method `MatGF2.__new__`: Docstring contains more arguments than in function signature.
18: DOC110: Method `MatGF2.__new__`: The option `--arg-type-hints-in-docstring` is `True` but not all args in the docstring arg list have type hints
18: DOC103: Method `MatGF2.__new__`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the docstring but not in the function signature: [-------: , MatGF2: , Return: ].
18: DOC201: Method `MatGF2.__new__` does not have a return section in docstring
18: DOC203: Method `MatGF2.__new__` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
37: DOC501: Method `MatGF2.mat_mul` has raise statements, but the docstring does not have a "Raises" section
37: DOC503: Method `MatGF2.mat_mul` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
66: DOC203: Method `MatGF2.compute_rank` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['np.intp']; docstring return section types: ['int']
131: DOC103: Method `MatGF2.gauss_elimination`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [ncols: int | None]. Arguments in the docstring but not in the function signature: [n_cols: int ].
152: DOC103: Method `MatGF2.row_reduction`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [ncols: int | None]. Arguments in the docstring but not in the function signature: [n_cols: int ].
236: DOC103: Function `_elimination_jit`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [ncols: int]. Arguments in the docstring but not in the function signature: [n_cols: int].
graphix/branch_selector.py — 9 violation(s)
 36: DOC105: Method `BranchSelector.measure`: Argument names match, but type hints in these args do not match: rng
36: DOC201: Method `BranchSelector.measure` does not have a return section in docstring
36: DOC203: Method `BranchSelector.measure` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
60: DOC601: Class `RandomBranchSelector`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
60: DOC603: Class `RandomBranchSelector`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [pr_calc: bool]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
94: DOC601: Class `FixedBranchSelector`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
94: DOC603: Class `FixedBranchSelector`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [default: BranchSelector | None, results: _T]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
133: DOC601: Class `ConstBranchSelector`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
133: DOC603: Class `ConstBranchSelector`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [result: Outcome]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
graphix/channels.py — 14 violation(s)
 21: DOC501: Function `_ilog2` has raise statements, but the docstring does not have a "Raises" section
21: DOC503: Function `_ilog2` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
39: DOC602: Class `KrausData`: Class docstring contains more class attributes than in actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
39: DOC603: Class `KrausData`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the docstring but not in the actual class attributes: [coef: complex, operator: npt.NDArray[np.complex128]]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
54: DOC101: Method `KrausData.__init__`: Docstring contains fewer arguments than in function signature.
54: DOC103: Method `KrausData.__init__`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [coef: complex, operator: npt.NDArray[_T]].
54: DOC501: Method `KrausData.__init__` has raise statements, but the docstring does not have a "Raises" section
54: DOC503: Method `KrausData.__init__` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
103: DOC301: Class `KrausChannel`: __init__() should not have a docstring; please combine it with the docstring of the class
160: DOC203: Function `dephasing_channel` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['KrausChannel']; docstring return section types: ['class:`graphix.channels.KrausChannel` object']
181: DOC201: Function `depolarising_channel` does not have a return section in docstring
181: DOC203: Function `depolarising_channel` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
223: DOC203: Function `two_qubit_depolarising_channel` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['KrausChannel']; docstring return section types: ['class:`graphix.channels.KrausChannel` object']
261: DOC203: Function `two_qubit_depolarising_tensor_channel` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['KrausChannel']; docstring return section types: ['class:`graphix.channels.KrausChannel` object']
graphix/command.py — 20 violation(s)
 49: DOC601: Class `BaseN`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
49: DOC603: Class `BaseN`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [kind: ClassVar[Literal[CommandKind.N]], node: int]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
72: DOC601: Class `N`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
72: DOC603: Class `N`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [kind: ClassVar[Literal[CommandKind.N]], state: State]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
103: DOC601: Class `M`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
103: DOC603: Class `M`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [kind: ClassVar[Literal[CommandKind.M]], measurement: Measurement, s_domain: set[Node], t_domain: set[Node]]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
123: DOC105: Method `M.clifford`: Argument names match, but type hints in these args do not match: clifford_gate
123: DOC203: Method `M.clifford` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['M']; docstring return section types: ['class:`M`']
146: DOC601: Class `E`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
146: DOC603: Class `E`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [kind: ClassVar[Literal[CommandKind.E]], nodes: tuple[Node, Node]]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
160: DOC601: Class `C`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
160: DOC603: Class `C`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [clifford: Clifford, kind: ClassVar[Literal[CommandKind.C]], node: Node]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
177: DOC601: Class `X`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
177: DOC603: Class `X`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [domain: set[Node], kind: ClassVar[Literal[CommandKind.X]], node: Node]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
194: DOC601: Class `Z`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
194: DOC603: Class `Z`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [domain: set[Node], kind: ClassVar[Literal[CommandKind.Z]], node: Node]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
211: DOC601: Class `S`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
211: DOC603: Class `S`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [domain: set[Node], kind: ClassVar[Literal[CommandKind.S]], node: Node]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
228: DOC601: Class `T`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
228: DOC603: Class `T`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [kind: ClassVar[Literal[CommandKind.T]]]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
graphix/extraction.py — 12 violation(s)
 29: DOC601: Class `ResourceGraph`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
29: DOC603: Class `ResourceGraph`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [cltype: ResourceType, graph: GraphState]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
51: DOC102: Function `graph_to_fusion_network`: Docstring contains more arguments than in function signature.
51: DOC110: Function `graph_to_fusion_network`: The option `--arg-type-hints-in-docstring` is `True` but not all args in the docstring arg list have type hints
51: DOC103: Function `graph_to_fusion_network`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the docstring but not in the function signature: [phasedict: dict].
51: DOC203: Function `graph_to_fusion_network` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['list[ResourceGraph]']; docstring return section types: ['list']
141: DOC105: Function `create_resource_graph`: Argument names match, but type hints in these args do not match: node_ids, root
141: DOC203: Function `create_resource_graph` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['ResourceGraph']; docstring return section types: ['class:`ResourceGraph` object']
170: DOC105: Function `fusion_nodes`: Argument names match, but type hints in these args do not match: c1, c2
170: DOC203: Function `fusion_nodes` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['list[int]']; docstring return section types: ['list']
170: DOC501: Function `fusion_nodes` has raise statements, but the docstring does not have a "Raises" section
170: DOC503: Function `fusion_nodes` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['TypeError'].
graphix/flow/_find_gpflow.py — 15 violation(s)
 37: DOC001: Class `AlgebraicOpenGraph`: Potential formatting errors in docstring. Error message: Section 'Attributes' is not empty but nothing was parsed.
58: DOC301: Class `AlgebraicOpenGraph`: __init__() should not have a docstring; please combine it with the docstring of the class
58: DOC001: Function/method `__init__`: Potential formatting errors in docstring. Error message: Section 'Attributes' is not empty but nothing was parsed. (Note: DOC001 could trigger other unrelated violations under this function/method too. Please fix the docstring formatting first.)
58: DOC101: Method `AlgebraicOpenGraph.__init__`: Docstring contains fewer arguments than in function signature.
58: DOC103: Method `AlgebraicOpenGraph.__init__`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [og: OpenGraph[_AM_co]].
230: DOC001: Class `CorrectionMatrix`: Potential formatting errors in docstring. Error message: Section 'Attributes' is not empty but nothing was parsed.
230: DOC601: Class `CorrectionMatrix`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
230: DOC603: Class `CorrectionMatrix`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [aog: AlgebraicOpenGraph[_AM_co], c_matrix: MatGF2]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
266: DOC105: Function `_compute_p_matrix`: Argument names match, but type hints in these args do not match: aog
266: DOC203: Function `_compute_p_matrix` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 2 type(s).
466: DOC105: Function `_compute_correction_matrix_general_case`: Argument names match, but type hints in these args do not match: aog
466: DOC203: Function `_compute_correction_matrix_general_case` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 2 type(s).
537: DOC203: Function `_try_ordering_matrix_to_topological_generations` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 2 type(s).
574: DOC203: Function `compute_partial_order_layers` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 2 type(s).
616: DOC203: Function `compute_correction_matrix` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 2 type(s).
graphix/flow/core.py — 12 violation(s)
 90: DOC503: Method `XZCorrections.from_measured_nodes_mapping` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: ['XZCorrectionsError']. Raised exceptions in the body: ['XZCorrectionsGenericError'].
136: DOC503: Method `XZCorrections.to_pattern` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: ['XZCorrectionsError']. Raised exceptions in the body: ['XZCorrectionsGenericError'].
260: DOC503: Method `XZCorrections.check_well_formed` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: ['XZCorrectionsError']. Raised exceptions in the body: ['PartialOrderError', 'PartialOrderLayerError', 'XZCorrectionsGenericError', 'XZCorrectionsOrderError'].
361: DOC203: Method `XZCorrections.subs` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['XZCorrections[_M]']; docstring return section types: ['XZCorrections[Measurement]']
383: DOC203: Method `XZCorrections.xreplace` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['XZCorrections[_M]']; docstring return section types: ['XZCorrections[Measurement]']
407: DOC605: Class `PauliFlow`: Attribute names match, but type hints in these attributes do not match: correction_function (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
501: DOC203: Method `PauliFlow.is_well_formed` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['bool']; docstring return section types: ['``True`` if ``self`` is a well-formed flow, ``False`` otherwise.']
516: DOC503: Method `PauliFlow.check_well_formed` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: ['FlowError']. Raised exceptions in the body: ['FlowPropositionError', 'FlowPropositionOrderError', 'PartialOrderError', 'PartialOrderLayerError'].
808: DOC503: Method `GFlow.check_well_formed` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: ['FlowError']. Raised exceptions in the body: ['FlowPropositionError', 'FlowPropositionOrderError', 'PartialOrderError', 'PartialOrderLayerError'].
964: DOC503: Method `CausalFlow.check_well_formed` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: ['FlowError']. Raised exceptions in the body: ['FlowGenericError', 'FlowPropositionError', 'FlowPropositionOrderError', 'PartialOrderError', 'PartialOrderLayerError'].
1077: DOC503: Function `_corrections_to_partial_order_layers` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: ['XZCorrectionsError']. Raised exceptions in the body: ['XZCorrectionsGenericError'].
1160: DOC503: Function `_check_flow_general_properties` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: ['FlowError']. Raised exceptions in the body: ['FlowGenericError', 'PartialOrderError', 'PartialOrderLayerError'].
graphix/fundamentals.py — 1 violation(s)
 168: DOC203: Method `ComplexUnit.try_from` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 2 type(s).
graphix/graphsim.py — 25 violation(s)
 53: DOC301: Class `GraphState`: __init__() should not have a docstring; please combine it with the docstring of the class
120: DOC501: Method `GraphState.apply_vops` has raise statements, but the docstring does not have a "Raises" section
120: DOC503: Method `GraphState.apply_vops` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['RuntimeError'].
144: DOC001: Function/method `extract_vops`: Potential formatting errors in docstring. Error message: Section 'Returns' is not empty but nothing was parsed. (Note: DOC001 could trigger other unrelated violations under this function/method too. Please fix the docstring formatting first.)
144: DOC201: Method `GraphState.extract_vops` does not have a return section in docstring
144: DOC203: Method `GraphState.extract_vops` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
281: DOC103: Method `GraphState.equivalent_graph_e1`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [node: int]. Arguments in the docstring but not in the function signature: [node1: int].
281: DOC501: Method `GraphState.equivalent_graph_e1` has raise statements, but the docstring does not have a "Raises" section
281: DOC503: Method `GraphState.equivalent_graph_e1` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
306: DOC101: Method `GraphState.equivalent_graph_e2`: Docstring contains fewer arguments than in function signature.
306: DOC103: Method `GraphState.equivalent_graph_e2`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [node1: int, node2: int]. Arguments in the docstring but not in the function signature: [node1, node2: int].
306: DOC501: Method `GraphState.equivalent_graph_e2` has raise statements, but the docstring does not have a "Raises" section
306: DOC503: Method `GraphState.equivalent_graph_e2` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
381: DOC105: Method `GraphState.measure_x`: Argument names match, but type hints in these args do not match: choice
381: DOC203: Method `GraphState.measure_x` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['Outcome']; docstring return section types: ['int']
381: DOC501: Method `GraphState.measure_x` has raise statements, but the docstring does not have a "Raises" section
381: DOC503: Method `GraphState.measure_x` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
414: DOC105: Method `GraphState.measure_y`: Argument names match, but type hints in these args do not match: choice
414: DOC203: Method `GraphState.measure_y` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['Outcome']; docstring return section types: ['int']
414: DOC501: Method `GraphState.measure_y` has raise statements, but the docstring does not have a "Raises" section
414: DOC503: Method `GraphState.measure_y` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
439: DOC105: Method `GraphState.measure_z`: Argument names match, but type hints in these args do not match: choice
439: DOC203: Method `GraphState.measure_z` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['Outcome']; docstring return section types: ['int']
439: DOC501: Method `GraphState.measure_z` has raise statements, but the docstring does not have a "Raises" section
439: DOC503: Method `GraphState.measure_z` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
graphix/linalg_validations.py — 5 violation(s)
 46: DOC105: Function `is_psd`: Argument names match, but type hints in these args do not match: matrix
46: DOC201: Function `is_psd` does not have a return section in docstring
46: DOC203: Function `is_psd` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
46: DOC501: Function `is_psd` has raise statements, but the docstring does not have a "Raises" section
46: DOC503: Function `is_psd` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
graphix/measurements.py — 12 violation(s)
 160: DOC201: Method `Measurement.downcast_bloch` does not have a return section in docstring
160: DOC203: Method `Measurement.downcast_bloch` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
259: DOC605: Class `BlochMeasurement`: Attribute names match, but type hints in these attributes do not match: angle, plane (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
314: DOC203: Method `BlochMeasurement.isclose` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 3 type(s).
421: DOC201: Method `PauliMeasurement.__str__` does not have a return section in docstring
421: DOC203: Method `PauliMeasurement.__str__` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
437: DOC201: Method `PauliMeasurement.__pos__` does not have a return section in docstring
437: DOC203: Method `PauliMeasurement.__pos__` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
448: DOC201: Method `PauliMeasurement.__neg__` does not have a return section in docstring
448: DOC203: Method `PauliMeasurement.__neg__` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
460: DOC201: Method `PauliMeasurement.to_pauli` does not have a return section in docstring
460: DOC203: Method `PauliMeasurement.to_pauli` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
graphix/noise_models/depolarising.py — 2 violation(s)
 29: DOC301: Class `DepolarisingNoise`: __init__() should not have a docstring; please combine it with the docstring of the class
56: DOC301: Class `TwoQubitDepolarisingNoise`: __init__() should not have a docstring; please combine it with the docstring of the class
graphix/noise_models/noise_model.py — 4 violation(s)
 44: DOC601: Class `ApplyNoise`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
44: DOC603: Class `ApplyNoise`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [domain: set[Node] | None, kind: ClassVar[Literal[CommandKind.ApplyNoise]], nodes: list[Node], noise: Noise]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
84: DOC101: Method `NoiseModel.confuse_result`: Docstring contains fewer arguments than in function signature.
84: DOC103: Method `NoiseModel.confuse_result`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [rng: Generator | None].
graphix/opengraph.py — 14 violation(s)
 33: DOC605: Class `OpenGraph`: Attribute names match, but type hints in these attributes do not match: graph (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
163: DOC201: Method `OpenGraph.to_bloch` does not have a return section in docstring
163: DOC203: Method `OpenGraph.to_bloch` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
179: DOC201: Method `OpenGraph.downcast_bloch` does not have a return section in docstring
179: DOC203: Method `OpenGraph.downcast_bloch` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
208: DOC102: Method `OpenGraph.infer_pauli_measurements`: Docstring contains more arguments than in function signature.
208: DOC103: Method `OpenGraph.infer_pauli_measurements`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the docstring but not in the function signature: [pattern: pattern].
208: DOC203: Method `OpenGraph.infer_pauli_measurements` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['OpenGraph[Measurement]']; docstring return section types: ['Pattern']
280: DOC203: Method `OpenGraph.is_equal_structurally` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 2 type(s).
544: DOC105: Method `OpenGraph.compose`: Argument names match, but type hints in these args do not match: mapping
544: DOC501: Method `OpenGraph.compose` has raise statements, but the docstring does not have a "Raises" section
544: DOC503: Method `OpenGraph.compose` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['OpenGraphError', 'ValueError'].
617: DOC203: Method `OpenGraph.subs` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['OpenGraph[_M]']; docstring return section types: ['OpenGraph[Measurement]']
660: DOC203: Method `OpenGraph.xreplace` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['OpenGraph[_M]']; docstring return section types: ['OpenGraph[Measurement]']
graphix/ops.py — 8 violation(s)
 108: DOC105: Method `Ops.rx`: Argument names match, but type hints in these args do not match: theta
108: DOC203: Method `Ops.rx` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['npt.NDArray[np.complex128] | npt.NDArray[np.object_]']; docstring return section types: ['2*2 np.asarray']
132: DOC105: Method `Ops.ry`: Argument names match, but type hints in these args do not match: theta
132: DOC203: Method `Ops.ry` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['npt.NDArray[np.complex128] | npt.NDArray[np.object_]']; docstring return section types: ['2*2 np.asarray']
156: DOC105: Method `Ops.rz`: Argument names match, but type hints in these args do not match: theta
156: DOC203: Method `Ops.rz` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['npt.NDArray[np.complex128] | npt.NDArray[np.object_]']; docstring return section types: ['2*2 np.asarray']
179: DOC105: Method `Ops.rzz`: Argument names match, but type hints in these args do not match: theta
179: DOC203: Method `Ops.rzz` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['npt.NDArray[np.complex128] | npt.NDArray[np.object_]']; docstring return section types: ['4*4 np.asarray']
graphix/optimization.py — 17 violation(s)
 92: DOC602: Class `StandardizedPattern`: Class docstring contains more class attributes than in actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
92: DOC603: Class `StandardizedPattern`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the docstring but not in the actual class attributes: [c_dict: Mapping[Node, Clifford], e_set: frozenset[frozenset[Node]], input_nodes: tuple[Node, ...], m_list: tuple[command.M], n_list: tuple[command.N], output_nodes: tuple[Node, ...], results: Mapping[Node, Outcome], x_dict: Mapping[Node, frozenset[Node]], z_dict: Mapping[Node, frozenset[Node]]]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
133: DOC301: Class `StandardizedPattern`: __init__() should not have a docstring; please combine it with the docstring of the class
133: DOC101: Method `StandardizedPattern.__init__`: Docstring contains fewer arguments than in function signature.
133: DOC103: Method `StandardizedPattern.__init__`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [c_dict: Mapping[Node, Clifford], e_set: Iterable[Iterable[Node]], input_nodes: Iterable[Node], m_list: Iterable[command.M], n_list: Iterable[command.N], output_nodes: Iterable[Node], results: Mapping[Node, Outcome], x_dict: Mapping[Node, Iterable[Node]], z_dict: Mapping[Node, Iterable[Node]]].
232: DOC203: Method `StandardizedPattern.extract_graph` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['nx.Graph[int]']; docstring return section types: ['nx.Graph']
253: DOC105: Function `expand_domain`: Argument names match, but type hints in these args do not match: domain
253: DOC201: Function `expand_domain` does not have a return section in docstring
253: DOC203: Function `expand_domain` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
459: DOC203: Method `StandardizedPattern.extract_causal_flow` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['CausalFlow[BlochMeasurement]']; docstring return section types: ['flow.CausalFlow[Measurement]']
459: DOC503: Method `StandardizedPattern.extract_causal_flow` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: ['FlowError', 'ValueError']. Raised exceptions in the body: ['FlowGenericError'].
511: DOC203: Method `StandardizedPattern.extract_gflow` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['GFlow[BlochMeasurement]']; docstring return section types: ['flow.GFlow[Measurement]']
511: DOC502: Method `StandardizedPattern.extract_gflow` has a "Raises" section in the docstring, but there are not "raise" statements in the body
557: DOC502: Method `StandardizedPattern.extract_xzcorrections` has a "Raises" section in the docstring, but there are not "raise" statements in the body
596: DOC105: Function `_add_correction_domain`: Argument names match, but type hints in these args do not match: domain_dict, node, domain
614: DOC501: Function `_commute_clifford` has raise statements, but the docstring does not have a "Raises" section
614: DOC503: Function `_commute_clifford` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['NotImplementedError'].
graphix/parameter.py — 2 violation(s)
 133: DOC301: Class `PlaceholderOperationError`: __init__() should not have a docstring; please combine it with the docstring of the class
279: DOC301: Class `Placeholder`: __init__() should not have a docstring; please combine it with the docstring of the class
graphix/pattern.py — 64 violation(s)
 55: DOC602: Class `Pattern`: Class docstring contains more class attributes than in actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
55: DOC603: Class `Pattern`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [results: dict[int, Outcome]]. Arguments in the docstring but not in the actual class attributes: [list(self): , n_node: int]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
87: DOC301: Class `Pattern`: __init__() should not have a docstring; please combine it with the docstring of the class
87: DOC101: Method `Pattern.__init__`: Docstring contains fewer arguments than in function signature.
87: DOC103: Method `Pattern.__init__`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [cmds: Iterable[Command] | None, input_nodes: Iterable[int] | None, output_nodes: Iterable[int] | None].
122: DOC105: Method `Pattern.add`: Argument names match, but type hints in these args do not match: cmd
171: DOC501: Method `Pattern.compose` has raise statements, but the docstring does not have a "Raises" section
171: DOC503: Method `Pattern.compose` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['PatternError'].
326: DOC105: Method `Pattern.reorder_output_nodes`: Argument names match, but type hints in these args do not match: output_nodes
338: DOC105: Method `Pattern.reorder_input_nodes`: Argument names match, but type hints in these args do not match: input_nodes
394: DOC105: Method `Pattern.print_pattern`: Argument names match, but type hints in these args do not match: target
460: DOC501: Method `Pattern.shift_signals` has raise statements, but the docstring does not have a "Raises" section
460: DOC503: Method `Pattern.shift_signals` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['PatternError'].
520: DOC105: Function `expand_domain`: Argument names match, but type hints in these args do not match: domain
573: DOC105: Method `Pattern._find_op_to_be_moved`: Argument names match, but type hints in these args do not match: op
573: DOC201: Method `Pattern._find_op_to_be_moved` does not have a return section in docstring
573: DOC203: Method `Pattern._find_op_to_be_moved` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
600: DOC201: Method `Pattern._commute_ex` does not have a return section in docstring
600: DOC203: Method `Pattern._commute_ex` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
628: DOC201: Method `Pattern._commute_mx` does not have a return section in docstring
628: DOC203: Method `Pattern._commute_mx` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
648: DOC201: Method `Pattern._commute_mz` does not have a return section in docstring
648: DOC203: Method `Pattern._commute_mz` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
862: DOC203: Method `Pattern._extract_dependency` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['dict[int, set[int]]']; docstring return section types: ['dict of set']
883: DOC105: Method `Pattern.update_dependency`: Argument names match, but type hints in these args do not match: measured, dependency
883: DOC203: Method `Pattern.update_dependency` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['None']; docstring return section types: ['dict of set']
901: DOC502: Method `Pattern.extract_partial_order_layers` has a "Raises" section in the docstring, but there are not "raise" statements in the body
924: DOC203: Method `Pattern.extract_causal_flow` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['CausalFlow[BlochMeasurement]']; docstring return section types: ['CausalFlow[Measurement]']
924: DOC502: Method `Pattern.extract_causal_flow` has a "Raises" section in the docstring, but there are not "raise" statements in the body
952: DOC203: Method `Pattern.extract_gflow` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['GFlow[BlochMeasurement]']; docstring return section types: ['GFlow[Measurement]']
952: DOC502: Method `Pattern.extract_gflow` has a "Raises" section in the docstring, but there are not "raise" statements in the body
976: DOC502: Method `Pattern.extract_xzcorrections` has a "Raises" section in the docstring, but there are not "raise" statements in the body
1011: DOC101: Method `Pattern.connected_edges`: Docstring contains fewer arguments than in function signature.
1011: DOC103: Method `Pattern.connected_edges`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [edges: set[tuple[int, int]], node: int].
1011: DOC203: Method `Pattern.connected_edges` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['set[tuple[int, int]]']; docstring return section types: ['set of tuple']
1025: DOC203: Method `Pattern._measurement_order_space` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['list[int]']; docstring return section types: ['list of int']
1060: DOC105: Method `Pattern.sort_measurement_commands`: Argument names match, but type hints in these args do not match: meas_order
1060: DOC203: Method `Pattern.sort_measurement_commands` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['list[command.M]']; docstring return section types: ['list of command']
1142: DOC503: Method `Pattern.extract_opengraph` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: ['ValueError']. Raised exceptions in the body: ['PatternError'].
1184: DOC001: Function/method `extract_clifford`: Potential formatting errors in docstring. Error message: Section 'Returns' is not empty but nothing was parsed. (Note: DOC001 could trigger other unrelated violations under this function/method too. Please fix the docstring formatting first.)
1184: DOC201: Method `Pattern.extract_clifford` does not have a return section in docstring
1184: DOC203: Method `Pattern.extract_clifford` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
1193: DOC105: Method `Pattern.connected_nodes`: Argument names match, but type hints in these args do not match: prepared
1193: DOC203: Method `Pattern.connected_nodes` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['list[int]']; docstring return section types: ['list']
1272: DOC105: Method `Pattern._reorder_pattern`: Argument names match, but type hints in these args do not match: meas_commands
1307: DOC203: Method `Pattern.space_list` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['list[int]']; docstring return section types: ['list']
1374: DOC101: Method `Pattern.simulate_pattern`: Docstring contains fewer arguments than in function signature.
1374: DOC103: Method `Pattern.simulate_pattern`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [**kwargs: Any, input_state: Data]. Arguments in the docstring but not in the function signature: [kwargs: keyword args for specified backend.].
1374: DOC203: Method `Pattern.simulate_pattern` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 2 type(s).
1416: DOC102: Method `Pattern.perform_pauli_measurements`: Docstring contains more arguments than in function signature.
1416: DOC103: Method `Pattern.perform_pauli_measurements`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the docstring but not in the function signature: [.. seealso: : :func:`measure_pauli`].
1416: DOC501: Method `Pattern.perform_pauli_measurements` has raise statements, but the docstring does not have a "Raises" section
1416: DOC503: Method `Pattern.perform_pauli_measurements` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['PatternError'].
1448: DOC105: Method `Pattern.draw_graph`: Argument names match, but type hints in these args do not match: node_distance, figsize
1508: DOC105: Method `Pattern.to_qasm3`: Argument names match, but type hints in these args do not match: input_state
1680: DOC201: Method `Pattern.to_bloch` does not have a return section in docstring
1680: DOC203: Method `Pattern.to_bloch` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
1742: DOC105: Function `measure_pauli`: Argument names match, but type hints in these args do not match: pattern
1742: DOC203: Function `measure_pauli` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 3 type(s).
1852: DOC203: Function `pauli_nodes` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['list[tuple[command.M, PauliMeasurement]]', 'set[int]']; docstring return section types: ['list', 'set[int]']
1852: DOC501: Function `pauli_nodes` has raise statements, but the docstring does not have a "Raises" section
1852: DOC503: Function `pauli_nodes` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['PatternError'].
1933: DOC105: Function `shift_outcomes`: Argument names match, but type hints in these args do not match: outcomes
1933: DOC203: Function `shift_outcomes` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['dict[int, Outcome]']; docstring return section types: ['dict[int, int]']
graphix/pauli.py — 5 violation(s)
 156: DOC001: Function/method `iterate`: Potential formatting errors in docstring. Error message: Section 'Parameters' is not empty but nothing was parsed. (Note: DOC001 could trigger other unrelated violations under this function/method too. Please fix the docstring formatting first.)
156: DOC101: Method `Pauli.iterate`: Docstring contains fewer arguments than in function signature.
156: DOC103: Method `Pauli.iterate`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [symbol_only: bool].
156: DOC402: Method `Pauli.iterate` has "yield" statements, but the docstring does not have a "Yields" section
156: DOC404: Method `Pauli.iterate` yield type(s) in docstring not consistent with the return annotation. Return annotation exists, but docstring "yields" section does not exist or has 0 type(s).
graphix/pretty_print.py — 11 violation(s)
 39: DOC105: Function `angle_to_str`: Argument names match, but type hints in these args do not match: angle
140: DOC105: Function `command_to_str`: Argument names match, but type hints in these args do not match: cmd
140: DOC201: Function `command_to_str` does not have a return section in docstring
140: DOC203: Function `command_to_str` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
241: DOC101: Function `pattern_to_str`: Docstring contains fewer arguments than in function signature.
241: DOC103: Function `pattern_to_str`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [limit: int, target: Container[command.CommandKind] | None].
241: DOC201: Function `pattern_to_str` does not have a return section in docstring
241: DOC203: Function `pattern_to_str` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
277: DOC201: Function `set_to_str` does not have a return section in docstring
277: DOC203: Function `set_to_str` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
406: DOC103: Function `xzcorr_to_str`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [xzcorr: XZCorrections[AbstractMeasurement]]. Arguments in the docstring but not in the function signature: [flow: XZCorrections[AbstractMeasurement]].
graphix/pyzx.py — 8 violation(s)
 36: DOC101: Function `to_pyzx_graph`: Docstring contains fewer arguments than in function signature.
36: DOC103: Function `to_pyzx_graph`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [og: OpenGraph[BlochMeasurement]].
36: DOC201: Function `to_pyzx_graph` does not have a return section in docstring
36: DOC203: Function `to_pyzx_graph` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
119: DOC101: Function `from_pyzx_graph`: Docstring contains fewer arguments than in function signature.
119: DOC103: Function `from_pyzx_graph`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [g: BaseGraph[int, tuple[int, int]]].
119: DOC201: Function `from_pyzx_graph` does not have a return section in docstring
119: DOC203: Function `from_pyzx_graph` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
graphix/qasm3_exporter.py — 17 violation(s)
 24: DOC101: Function `circuit_to_qasm3`: Docstring contains fewer arguments than in function signature.
24: DOC103: Function `circuit_to_qasm3`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [circuit: Circuit].
35: DOC101: Function `circuit_to_qasm3_lines`: Docstring contains fewer arguments than in function signature.
35: DOC103: Function `circuit_to_qasm3_lines`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [circuit: Circuit].
35: DOC402: Function `circuit_to_qasm3_lines` has "yield" statements, but the docstring does not have a "Yields" section
35: DOC404: Function `circuit_to_qasm3_lines` yield type(s) in docstring not consistent with the return annotation. Return annotation exists, but docstring "yields" section does not exist or has 0 type(s).
115: DOC105: Function `pattern_to_qasm3`: Argument names match, but type hints in these args do not match: input_state
115: DOC201: Function `pattern_to_qasm3` does not have a return section in docstring
115: DOC203: Function `pattern_to_qasm3` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
163: DOC101: Function `command_to_qasm3_lines`: Docstring contains fewer arguments than in function signature.
163: DOC103: Function `command_to_qasm3_lines`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [cmd: Command].
163: DOC404: Function `command_to_qasm3_lines` yield type(s) in docstring not consistent with the return annotation. The yield type (the 0th arg in Generator[...]/Iterator[...]): str; docstring "yields" section types: string
163: DOC501: Function `command_to_qasm3_lines` has raise statements, but the docstring does not have a "Raises" section
163: DOC503: Function `command_to_qasm3_lines` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
233: DOC101: Function `domain_to_qasm3_lines`: Docstring contains fewer arguments than in function signature.
233: DOC103: Function `domain_to_qasm3_lines`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [cmd: str, domain: Iterable[int]].
233: DOC404: Function `domain_to_qasm3_lines` yield type(s) in docstring not consistent with the return annotation. The yield type (the 0th arg in Generator[...]/Iterator[...]): str; docstring "yields" section types: string
graphix/random_objects.py — 21 violation(s)
 94: DOC101: Function `rand_gauss_cpx_mat`: Docstring contains fewer arguments than in function signature.
94: DOC103: Function `rand_gauss_cpx_mat`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [rng: Generator | None].
94: DOC201: Function `rand_gauss_cpx_mat` does not have a return section in docstring
94: DOC203: Function `rand_gauss_cpx_mat` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
116: DOC101: Function `rand_channel_kraus`: Docstring contains fewer arguments than in function signature.
116: DOC103: Function `rand_channel_kraus`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [rng: Generator | None].
116: DOC201: Function `rand_channel_kraus` does not have a return section in docstring
116: DOC203: Function `rand_channel_kraus` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
116: DOC501: Function `rand_channel_kraus` has raise statements, but the docstring does not have a "Raises" section
116: DOC503: Function `rand_channel_kraus` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
196: DOC105: Function `_first_rotation`: Argument names match, but type hints in these args do not match: rng
212: DOC105: Function `_mid_rotation`: Argument names match, but type hints in these args do not match: rng
229: DOC105: Function `_last_rotation`: Argument names match, but type hints in these args do not match: rng
259: DOC105: Function `_entangler_rzz`: Argument names match, but type hints in these args do not match: rng
275: DOC105: Function `rand_gate`: Argument names match, but type hints in these args do not match: rng
318: DOC105: Function `_genpair`: Argument names match, but type hints in these args do not match: rng
342: DOC105: Function `_gentriplet`: Argument names match, but type hints in these args do not match: rng
366: DOC105: Function `rand_circuit`: Argument names match, but type hints in these args do not match: rng, parameters
438: DOC101: Function `rand_state_vector`: Docstring contains fewer arguments than in function signature.
438: DOC103: Function `rand_state_vector`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [rng: Generator | None].
438: DOC203: Function `rand_state_vector` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['npt.NDArray[np.complex128]']; docstring return section types: ['numpy.ndarray']
graphix/repr_mixins.py — 2 violation(s)
 58: DOC501: Method `EnumReprMixin.__repr__` has raise statements, but the docstring does not have a "Raises" section
58: DOC503: Method `EnumReprMixin.__repr__` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['TypeError'].
graphix/sim/base_backend.py — 38 violation(s)
 217: DOC001: Class `NodeIndex`: Potential formatting errors in docstring. Error message: Section 'Attributes' is not empty but nothing was parsed.
232: DOC301: Class `NodeIndex`: __init__() should not have a docstring; please combine it with the docstring of the class
232: DOC001: Function/method `__init__`: Potential formatting errors in docstring. Error message: Section 'Attributes' is not empty but nothing was parsed. (Note: DOC001 could trigger other unrelated violations under this function/method too. Please fix the docstring formatting first.)
305: DOC101: Method `NodeIndex.swap`: Docstring contains fewer arguments than in function signature.
305: DOC103: Method `NodeIndex.swap`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [i: int, j: int]. Arguments in the docstring but not in the function signature: [i, j: int].
367: DOC102: Method `DenseState.add_nodes`: Docstring contains more arguments than in function signature.
367: DOC103: Method `DenseState.add_nodes`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the docstring but not in the function signature: [See: meth:`Backend.add_nodes` for further details.].
384: DOC105: Method `DenseState.entangle`: Argument names match, but type hints in these args do not match: edge
394: DOC105: Method `DenseState.evolve`: Argument names match, but type hints in these args do not match: op, qargs
406: DOC105: Method `DenseState.evolve_single`: Argument names match, but type hints in these args do not match: op
418: DOC105: Method `DenseState.expectation_single`: Argument names match, but type hints in these args do not match: op
418: DOC203: Method `DenseState.expectation_single` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['complex']; docstring return section types: ['expectation value.']
438: DOC105: Method `DenseState.swap`: Argument names match, but type hints in these args do not match: qubits
447: DOC105: Method `DenseState.apply_noise`: Argument names match, but type hints in these args do not match: qubits
447: DOC501: Method `DenseState.apply_noise` has raise statements, but the docstring does not have a "Raises" section
447: DOC503: Method `DenseState.apply_noise` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['NoiseNotSupportedError'].
466: DOC105: Function `_outcome_to_operator_matrix`: Argument names match, but type hints in these args do not match: vec, outcome
466: DOC203: Function `_outcome_to_operator_matrix` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['Matrix']; docstring return section types: ['numpy.ndarray']
466: DOC501: Function `_outcome_to_operator_matrix` has raise statements, but the docstring does not have a "Raises" section
466: DOC503: Function `_outcome_to_operator_matrix` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['TypeError'].
506: DOC601: Class `Backend`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
506: DOC603: Class `Backend`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [state: _StateT_co]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
621: DOC102: Method `Backend.apply_noise`: Docstring contains more arguments than in function signature.
621: DOC103: Method `Backend.apply_noise`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [cmd: ApplyNoise]. Arguments in the docstring but not in the function signature: [nodes: sequence of ints., noise: Noise].
621: DOC501: Method `Backend.apply_noise` has raise statements, but the docstring does not have a "Raises" section
621: DOC503: Method `Backend.apply_noise` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['NoiseNotSupportedError'].
653: DOC105: Method `Backend.entangle_nodes`: Argument names match, but type hints in these args do not match: edge
667: DOC105: Method `Backend.measure`: Argument names match, but type hints in these args do not match: rng
667: DOC201: Method `Backend.measure` does not have a return section in docstring
667: DOC203: Method `Backend.measure` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
685: DOC601: Class `DenseStateBackend`: Class docstring contains fewer class attributes than actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
685: DOC603: Class `DenseStateBackend`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Attributes in the class definition but not in the docstring: [branch_selector: BranchSelector, node_index: NodeIndex, symbolic: bool]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
721: DOC102: Method `DenseStateBackend.add_nodes`: Docstring contains more arguments than in function signature.
721: DOC103: Method `DenseStateBackend.add_nodes`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the docstring but not in the function signature: [See: meth:`Backend.add_nodes` for further details.].
742: DOC105: Method `DenseStateBackend.entangle_nodes`: Argument names match, but type hints in these args do not match: edge
755: DOC105: Method `DenseStateBackend.measure`: Argument names match, but type hints in these args do not match: rng
755: DOC201: Method `DenseStateBackend.measure` does not have a return section in docstring
755: DOC203: Method `DenseStateBackend.measure` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
graphix/sim/density_matrix.py — 16 violation(s)
 51: DOC301: Class `DensityMatrix`: __init__() should not have a docstring; please combine it with the docstring of the class
51: DOC101: Method `DensityMatrix.__init__`: Docstring contains fewer arguments than in function signature.
51: DOC103: Method `DensityMatrix.__init__`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [data: Data, nqubit: int | None].
51: DOC501: Method `DensityMatrix.__init__` has raise statements, but the docstring does not have a "Raises" section
51: DOC503: Method `DensityMatrix.__init__` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
173: DOC501: Method `DensityMatrix.evolve_single` has raise statements, but the docstring does not have a "Raises" section
173: DOC503: Method `DensityMatrix.evolve_single` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
193: DOC105: Method `DensityMatrix.evolve`: Argument names match, but type hints in these args do not match: qargs
193: DOC501: Method `DensityMatrix.evolve` has raise statements, but the docstring does not have a "Raises" section
193: DOC503: Method `DensityMatrix.evolve` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
244: DOC501: Method `DensityMatrix.expectation_single` has raise statements, but the docstring does not have a "Raises" section
244: DOC503: Method `DensityMatrix.expectation_single` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
276: DOC203: Method `DensityMatrix.dims` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['tuple[int, ...]']; docstring return section types: ['tuple[int, int]']
357: DOC105: Method `DensityMatrix.ptrace`: Argument names match, but type hints in these args do not match: qargs
411: DOC105: Method `DensityMatrix.apply_channel`: Argument names match, but type hints in these args do not match: qargs
446: DOC105: Method `DensityMatrix.apply_noise`: Argument names match, but type hints in these args do not match: qubits
graphix/sim/statevec.py — 13 violation(s)
 48: DOC301: Class `Statevec`: __init__() should not have a docstring; please combine it with the docstring of the class
173: DOC105: Method `Statevec.evolve_single`: Argument names match, but type hints in these args do not match: op
187: DOC105: Method `Statevec.evolve`: Argument names match, but type hints in these args do not match: op, qargs
273: DOC105: Method `Statevec.entangle`: Argument names match, but type hints in these args do not match: edge
286: DOC105: Method `Statevec.tensor`: Argument names match, but type hints in these args do not match: other
302: DOC105: Method `Statevec.cnot`: Argument names match, but type hints in these args do not match: qubits
316: DOC105: Method `Statevec.swap`: Argument names match, but type hints in these args do not match: qubits
351: DOC105: Method `Statevec.expectation_single`: Argument names match, but type hints in these args do not match: op
351: DOC203: Method `Statevec.expectation_single` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['complex']; docstring return section types: ['expectation value.']
371: DOC105: Method `Statevec.expectation_value`: Argument names match, but type hints in these args do not match: op, qargs
371: DOC203: Method `Statevec.expectation_value` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['complex']; docstring return section types: ['expectation value']
391: DOC105: Method `Statevec.fidelity`: Argument names match, but type hints in these args do not match: other
409: DOC105: Method `Statevec.isclose`: Argument names match, but type hints in these args do not match: other
graphix/sim/tensornet.py — 47 violation(s)
 46: DOC301: Class `MBQCTensorNet`: __init__() should not have a docstring; please combine it with the docstring of the class
79: DOC105: Method `MBQCTensorNet.open_tensor`: Argument names match, but type hints in these args do not match: index
79: DOC203: Method `MBQCTensorNet.open_tensor` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['npt.NDArray[np.complex128]']; docstring return section types: ['']
100: DOC103: Method `MBQCTensorNet.add_qubit`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [state: PrepareState]. Arguments in the docstring but not in the function signature: [state (optional): str or 2-element np.ndarray].
100: DOC501: Method `MBQCTensorNet.add_qubit` has raise statements, but the docstring does not have a "Raises" section
100: DOC503: Method `MBQCTensorNet.add_qubit` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['TypeError', 'ValueError'].
138: DOC103: Method `MBQCTensorNet.evolve_single`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [label: str]. Arguments in the docstring but not in the function signature: [label (optional): str].
165: DOC103: Method `MBQCTensorNet.add_qubits`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [states: PrepareState | Iterable[PrepareState]]. Arguments in the docstring but not in the function signature: [states (optional): Data].
196: DOC101: Method `MBQCTensorNet.measure_single`: Docstring contains fewer arguments than in function signature.
196: DOC103: Method `MBQCTensorNet.measure_single`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [rng: Generator | None].
196: DOC203: Method `MBQCTensorNet.measure_single` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['Outcome']; docstring return section types: ['int']
196: DOC501: Method `MBQCTensorNet.measure_single` has raise statements, but the docstring does not have a "Raises" section
196: DOC503: Method `MBQCTensorNet.measure_single` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['NotImplementedError', 'ValueError', 'Warning'].
259: DOC102: Method `MBQCTensorNet.prepare_graph_state`: Docstring contains more arguments than in function signature.
259: DOC103: Method `MBQCTensorNet.prepare_graph_state`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the docstring but not in the function signature: [.. seealso: : :meth:`~graphix.sim.tensornet.TensorNetworkBackend.__init__()`].
312: DOC103: Method `MBQCTensorNet.basis_coefficient`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [indices: Sequence[int] | None, normalize: bool]. Arguments in the docstring but not in the function signature: [indices (optional): list of int, normalize (optional): bool].
360: DOC105: Method `MBQCTensorNet.basis_amplitude`: Argument names match, but type hints in these args do not match: basis
360: DOC203: Method `MBQCTensorNet.basis_amplitude` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['float']; docstring return section types: ['']
378: DOC103: Method `MBQCTensorNet.to_statevector`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [indices: Sequence[int] | None]. Arguments in the docstring but not in the function signature: [indices (optional): list of int].
378: DOC203: Method `MBQCTensorNet.to_statevector` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['npt.NDArray[np.complex128]']; docstring return section types: ['']
403: DOC101: Method `MBQCTensorNet.norm`: Docstring contains fewer arguments than in function signature.
403: DOC103: Method `MBQCTensorNet.norm`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [optimize: str | PathOptimizer | None].
403: DOC203: Method `MBQCTensorNet.norm` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['float']; docstring return section types: ['']
418: DOC101: Method `MBQCTensorNet.expectation_value`: Docstring contains fewer arguments than in function signature.
418: DOC103: Method `MBQCTensorNet.expectation_value`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [optimize: str | PathOptimizer | None, output_node_indices: Iterable[int] | None]. Arguments in the docstring but not in the function signature: [output_node_indices (optional): list of int].
418: DOC203: Method `MBQCTensorNet.expectation_value` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['float']; docstring return section types: ['']
472: DOC105: Method `MBQCTensorNet.evolve`: Argument names match, but type hints in these args do not match: operator, qubit_indices
518: DOC101: Method `MBQCTensorNet.copy`: Docstring contains fewer arguments than in function signature.
518: DOC103: Method `MBQCTensorNet.copy`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [virtual: bool].
518: DOC203: Method `MBQCTensorNet.copy` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['MBQCTensorNet']; docstring return section types: ['']
610: DOC301: Class `TensorNetworkBackend`: __init__() should not have a docstring; please combine it with the docstring of the class
610: DOC105: Method `TensorNetworkBackend.__init__`: Argument names match, but type hints in these args do not match: pattern, input_state, branch_selector
610: DOC501: Method `TensorNetworkBackend.__init__` has raise statements, but the docstring does not have a "Raises" section
610: DOC503: Method `TensorNetworkBackend.__init__` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['NotImplementedError', 'ValueError'].
669: DOC501: Method `TensorNetworkBackend.add_nodes` has raise statements, but the docstring does not have a "Raises" section
669: DOC503: Method `TensorNetworkBackend.add_nodes` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['NotImplementedError'].
702: DOC105: Method `TensorNetworkBackend.entangle_nodes`: Argument names match, but type hints in these args do not match: edge
740: DOC101: Method `TensorNetworkBackend.measure`: Docstring contains fewer arguments than in function signature.
740: DOC103: Method `TensorNetworkBackend.measure`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [rng: Generator | None].
740: DOC201: Method `TensorNetworkBackend.measure` does not have a return section in docstring
740: DOC203: Method `TensorNetworkBackend.measure` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
740: DOC501: Method `TensorNetworkBackend.measure` has raise statements, but the docstring does not have a "Raises" section
740: DOC503: Method `TensorNetworkBackend.measure` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['TypeError'].
780: DOC101: Method `TensorNetworkBackend.apply_clifford`: Docstring contains fewer arguments than in function signature.
780: DOC103: Method `TensorNetworkBackend.apply_clifford`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [clifford: Clifford, node: int]. Arguments in the docstring but not in the function signature: [cmd: list].
801: DOC105: Function `outer_product`: Argument names match, but type hints in these args do not match: vectors
801: DOC203: Function `outer_product` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['npt.NDArray[np.complex128]']; docstring return section types: ['']
graphix/simulator.py — 17 violation(s)
 114: DOC203: Method `MeasureMethod.measurement_outcome` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['Outcome']; docstring return section types: ['bool']
130: DOC105: Method `MeasureMethod.store_measurement_outcome`: Argument names match, but type hints in these args do not match: result
142: DOC201: Method `MeasureMethod.check_domain` does not have a return section in docstring
142: DOC203: Method `MeasureMethod.check_domain` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 0 type(s).
158: DOC301: Class `DefaultMeasureMethod`: __init__() should not have a docstring; please combine it with the docstring of the class
218: DOC105: Method `DefaultMeasureMethod.store_measurement_outcome`: Argument names match, but type hints in these args do not match: result
240: DOC301: Class `PatternSimulator`: __init__() should not have a docstring; please combine it with the docstring of the class
298: DOC101: Method `PatternSimulator.run`: Docstring contains fewer arguments than in function signature.
298: DOC103: Method `PatternSimulator.run`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [input_state: Data, rng: Generator | None].
298: DOC203: Method `PatternSimulator.run` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 2 type(s).
298: DOC501: Method `PatternSimulator.run` has raise statements, but the docstring does not have a "Raises" section
298: DOC503: Method `PatternSimulator.run` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
401: DOC101: Function `_initialize_backend`: Docstring contains fewer arguments than in function signature.
401: DOC103: Function `_initialize_backend`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [pattern: Pattern].
401: DOC203: Function `_initialize_backend` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['_BuiltinBackend | Backend[_StateT_co]']; docstring return section types: ['class:`Backend`']
401: DOC501: Function `_initialize_backend` has raise statements, but the docstring does not have a "Raises" section
401: DOC503: Function `_initialize_backend` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
graphix/transpiler.py — 33 violation(s)
 70: DOC602: Class `Circuit`: Class docstring contains more class attributes than in actual class attributes. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
70: DOC603: Class `Circuit`: Class docstring attributes are different from actual class attributes. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the docstring but not in the actual class attributes: [width: int]. (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
85: DOC301: Class `Circuit`: __init__() should not have a docstring; please combine it with the docstring of the class
85: DOC101: Method `Circuit.__init__`: Docstring contains fewer arguments than in function signature.
85: DOC103: Method `Circuit.__init__`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [instr: Iterable[Instruction] | None, width: int].
357: DOC203: Method `Circuit.transpile` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['TranspileResult']; docstring return section types: [':class:`TranspileResult` object']
357: DOC501: Method `Circuit.transpile` has raise statements, but the docstring does not have a "Raises" section
357: DOC503: Method `Circuit.transpile` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
470: DOC103: Method `Circuit._cnot_command`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [target_node: int]. Arguments in the docstring but not in the function signature: [target: int].
470: DOC203: Method `Circuit._cnot_command` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['int', 'int', 'list[command.Command]']; docstring return section types: ['int', 'int', 'list']
510: DOC203: Method `Circuit._cz_command` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['list[Command]']; docstring return section types: ['list']
528: DOC203: Method `Circuit._m_command` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['list[Command]']; docstring return section types: ['list']
547: DOC203: Method `Circuit._h_command` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['int', 'list[Command]']; docstring return section types: ['int', 'list']
569: DOC105: Method `Circuit._s_command`: Argument names match, but type hints in these args do not match: ancilla
569: DOC203: Method `Circuit._s_command` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['int', 'list[command.Command]']; docstring return section types: ['int', 'list']
601: DOC105: Method `Circuit._x_command`: Argument names match, but type hints in these args do not match: ancilla
601: DOC203: Method `Circuit._x_command` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['int', 'list[command.Command]']; docstring return section types: ['int', 'list']
633: DOC105: Method `Circuit._y_command`: Argument names match, but type hints in these args do not match: ancilla
633: DOC203: Method `Circuit._y_command` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['int', 'list[command.Command]']; docstring return section types: ['int', 'list']
670: DOC105: Method `Circuit._z_command`: Argument names match, but type hints in these args do not match: ancilla
670: DOC203: Method `Circuit._z_command` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['int', 'list[command.Command]']; docstring return section types: ['int', 'list']
702: DOC105: Method `Circuit._rx_command`: Argument names match, but type hints in these args do not match: ancilla
702: DOC203: Method `Circuit._rx_command` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['int', 'list[command.Command]']; docstring return section types: ['int', 'list']
738: DOC105: Method `Circuit._ry_command`: Argument names match, but type hints in these args do not match: ancilla
738: DOC203: Method `Circuit._ry_command` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['int', 'list[command.Command]']; docstring return section types: ['int', 'list']
779: DOC105: Method `Circuit._rz_command`: Argument names match, but type hints in these args do not match: ancilla
779: DOC203: Method `Circuit._rz_command` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['int', 'list[command.Command]']; docstring return section types: ['int', 'list']
815: DOC105: Method `Circuit._ccx_command`: Argument names match, but type hints in these args do not match: ancilla
815: DOC203: Method `Circuit._ccx_command` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['int', 'int', 'int', 'list[command.Command]']; docstring return section types: ['int', 'int', 'int', 'list']
911: DOC105: Method `Circuit.simulate_statevector`: Argument names match, but type hints in these args do not match: input_state, branch_selector, rng
911: DOC203: Method `Circuit.simulate_statevector` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['SimulateResult']; docstring return section types: [':class:`SimulateResult`']
911: DOC501: Method `Circuit.simulate_statevector` has raise statements, but the docstring does not have a "Raises" section
911: DOC503: Method `Circuit.simulate_statevector` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
graphix/visualization.py — 24 violation(s)
 40: DOC605: Class `GraphVisualizer`: Attribute names match, but type hints in these attributes do not match: og, local_clifford (Please read https://jsh9.github.io/pydoclint/checking_class_attributes.html on how to correctly document class attributes.)
55: DOC105: Method `GraphVisualizer.visualize`: Argument names match, but type hints in these args do not match: node_distance, figsize
148: DOC105: Method `GraphVisualizer.visualize_from_pattern`: Argument names match, but type hints in these args do not match: node_distance, figsize
261: DOC105: Method `GraphVisualizer.__draw_nodes_role`: Argument names match, but type hints in these args do not match: pos
285: DOC102: Method `GraphVisualizer.visualize_graph`: Docstring contains more arguments than in function signature.
285: DOC110: Method `GraphVisualizer.visualize_graph`: The option `--arg-type-hints-in-docstring` is `True` but not all args in the docstring arg list have type hints
285: DOC103: Method `GraphVisualizer.visualize_graph`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the docstring but not in the function signature: []: ].
451: DOC105: Method `GraphVisualizer.determine_figsize`: Argument names match, but type hints in these args do not match: l_k, pos, node_distance
451: DOC203: Method `GraphVisualizer.determine_figsize` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['_Point']; docstring return section types: ['tuple']
451: DOC501: Method `GraphVisualizer.determine_figsize` has raise statements, but the docstring does not have a "Raises" section
451: DOC503: Method `GraphVisualizer.determine_figsize` exceptions in the "Raises" section in the docstring do not match those in the function body. Raised exceptions in the docstring: []. Raised exceptions in the body: ['ValueError'].
483: DOC105: Method `GraphVisualizer.place_edge_paths`: Argument names match, but type hints in these args do not match: flow, pos
483: DOC203: Method `GraphVisualizer.place_edge_paths` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['dict[_Edge, list[_Point]]', 'dict[_Edge, list[_Point]]']; docstring return section types: ['dict', 'dict']
589: DOC105: Method `GraphVisualizer.place_edge_paths_without_structure`: Argument names match, but type hints in these args do not match: pos
589: DOC203: Method `GraphVisualizer.place_edge_paths_without_structure` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['dict[_Edge, list[_Point]]']; docstring return section types: ['dict']
605: DOC102: Method `GraphVisualizer.place_causal_flow`: Docstring contains more arguments than in function signature.
605: DOC103: Method `GraphVisualizer.place_causal_flow`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [flow: CausalFlow[AbstractPlanarMeasurement]]. Arguments in the docstring but not in the function signature: [f: dict, l_k: dict].
605: DOC203: Method `GraphVisualizer.place_causal_flow` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['dict[int, _Point]']; docstring return section types: ['dict']
640: DOC102: Method `GraphVisualizer.place_pauli_flow`: Docstring contains more arguments than in function signature.
640: DOC103: Method `GraphVisualizer.place_pauli_flow`: Docstring arguments are different from function arguments. (Or could be other formatting issues: https://jsh9.github.io/pydoclint/violation_codes.html#notes-on-doc103 ). Arguments in the function signature but not in the docstring: [flow: PauliFlow[AbstractMeasurement]]. Arguments in the docstring but not in the function signature: [g: dict, l_k: dict].
640: DOC203: Method `GraphVisualizer.place_pauli_flow` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['dict[int, _Point]']; docstring return section types: ['dict']
685: DOC203: Method `GraphVisualizer.place_without_structure` return type(s) in docstring not consistent with the return annotation. Return annotation has 1 type(s); docstring return section has 2 type(s).
784: DOC105: Method `GraphVisualizer.place_all_corrections`: Argument names match, but type hints in these args do not match: layers
784: DOC203: Method `GraphVisualizer.place_all_corrections` return type(s) in docstring not consistent with the return annotation. Return annotation types: ['dict[int, _Point]']; docstring return section types: ['dict']

Violations are reported but do not fail the job.

@codecov

codecovBot commented Feb 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.85%. Comparing base (927aa4b) to head (b6a8982).

Additional details and impacted files
@@ Coverage Diff @@## master #446 +/- ##
=======================================
Coverage 88.85% 88.85% =======================================
Files 44 44 Lines 6533 6533 =======================================
Hits 5805 5805 Misses 728 728 

☔ 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.

@matulnimatulni 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.

Thanks for initiating this @emlynsg !
I think it's a nice thing to have, I made a few small comments, but I can't say much about the .yml file.

Did you do the modifications in the docstrings by hand or was this automated ?

Comment threadpyproject.toml
[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]

[tool.pydoclint]

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.

Maybe here it would be good to exclude example and test files.

I'd add check-arg-defaults as true.

The baseline option could be interesting for us!

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Yes I think exclusion for those makes sense and we can fix much later.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Just read the docs about baseline, can't believe I missed that it sounds super handy!

Attributes
----------
rho : Matrix
density matrix

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.

Is there a way to consistently capitalise the first word of the parameter description?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I'll keep investigating, but I can't find anything for now.

Comment threadrequirements-dev.txt Outdated

openqasm-parser>=3.1.0
graphix-qasm-parser>=0.1.1
# graphix-qasm-parser>=0.1.1

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.

Maybe add pydoclint to the dev requirements file ?

@emlynsg

Copy link
Copy Markdown
ContributorAuthor

Thanks for initiating this @emlynsg ! I think it's a nice thing to have, I made a few small comments, but I can't say much about the .yml file.

Did you do the modifications in the docstrings by hand or was this automated ?

I made the changes to the docstrings by hand. Pydoclint would fault in some cases (e.g. name with colon and no type in the docstring), rather than just the normal warning you expect. It is one downside, but running in pre-commit from now on will avoid it entirely.

@emlynsg

Copy link
Copy Markdown
ContributorAuthor

Note for our memories - we will try an automated way to fix docstrings first, and if that succeeds apply this to the entire codebase.

Sign up for freeto 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.

2 participants

@emlynsg@matulni