-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
This code produces two violations:
def include(*args: str, **kwargs) -> None:
"""
Used for including Django project settings from multiple files.
Args:
*args: File paths (``glob`` - compatible wildcards can be used).
**kwargs: Settings context: ``scope=globals()`` or ``None``.
"""Output:
» flake8 .
./split_settings/tools.py
65:1 RST299 Inline emphasis start-string without end-string.
Args:
^
65:1 RST210 Inline strong start-string without end-string.
Args:
^
That's because flake8-rst-docstrings is unhappy about *args and **kwargs in the docs. But, napoleon and google explicitly says to write them like so, proof: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html#example-google
def module_level_function(param1, param2=None, *args, **kwargs):
"""This is an example of a module level function.
...
Args:
param1 (int): The first parameter.
param2 (:obj:`str`, optional): The second parameter. Defaults to None.
Second line of description should be indented.
*args: Variable length argument list.
**kwargs: Arbitrary keyword arguments.
...
"""So, I guess that these two rules should respect this case.
kevinoid, ewu63, Pabloo22, fgoudreault and Jakob-Unfried
Metadata
Metadata
Assignees
Labels
No labels