-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Disabled "line too long"(C0301) not working on docstring comments #2957
Comments
@shepster i can reproduce it.
However i think a bug is present for multiple lines docstrings. When
the output is:
I'll work on this ASAP. |
The workaround is suffixing any long lines within the docstring with the ignore, but that is QUITE fuggly ... """
This is a very very very long line within a docstring that should NOT trigger a pylint C0301 error line-too-long #pylint: disable=line-too-long
some short
lines wouldn't trigger
of course
""" Even the idea of disabling it for the entire docstring is likely undesired anyway ... The only legit reason to disable this (IMO) is for URIs that are longer than the project code desired max line length. |
I have another case in mind: When the docstring contains an example of piece of data, for instance to explain how input data should be structured. Maybe this could also happen for doctests? |
With type hinting, methods using arguments with defaults and long package names can go beyond 90-ish characters easily. |
There's an option to change the max line length, please search our documentation :) |
The following code still generates an error even though "line too long"(C0301) is disabled.
Here is the pylint error
This was talked about previously in issue #1950. The issue was resolved for comments, but it still exists for docstrings.
Using pylint 2.3.1
The text was updated successfully, but these errors were encountered: