You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rule to detect long docstrings (or extra config for W505) #25995
For flowing long blocks of text with fewer structural restrictions (docstrings or comments), the line length should be limited to 72 characters.
Rule doc-line-too-long (W505) can enforce this when lint.pycodestyle.max-doc-length is set (the rule is ignored when unset).
However, I would like to only detect overlong docstrings. I'm not bothered about long comments.
Would it be possible to add a new rule for just docstrings? I can imagine someone might want it for just comments and not docstrings, so rather than a new rule, perhaps extra config for the existing W505 would be a better fit.
Activity
ntBre commentedon Jun 15, 2026
It looks like I found a hacky workaround for this in #15733, but it might be worth supporting a more direct solution.