Rule Definition
In Python any first statement being a standalone string expression (within a module, class, function or method) is interpreted as a documentation string (or docstring). This normalized format for documentation is leveraged by many tools in the Python ecosystem. Long docstring lines can have a negative impact on API readability and thus slow down its interpretation and eventual utilization.
Remediation
Wrap docstrings following PEP-8 conventions.
Violation Code Sample
def my_function():
"""This is a too ........... long ................. docstring ......................."""
Fixed Code Sample
def my_function():
"""
This is a multiline
docstring
"""
Related Technologies
Technical Criterion
Documentation - Style Conformity
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.