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

Clash with black formatter (new line after module docstring) #366

Closed
elagil opened this issue Jan 26, 2024 · 3 comments
Closed

Clash with black formatter (new line after module docstring) #366

elagil opened this issue Jan 26, 2024 · 3 comments

Comments

@elagil
Copy link

elagil commented Jan 26, 2024

reorder-python-imports worked together fine with black up to version 23. From version 24, black seems to have introduced a forced new line after the module docstring.

reorder-python-imports apparently forces no new line after the module docstring.

How can I use the two together as pre-commit hooks without conflict? Neither seems to be configurable in this regard.

Thanks in advance

@asottile
Copy link
Owner

open an issue with black then

@maxwell-k
Copy link

First: I'm a huge fan of reorder-python imports, thank you! Second I followed your suggestion and opened psf/black#4175. Please allow me to ask:

Do you think its possible that any future version of reorder-python-imports might allow or preserve a blank line between a module level doc-string at the top of a file and the first import?

The behaviour I'm asking about is:

"""Module docstring."""

import typing

In place of:

"""Module docstring."""
import typing

@asottile
Copy link
Owner

anything is possible. will it happen here: no

Repository owner locked as resolved and limited conversation to collaborators Jan 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants