Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yapf adds spaces before backslash with every run #1217

Open
marcodicro-dp opened this issue Mar 21, 2024 · 0 comments
Open

yapf adds spaces before backslash with every run #1217

marcodicro-dp opened this issue Mar 21, 2024 · 0 comments

Comments

@marcodicro-dp
Copy link

Let's say I have this code fragment (note the backslash):

plan_bundles = {
    plan_bundle.bundle_name: {
        'tier_change_options': \
        bundle_util.get_tier_change_options(plan_bundle, details_by_bundle)
    } for plan_bundle in plan.plan_bundles
}

If I run yapf over that file it will add two spaces before the backlash. Result:
image

If I run it again:
image

So yapf is never happy with my file code style. Is this a bug?

Style config:

[style]
based_on_style = google
indent_width = 2
column_limit = 100
continuation_indent_width = 4
each_dict_entry_on_separate_line = true
allow_split_before_dict_value = false
split_before_logical_operator = true
spaces_before_comment = 1
blank_line_before_nested_class_or_def = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant