-
Notifications
You must be signed in to change notification settings - Fork 888
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
wrap_comments wraps too early #5890
Comments
Thanks for the report! Confirming I can reproduce this with |
Linking the tracking issue for |
TLDR;The logic for setting the Lines 614 to 617 in f89cd3c
Deep DiveHere's what my investigation turned up. Let's start at Lines 216 to 243 in f89cd3c
On L234-L238 above we call Following the control flow from The first thing Lines 614 to 617 in f89cd3c
In the default case, here's what everything is:
All of that means that Thoughts on how to fix thisDeriving the
Comment rewriting happens line by line a loop so it should be fairly easy to modify the max_width before calling Lines 942 to 946 in f89cd3c
|
I don't think a fix for this would need to be version gated given that |
I have a very simple example where using
wrap_comments
lead to the doc line being wrapped even if it is exactly 80 characters.I played around with
comment_width
and it wrapped this line even withcomment_width = 83
but stopped wrapping with84
so somehow the wrapping is off by 4 here.Also interesting if I do the same with 100 characters and
comment_width = 100
it also wraps and if I increase thecomment_width
it still wraps always, regardless how high I setcomment_width
.The text was updated successfully, but these errors were encountered: