Extension for flake8 which uses pydocstyle to check docstrings
Simply install this extension:
pip install flake8-docstrings
and run flake8.
You can set the pydocstyle convention at the command line using:
$ flake8 --docstring-convention numpy ...
Or, adding docstring-convention=numpy to your flake8 configuration file. The available set of conventions depends on the version of pydocstyle installed. The default is pep257, pydocstyle v2.0.0 added numpy (for the numpydoc standard), while pydocstyle v4.0.0 added google.
Report any issues on our bug tracker.
- Add --ignore-decorators option which allows functions with a specific decorator to ignore error codes.
- Add --docstring-convention option which allows selection of conventions besides the default pep257. Available options are based on those available from pydocstyle and are currently pep257, google, and numpy. flake8-docstrings also adds a special all docstring convention which will enable all rules from pydocstyle. Note that pydocstyle defines some conflicting rules so you’ll want to use ignore / extend-ignore when selecting docstring-convention = all
- Bump minimum flake8 version to 3
- Fix proper handling of stdin via --stdin-display-name
- Fix incompatibility with pydocstyle 4.x
- Bump minimum pydocstyle version to 2.1.0
- Fix EnvironError and AllError invocations
- Avoid Flake8 warning for requesting builtins
- Upgrade dependency on pydocstyle to 2.0.0
- Use flake8-polyfill to get standard-in to handle Flake8 3.x and 2.x
- Use pycodestyle to get standard-in.
- Make sure this works out of the box (is enabled by default) with Flake8 3.0
- Switch dependency name to pydocstyle. pep257 was renamed to pydocstyle, this update switches the requirement to that new package name. Since we’re swapping out dependencies, we’ve issued a major version bump.
- Try to import pydocstyle (not pycodestyle) as pep257
- Respect pep257’s default ignore list
- Handle AllError and other exceptions from pep257
- Use pep257’s tokenize_open function to pass input to the tool.
- Use pep257’s conventions so any error codes that are ignored by default using pep257 are also ignored by default with this plugin.
- Fix bug introduced in 0.2.2 where the file source was always None causing D100 and D104 errors for all files and no other errors to be found.
- Remove extraneous space in error message.
- Fix up how the plugin displays with flake8 --version.
- Better support for input provided via stdin.
- Prevent AllError or EnvironmentErrors from being raised. Thanks Alex Pyrgiotis.
- Upgrade to pep257 0.3.0
- Stop truncating error messages
- Really fix the installation issue this time.
- Actually fix the PyPI release. Ugh
- Fix the PyPI release.
- Initial Release!
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size flake8_docstrings-1.5.0-py2.py3-none-any.whl (5.5 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View hashes|
|Filename, size flake8-docstrings-1.5.0.tar.gz (5.7 kB)||File type Source||Python version None||Upload date||Hashes View hashes|
Hashes for flake8_docstrings-1.5.0-py2.py3-none-any.whl