-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Issue
Consider the function
def foo(self, blah, bleh):
"""A function.
Args:
blah: A string.
Note: Beware of tricky issue XYZ, documented at
https://github.com/jdkandersson/flake8-docstrings-complete/issues/999999
TODO: Fix this issue.
bleh: Another string.
"""
...
Then I get the spurious flake8 errors
robust_llm/config/configs.py:127:9: DCO024 "Note" argument should not be described in the docstring, more information: https://github.com/jdkandersson/flake8-docstrings-complete#fix-dco024
robust_llm/config/configs.py:127:9: DCO024 "TODO" argument should not be described in the docstring, more information: https://github.com/jdkandersson/flake8-docstrings-complete#fix-dco024
robust_llm/config/configs.py:127:9: DCO024 "https" argument should not be described in the docstring, more information: https://github.com/jdkandersson/flake8-docstrings-complete#fix-dco024
The same thing happens on DCO064 for class attributes.
Suggested fix
To handle https://
I think we could just not trigger the warning if the character after :
is not whitespace.
Handling Note
and TODO
is trickier. If we want to allow these kinds of comments then maybe we look at their indentation level to distinguish them from blah:
and bleh:
.
Version
- Python 3.10
- flake8 7.0.0
- flake8-docstrings-complete 1.3.0
Metadata
Metadata
Assignees
Labels
No labels