@@ -1814,6 +1814,8 @@ def zip(
18141814
18151815 zip .__doc__ = AbstractCircuit .zip .__doc__
18161816
1817+ # TODO(#3388) Add documentation for Raises.
1818+ # pylint: disable=missing-raises-doc
18171819 def transform_qubits (
18181820 self ,
18191821 qubit_map : Union [Dict ['cirq.Qid' , 'cirq.Qid' ], Callable [['cirq.Qid' ], 'cirq.Qid' ]],
@@ -1847,6 +1849,7 @@ def transform_qubits(
18471849 new_device = self .device if new_device is None else new_device , qubit_mapping = transform
18481850 )
18491851
1852+ # pylint: enable=missing-raises-doc
18501853 def _prev_moment_available (self , op : 'cirq.Operation' , end_moment_index : int ) -> Optional [int ]:
18511854 last_available = end_moment_index
18521855 k = end_moment_index
@@ -2083,6 +2086,8 @@ def _insert_operations(
20832086 self ._moments [moment_index ].operations + tuple (new_ops )
20842087 )
20852088
2089+ # TODO(#3388) Add documentation for Raises.
2090+ # pylint: disable=missing-raises-doc
20862091 def insert_at_frontier (
20872092 self , operations : 'cirq.OP_TREE' , start : int , frontier : Dict ['cirq.Qid' , int ] = None
20882093 ) -> Dict ['cirq.Qid' , int ]:
@@ -2116,6 +2121,7 @@ def insert_at_frontier(
21162121
21172122 return frontier
21182123
2124+ # pylint: enable=missing-raises-doc
21192125 def batch_remove (self , removals : Iterable [Tuple [int , 'cirq.Operation' ]]) -> None :
21202126 """Removes several operations from a circuit.
21212127
@@ -2125,11 +2131,9 @@ def batch_remove(self, removals: Iterable[Tuple[int, 'cirq.Operation']]) -> None
21252131 listed operations must actually be present or the edit will
21262132 fail (without making any changes to the circuit).
21272133
2128- ValueError:
2129- One of the operations to delete wasn't present to start with.
2130-
2131- IndexError:
2132- Deleted from a moment that doesn't exist.
2134+ Raises:
2135+ ValueError: One of the operations to delete wasn't present to start with.
2136+ IndexError: Deleted from a moment that doesn't exist.
21332137 """
21342138 copy = self .copy ()
21352139 for i , op in removals :
@@ -2152,11 +2156,9 @@ def batch_replace(
21522156 operations must actually be present or the edit will fail
21532157 (without making any changes to the circuit).
21542158
2155- ValueError:
2156- One of the operations to replace wasn't present to start with.
2157-
2158- IndexError:
2159- Replaced in a moment that doesn't exist.
2159+ Raises:
2160+ ValueError: One of the operations to replace wasn't present to start with.
2161+ IndexError: Replaced in a moment that doesn't exist.
21602162 """
21612163 copy = self .copy ()
21622164 for i , op , new_op in replacements :
0 commit comments