Skip to content

Commit

Permalink
Prefer dangling close paren for overlong function signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
appleby committed Oct 30, 2019
1 parent 7e13704 commit 52f3b3e
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions pyquil/gates.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@
ClassicalAdd, ClassicalSub, ClassicalMul, ClassicalDiv)


def unpack_reg_val_pair(classical_reg1: MemoryReferenceDesignator,
classical_reg2: Union[MemoryReferenceDesignator, int, float]) \
-> Tuple[MemoryReference, Union[MemoryReference, int, float]]:
def unpack_reg_val_pair(
classical_reg1: MemoryReferenceDesignator,
classical_reg2: Union[MemoryReferenceDesignator, int, float]
) -> Tuple[MemoryReference, Union[MemoryReference, int, float]]:
"""
Helper function for typechecking / type-coercing arguments to constructors for binary classical operators.
Expand All @@ -46,10 +47,11 @@ def unpack_reg_val_pair(classical_reg1: MemoryReferenceDesignator,
return left, unpack_classical_reg(classical_reg2)


def prepare_ternary_operands(classical_reg1: MemoryReferenceDesignator,
classical_reg2: MemoryReferenceDesignator,
classical_reg3: Union[MemoryReferenceDesignator, int, float]) \
-> Tuple[MemoryReference, MemoryReference, Union[MemoryReference, int, float]]:
def prepare_ternary_operands(
classical_reg1: MemoryReferenceDesignator,
classical_reg2: MemoryReferenceDesignator,
classical_reg3: Union[MemoryReferenceDesignator, int, float]
) -> Tuple[MemoryReference, MemoryReference, Union[MemoryReference, int, float]]:
"""
Helper function for typechecking / type-coercing arguments to constructors for ternary classical operators.
Expand Down Expand Up @@ -547,8 +549,7 @@ def NOT(classical_reg: MemoryReferenceDesignator) -> ClassicalNot:


def AND(classical_reg1: MemoryReferenceDesignator,
classical_reg2: Union[MemoryReferenceDesignator, int]
) -> ClassicalAnd:
classical_reg2: Union[MemoryReferenceDesignator, int]) -> ClassicalAnd:
"""
Produce an AND instruction.
Expand Down Expand Up @@ -579,8 +580,7 @@ def OR(classical_reg1: MemoryReferenceDesignator,


def IOR(classical_reg1: MemoryReferenceDesignator,
classical_reg2: Union[MemoryReferenceDesignator, int]
) -> ClassicalInclusiveOr:
classical_reg2: Union[MemoryReferenceDesignator, int]) -> ClassicalInclusiveOr:
"""
Produce an inclusive OR instruction.
Expand All @@ -594,8 +594,7 @@ def IOR(classical_reg1: MemoryReferenceDesignator,


def XOR(classical_reg1: MemoryReferenceDesignator,
classical_reg2: Union[MemoryReferenceDesignator, int]
) -> ClassicalExclusiveOr:
classical_reg2: Union[MemoryReferenceDesignator, int]) -> ClassicalExclusiveOr:
"""
Produce an exclusive OR instruction.
Expand Down

0 comments on commit 52f3b3e

Please sign in to comment.