PyCQA / pydocstyle

docstring style checker
http://pydocstyle.org
MIT License
1.11k stars 189 forks source link

Add D419: Add and switch to "Docstring is empty" error code #559

Closed thejcannon closed 2 years ago

thejcannon commented 2 years ago

Reporting D10X errors for empty docstrings is doubly misleading:

  1. The docstring isn't missing. It's empty.
  2. The D10X errors use public, but could be reported on private definitions.

Please make sure to check for the following items:

thejcannon commented 2 years ago

The error doesn't seem related to my changes:

Traceback (most recent call last):
  File "/home/runner/work/pydocstyle/pydocstyle/.tox/py/bin/black", line 5, in <module>
    from black import patched_main
  File "/home/runner/work/pydocstyle/pydocstyle/.tox/py/lib/python3.10/site-packages/black/__init__.py", line 52, in <module>
    from typed_ast import ast3, ast27
  File "/home/runner/work/pydocstyle/pydocstyle/.tox/py/lib/python3.10/site-packages/typed_ast/ast3.py", line 40, in <module>
    from typed_ast import _ast3
ImportError: /home/runner/work/pydocstyle/pydocstyle/.tox/py/lib/python3.10/site-packages/typed_ast/_ast3.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyUnicode_DecodeUnicodeEscape
ERROR: InvocationError for command /home/runner/work/pydocstyle/pydocstyle/.tox/py/bin/black --check src/pydocstyle (exited with code 1)
sambhav commented 2 years ago

Yup - trying to fix it at https://github.com/PyCQA/pydocstyle/pull/565