8000 Can split_before_first_argument only be applied to function calls? · Issue #1275 · google/yapf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Can split_before_first_argument only be applied to function calls? #1275
Open
@derkuci

Description

@derkuci

I wonder if the following format result can be achieved:

test_values = (
    function_call(
        'some', 'really', 'long', 'list', 'of', 'values', 'to', 'test', 'with',
        'in', 'the', 'config', 'parser'),
    ('some', 'really', 'long', 'list', 'of', 'values', 'to', 'test', 'with',
     'in', 'the', 'config', 'parser'),
)

I've played with the split_before_first_argument knob, but it either applies to both the function call and the tuple,

test_values = (
    function_call(
        'some', 'really', 'long', 'list', 'of', 'values', 'to', 'test', 'with',
        'in', 'the', 'config', 'parser'),
    (
        'some', 'really', 'long', 'list', 'of', 'values', 'to', 'test', 'with',
        'in', 'the', 'config', 'parser'),
)

or neither

test_values = (
    function_call('some', 'really', 'long', 'list', 'of', 'values', 'to',
                  'test', 'with', 'in', 'the', 'config', 'parser'),
    ('some', 'really', 'long', 'list', 'of', 'values', 'to', 'test', 'with',
     'in', 'the', 'config', 'parser'),
)

Here is the yapf config file I've used

[style]
based_on_style = google
column_limit=80
# split_before_first_argument=True

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0