Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Allow for partially formatting a file e.g. from line 20 to 25 #511

@devsnd

Description

@devsnd

Hello,

I just stumbled upon black and I immediately integrated it into my workflow in PyCharm. it's really great tool.

Unfortunately I cannot reformat all of our code at once and make everything consistent, because I would be clobbering our git history and every subsequent git blame would blame me!

So I would like to have a command line switch to only reformat a part of a file, say a range of lines, e.g.

black --from-line 20 --to-line 25

so I can only reformat the code that I'm touching anyway and transform our codebase over time.

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