Skip to content

Change .style.yapf precedence? #56

@zachsiegel-capsida

Description

@zachsiegel-capsida

Hello,

Thank you for this plugin. I have used it for years and I appreciate it greatly.

The PyYapf.sublime-settings file's comments describe the "config" parameter as:

// custom yapf style options
// if commented out then yapf will search for the formatting style in the following manner:
...
"config" : {...},

i.e., if "config" exists, then yapf will NOT search for formatting styles...

I think PyYAPF should by default (or with a setting) first search for a .style.yapf and only defer to the "config" : {...} settings in PyYapf.sublime-settings if a .style.yapf does not exist.

I use PyYapf for all of my personal projects, but at work I committed a .style.yapf in our codebase to keep the team in sync. In order for Sublime Text to respect this file, I had to comment out my PyYapf.sublime-settings "config" variable, which makes PyYapf not work on other projects (unless they also have a .style.yapf file nearby)! That seems wrong to me.

If there is a way to configure PyYapf to respect .style.yapf before PyYapf.sublime-settings, please let me know, or otherwise please consider this a feature request (though I think it's a borderline bug).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions