Skip to content

W503: yapf inserts line break before rather than after a '-' binary operator #498

Open
@chtseac

Description

@chtseac

There is no option that I can find for this, unlike #38 and #252.

Code:

import inspect


def get_default_of(func, argname):
    argspec_of_func = inspect.getargspec(func)
    return argspec_of_func.defaults[argspec_of_func.args.index(argname) - len(argspec_of_func.args)]

Result:

import inspect


def get_default_of(func, argname):
    argspec_of_func = inspect.getargspec(func)
    return argspec_of_func.defaults[argspec_of_func.args.index(argname)
                                    - len(argspec_of_func.args)]

This yields W503 for pyflakes: line break before binary operator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions