-
Notifications
You must be signed in to change notification settings - Fork 56
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
Format docstrings as complete chunks #300
Conversation
@Carreau, any other ideas for fixing this than doing our own AST parsing to find where possible multi-line docstrings are? Update: |
4176994
to
a173a02
Compare
57ebd0e
to
1189751
Compare
2f583c2
to
cab967d
Compare
@Carreau, this seems to work now, and I found two edge case bugs in my implementation when completing the unit test coverage! I wonder if a second pair of eyes reviewing this would find even more. I could include this in version 1.4.2 if you have time to review, or alternatively postpone until the 1.5.0 release. |
cab967d
to
65c48ab
Compare
65c48ab
to
0257656
Compare
d1a1a77
to
614f134
Compare
de72ab0
to
4a59878
Compare
35e6413
to
32613c4
Compare
Also handle multi-line string at the end of a file correctly.
32613c4
to
0f9a8a2
Compare
Treating large docstrings as separate chunks can cause to weird behavior, e.g. "reformat loops" in which some lines are repeatedly indented and unindented by Darker.
Fixes #240.