Closed wkCircle closed 1 year ago
The following screenshot demos how flake8 captures lint errors in docstring when doctests=true
(otherwise the error is not captured).
To fix the issue, the correct format should add triple dots to indicate the continual of the unfinished code statement:
"""
Examples:
>>> fd = fl(
... *[1, 2, 3]
... )
>>> fd.sum()
6
"""
Note, this example docstring is only for demo purpose and will be only pushed after the error is fixed.
Note additionally that flake8 is NOT responsible to check if fd.sum()
really sums to 6. (This might be handled either by pytest with pytest --doctest-modules fpu/
, or via sphinx)
As specified in title, we will restore E501 error which alert user when max number of chars exceeds
max-line-length
. We also turn on flake8 check for example code in docstring (viadoctests=true
), and output total count of each error category (viastatistics=true
).