From 7bf9052afff339c9d997ad1db105ccb12cd3c8b7 Mon Sep 17 00:00:00 2001 From: Ryan May Date: Fri, 16 Aug 2019 20:46:10 -0600 Subject: [PATCH] ENH: Add flake8-rst-docstrings to our flake8 plugin collection Enables checking of formatting of docstrings. --- environment.yml | 1 + setup.cfg | 8 ++++++-- setup.py | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/environment.yml b/environment.yml index 3328b2267d1..099ead9b22a 100644 --- a/environment.yml +++ b/environment.yml @@ -30,6 +30,7 @@ dependencies: - flake8-pep3101 - flake8-print - flake8-quotes + - flake8-rst-docstrings - pep8-naming - pyproj - cartopy diff --git a/setup.cfg b/setup.cfg index d3225e77b76..4df5d97ff49 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,7 @@ ignore = W503 max-line-length = 95 [flake8] -ignore = F405 D999 W503 +ignore = F405 D999 W503 RST306 RST902 max-line-length = 95 exclude = metpy/_version.py application-import-names = metpy @@ -12,18 +12,22 @@ copyright-check = True copyright-author = MetPy Developers inline-quotes = single multiline-quotes = double +rst-roles = class, data, func, meth, mod +rst-directives = plot [tool:pytest] # https://github.com/matplotlib/pytest-mpl/issues/69 markers = mpl_image_compare norecursedirs = build docs .idea -flake8-ignore = *.py F405 W503 +flake8-ignore = *.py F405 W503 RST902 examples/*.py D T003 T001 tutorials/*.py D T003 T001 versioneer.py ALL deprecation.py C801 metpy/calc/__init__.py D999 + metpy/calc/*.py RST306 metpy/interpolate/__init__.py D999 + metpy/interpolate/*.py RST306 metpy/io/__init__.py D999 metpy/plots/__init__.py D999 flake8-max-line-length = 95 diff --git a/setup.py b/setup.py index e0aa35e2242..cee6fe59e81 100644 --- a/setup.py +++ b/setup.py @@ -63,7 +63,7 @@ 'cartopy>=0.16.0', 'flake8>3.2.0', 'flake8-builtins!=1.4.0', 'flake8-comprehensions', 'flake8-copyright', 'flake8-docstrings', 'flake8-import-order', 'flake8-mutable', - 'flake8-pep3101', 'flake8-print', 'flake8-quotes', + 'flake8-pep3101', 'flake8-print', 'flake8-quotes', 'flake8-rst-docstrings', 'pep8-naming', 'netCDF4', 'pyproj>=1.9.4,!=2.0.0'] },