Skip to content

Redundant parentheses around return annotation #2041

@NeilGirdhar

Description

@NeilGirdhar
def infer_encoding_trajectory(encoding: EncodingElement,
                              observation: PoolingMessage,
                              prediction: PredictionMessage,
                              weights: hk.Params,
                              rng: Generator,
                              iterations: int) -> (
                                  tuple[EncodingState, EncodingTrajectory]):

became

def infer_encoding_trajectory(
    encoding: EncodingElement,
    observation: PoolingMessage,
    prediction: PredictionMessage,
    weights: hk.Params,
    rng: Generator,
    iterations: int,
) -> (tuple[EncodingState, EncodingTrajectory]):

The parentheses were only there to allow wrapping and should have been removed. In general, black doesn't need to preserve parentheses around an entire expression, including a type annotation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    F: parenthesesToo many parentheses, not enough parentheses, and so on.S: acceptedThe changes in this design / enhancement issue have been accepted and can be implementedT: styleWhat do we want Blackened code to look like?

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions