You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 3, 2023. It is now read-only.
defvalidate_lambda(task_id: str, lambda_root: str, entry_point_path: str) ->None:
"""Ensure the directory and source code paths for a Python Lambda are correct. Arguments: task_id (str): The ID of the task being examined. Only used in error messages. lambda_root (str): The path to the root directory where the Lambda's source code, requirements files, Dockerfile, etc. are defined. entry_point_path (str): A path relative to ``lambda_root`` that points to the Python file containing the entry point of this lambda. """
test.py:1 at module level:
D100: Missing docstring in public module
test.py:2 in public function `validate_lambda`:
D417: Missing argument descriptions in the docstring (argument(s) entry_point_path, lambda_root, task_id are missing descriptions in 'validate_lambda' docstring)
Note that it's convinced there are no argument descriptions. Now let's tweak the docstring by adding a "Returns" section:
defvalidate_lambda(task_id: str, lambda_root: str, entry_point_path: str) ->None:
"""Ensure the directory and source code paths for a Python Lambda are correct. Arguments: task_id (str): The ID of the task being examined. Only used in error messages. lambda_root (str): The path to the root directory where the Lambda's source code, requirements files, Dockerfile, etc. are defined. entry_point_path (str): A path relative to ``lambda_root`` that points to the Python file containing the entry point of this lambda. Returns: Nothing. """
The error is now gone, even though we didn't change anything:
test.py:1 at module level:
D100: Missing docstring in public module
Oddly, putting Returns: Nothing on a single line doesn't fix the issue and gives the same error message. Adding a different directive like Raises: also works.
Environment:
pydocstyle 5.1.1 and 6.0.0
CPython 3.8.6
OS: MacOS 11.2.3
The text was updated successfully, but these errors were encountered:
I can confirm this, it's happening to me with Keyword Args for __init__ methods (not in other public methods!) whereas if I leave the argument under Args it just works.
The workaround described above works fine.
Given a file containing the following:
run:
output:
Note that it's convinced there are no argument descriptions. Now let's tweak the docstring by adding a "Returns" section:
The error is now gone, even though we didn't change anything:
Oddly, putting
Returns: Nothing
on a single line doesn't fix the issue and gives the same error message. Adding a different directive likeRaises:
also works.Environment:
pydocstyle
5.1.1 and 6.0.0The text was updated successfully, but these errors were encountered: