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

Feature request: check code snippets #1076

Closed
cgthayer opened this issue Oct 18, 2019 · 3 comments
Closed

Feature request: check code snippets #1076

cgthayer opened this issue Oct 18, 2019 · 3 comments

Comments

@cgthayer
Copy link

Feature request: I'd like to be able to run black on a few lines or a function/method within a larger file. I currently use emacs and elpy, which let's me highlight a region and attempt to format it with black, but unless it's at the top-level it doesn't work. Black would need to understand that a section of code may be an indented block.

@JelleZijlstra
Copy link
Collaborator

An integration could do this by de-indenting the code, formatting it with Black, then re-indenting it by the amount it originally de-indented it.

@jrosdahl
Copy link

@ichard26
Copy link
Collaborator

While #1352 is a duplicate of this issue (which itself is a duplicate of #987), that issue has more context, information, and a solution suggestion(!), so closing this in favour of that one.

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

4 participants