Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Wrapping imports is incompatible with isort #127
Howdy! Sorry you're having trouble. To expedite your experience,
Operating system: Mac OS X 10.13.4
would be formatted as
This is probably personal, but this looks a little bit weird. I would suggest this as a better formatting:
To add a bit of context, I'm trying to make black work with isort. But it seems that black's formatting style is not among isort's list of multi-line output modes (https://github.com/timothycrosley/isort#multi-line-output-modes).
This creates a problem. When I save my python file, it's formatted with black, but isort (flake8-isort) would complain about incorrectly formatted imports, which basically put my code in a bad state.
This form of wrapping lines applies to all code in Black. Making an exception for imports alone is inconsistent, especially if motivated purely by another, optional tool for Black users.