Always respect original comment/code-order #3800
Labels
F: comments
The syntactic kind. Not in the language grammar, always on our minds. Best bugs.
T: enhancement
New feature or request
Is your feature request related to a problem? Please describe.
It would be nice to be able to force black to never change the order of code and comments.
for example:
gets formatted to
which even results in breaking the 88 character limit.
Describe the solution you'd like
It feels weird that black would even ever mess with the original ordering of code and comments. Imo, the order should always be respected, since comments go together with code. If the AST contains
<codeA><commentA><codeB>
, then the output should be<formatted-codeA><formatted-commentA><formatted-codeB>
.The text was updated successfully, but these errors were encountered: