flake8-docstrings-1.1.0/0000775000175000017500000000000013100744434016442 5ustar icordascicordasc00000000000000flake8-docstrings-1.1.0/HISTORY.rst0000664000175000017500000000317413100744263020342 0ustar icordascicordasc00000000000000History/Changelog ================= 1.1.0 ----- - Upgrade dependency on pydocstyle to 2.0.0 1.0.3 ----- - Use flake8-polyfill to get standard-in to handle Flake8 3.x and 2.x 1.0.2 ----- - Use pycodestyle to get standard-in. 1.0.1 ----- - Make sure this works out of the box (is enabled by default) with Flake8 3.0 1.0.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. 0.2.7 ----- - Try to import pydocstyle (not pycodestyle) as pep257 0.2.6 ----- - Respect pep257's default ignore list - Handle AllError and other exceptions from pep257 0.2.5 ----- - 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. 0.2.4 ----- - 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. 0.2.3 ----- - Remove extraneous space in error message. - Fix up how the plugin displays with ``flake8 --version``. 0.2.2 ----- - Better support for input provided via stdin. 0.2.1 ----- - Prevent AllError or EnvironmentErrors from being raised. Thanks Alex Pyrgiotis. 0.2.0 ----- - Upgrade to pep257 0.3.0 0.1.4 ----- - Stop truncating error messages 0.1.3 ----- - Really fix the installation issue this time. 0.1.2 ----- - Actually fix the PyPI release. **Ugh** 0.1.1 ----- - Fix the PyPI release. 0.1.0 ----- - Initial Release! flake8-docstrings-1.1.0/flake8_docstrings.egg-info/0000775000175000017500000000000013100744434023545 5ustar icordascicordasc00000000000000flake8-docstrings-1.1.0/flake8_docstrings.egg-info/entry_points.txt0000664000175000017500000000007013100744434027040 0ustar icordascicordasc00000000000000[flake8.extension] D = flake8_docstrings:pep257Checker flake8-docstrings-1.1.0/flake8_docstrings.egg-info/dependency_links.txt0000664000175000017500000000000113100744434027613 0ustar icordascicordasc00000000000000 flake8-docstrings-1.1.0/flake8_docstrings.egg-info/SOURCES.txt0000664000175000017500000000052213100744434025430 0ustar icordascicordasc00000000000000HISTORY.rst LICENSE MANIFEST.in README.rst flake8_docstrings.py setup.cfg setup.py tox.ini flake8_docstrings.egg-info/PKG-INFO flake8_docstrings.egg-info/SOURCES.txt flake8_docstrings.egg-info/dependency_links.txt flake8_docstrings.egg-info/entry_points.txt flake8_docstrings.egg-info/requires.txt flake8_docstrings.egg-info/top_level.txtflake8-docstrings-1.1.0/flake8_docstrings.egg-info/requires.txt0000664000175000017500000000005113100744434026141 0ustar icordascicordasc00000000000000flake8 pydocstyle >= 2.0 flake8-polyfill flake8-docstrings-1.1.0/flake8_docstrings.egg-info/PKG-INFO0000664000175000017500000000717513100744434024654 0ustar icordascicordasc00000000000000Metadata-Version: 1.1 Name: flake8-docstrings Version: 1.1.0 Summary: Extension for flake8 which uses pydocstyle to check docstrings Home-page: https://gitlab.com/pycqa/flake8-docstrings Author: Ian Cordasco Author-email: graffatcolmingov@gmail.com License: MIT License Description: flake8-docstrings ================= A simple module that adds an extension for the fantastic pydocstyle_ tool to flake8_. Simply install this extension:: pip install flake8_docstrings and run flake8. Report any issues on our `bug tracker`_. .. _pydocstyle: https://github.com/pycqa/pydocstyle .. _flake8: https://gitlab.com/pycqa/flake8 .. _bug tracker: https://gitlab.com/pycqa/flake8-docstrings/issues History/Changelog ================= 1.1.0 ----- - Upgrade dependency on pydocstyle to 2.0.0 1.0.3 ----- - Use flake8-polyfill to get standard-in to handle Flake8 3.x and 2.x 1.0.2 ----- - Use pycodestyle to get standard-in. 1.0.1 ----- - Make sure this works out of the box (is enabled by default) with Flake8 3.0 1.0.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. 0.2.7 ----- - Try to import pydocstyle (not pycodestyle) as pep257 0.2.6 ----- - Respect pep257's default ignore list - Handle AllError and other exceptions from pep257 0.2.5 ----- - 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. 0.2.4 ----- - 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. 0.2.3 ----- - Remove extraneous space in error message. - Fix up how the plugin displays with ``flake8 --version``. 0.2.2 ----- - Better support for input provided via stdin. 0.2.1 ----- - Prevent AllError or EnvironmentErrors from being raised. Thanks Alex Pyrgiotis. 0.2.0 ----- - Upgrade to pep257 0.3.0 0.1.4 ----- - Stop truncating error messages 0.1.3 ----- - Really fix the installation issue this time. 0.1.2 ----- - Actually fix the PyPI release. **Ugh** 0.1.1 ----- - Fix the PyPI release. 0.1.0 ----- - Initial Release! Keywords: PEP 257,pydocstyle,pep257,docstrings,flake8 Platform: UNKNOWN Classifier: Intended Audience :: Developers Classifier: Environment :: Console Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 3 Classifier: Operating System :: OS Independent Classifier: License :: OSI Approved :: MIT License Provides: flake8_docstrings flake8-docstrings-1.1.0/flake8_docstrings.egg-info/top_level.txt0000664000175000017500000000002213100744434026271 0ustar icordascicordasc00000000000000flake8_docstrings flake8-docstrings-1.1.0/LICENSE0000664000175000017500000000205513041473476017462 0ustar icordascicordasc00000000000000Copyright (c) 2013 Simon Andre, Ian Cordasco Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. flake8-docstrings-1.1.0/flake8_docstrings.py0000664000175000017500000000503613100744366022435 0ustar icordascicordasc00000000000000# -*- coding: utf-8 -*- """Implementation of pydocstyle integration with Flake8. pydocstyle docstrings convention needs error code and class parser for be included as module into flake8 """ import sys from flake8_polyfill import stdin import pycodestyle try: import pydocstyle as pep257 module_name = 'pydocstyle' except ImportError: import pep257 module_name = 'pep257' __version__ = '1.1.0' __all__ = ('pep257Checker',) stdin.monkey_patch('pycodestyle') class EnvironError(pep257.Error): code = 'D998' context = None @property def short_desc(self): return sys.exc_info()[1] class AllError(pep257.Error): code = 'D999' short_desc = '__all__ was found to be a list or other mutable collection' context = None class pep257Checker(object): """Flake8 needs a class to check python file.""" name = 'flake8-docstrings' version = __version__ + ', {0}: {1}'.format( module_name, pep257.__version__ ) STDIN_NAMES = set(['stdin', '-', '(none)', None]) def __init__(self, tree, filename='(none)', builtins=None): """Placeholder.""" self.tree = tree self.filename = filename self.checker = pep257.ConventionChecker() self.load_source() def _check_source(self): try: # TODO: Naive fix for `pydocstyle 2.0.0` with default settings. # Should probably add a proper setting so `ignore_decorators` can # be set when caling through the CLI return list(self.checker.check_source( self.source, self.filename, ignore_decorators=None, )) except pep257.AllError as err: return [AllError(err)] except EnvironmentError as err: return [EnvironError(err)] def run(self): """Use directly check() api from pydocstyle.""" checked_codes = pep257.conventions.pep257 for error in self._check_source(): if isinstance(error, pep257.Error) and error.code in checked_codes: # NOTE(sigmavirus24): Fixes GitLab#3 message = '%s %s' % (error.code, error.short_desc) yield (error.line, 0, message, type(self)) def load_source(self): """Load the source for the specified file.""" if self.filename in self.STDIN_NAMES: self.filename = 'stdin' self.source = pycodestyle.stdin_get_value() else: with pep257.tokenize_open(self.filename) as fd: self.source = fd.read() flake8-docstrings-1.1.0/README.rst0000664000175000017500000000063613041473476020147 0ustar icordascicordasc00000000000000flake8-docstrings ================= A simple module that adds an extension for the fantastic pydocstyle_ tool to flake8_. Simply install this extension:: pip install flake8_docstrings and run flake8. Report any issues on our `bug tracker`_. .. _pydocstyle: https://github.com/pycqa/pydocstyle .. _flake8: https://gitlab.com/pycqa/flake8 .. _bug tracker: https://gitlab.com/pycqa/flake8-docstrings/issues flake8-docstrings-1.1.0/tox.ini0000664000175000017500000000107113041473476017765 0ustar icordascicordasc00000000000000[tox] minversion = 1.6 envlist = py26,py27,py32,py33,py34,py27-flake8,py34-flake8 [testenv:py27-flake8] basepython = python2.7 deps = flake8 commands = flake8 {posargs} flake8_docstrings.py [testenv:py34-flake8] basepython = python3.4 deps = flake8 commands = flake8 {posargs} flake8_docstrings.py [testenv:release] basepython = python2.7 deps = twine >= 1.5.0 wheel commands = python setup.py sdist bdist_wheel twine upload --skip-existing {posargs} dist/* [flake8] ignore = D203 max_line_length = 79 exclude = .git,.tox,dist,docs,*egg flake8-docstrings-1.1.0/setup.py0000664000175000017500000000310413100744235020151 0ustar icordascicordasc00000000000000# -*- coding: utf-8 -*- """``flake8-docstring`` lives on `GitLab `_. """ from setuptools import setup def get_version(fname="flake8_docstrings.py"): with open(fname) as f: for line in f: if line.startswith('__version__'): return eval(line.split('=')[-1]) def get_long_description(): descr = [] for fname in ('README.rst', 'HISTORY.rst'): with open(fname) as f: descr.append(f.read()) return '\n\n'.join(descr) setup( name='flake8-docstrings', version=get_version(), description="Extension for flake8 which uses pydocstyle to check docstrings", long_description=get_long_description(), license='MIT License', author='Simon ANDRÉ', author_email='sandre@anybox.fr', maintainer='Ian Cordasco', maintainer_email='graffatcolmingov@gmail.com', url='https://gitlab.com/pycqa/flake8-docstrings', classifiers=['Intended Audience :: Developers', 'Environment :: Console', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 3', 'Operating System :: OS Independent', 'License :: OSI Approved :: MIT License'], keywords='PEP 257, pydocstyle, pep257, docstrings, flake8', entry_points={ 'flake8.extension': [ 'D = flake8_docstrings:pep257Checker', ], }, install_requires=['flake8', 'pydocstyle >= 2.0', 'flake8-polyfill'], provides=['flake8_docstrings'], py_modules=['flake8_docstrings'], ) flake8-docstrings-1.1.0/PKG-INFO0000664000175000017500000000717513100744434017551 0ustar icordascicordasc00000000000000Metadata-Version: 1.1 Name: flake8-docstrings Version: 1.1.0 Summary: Extension for flake8 which uses pydocstyle to check docstrings Home-page: https://gitlab.com/pycqa/flake8-docstrings Author: Ian Cordasco Author-email: graffatcolmingov@gmail.com License: MIT License Description: flake8-docstrings ================= A simple module that adds an extension for the fantastic pydocstyle_ tool to flake8_. Simply install this extension:: pip install flake8_docstrings and run flake8. Report any issues on our `bug tracker`_. .. _pydocstyle: https://github.com/pycqa/pydocstyle .. _flake8: https://gitlab.com/pycqa/flake8 .. _bug tracker: https://gitlab.com/pycqa/flake8-docstrings/issues History/Changelog ================= 1.1.0 ----- - Upgrade dependency on pydocstyle to 2.0.0 1.0.3 ----- - Use flake8-polyfill to get standard-in to handle Flake8 3.x and 2.x 1.0.2 ----- - Use pycodestyle to get standard-in. 1.0.1 ----- - Make sure this works out of the box (is enabled by default) with Flake8 3.0 1.0.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. 0.2.7 ----- - Try to import pydocstyle (not pycodestyle) as pep257 0.2.6 ----- - Respect pep257's default ignore list - Handle AllError and other exceptions from pep257 0.2.5 ----- - 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. 0.2.4 ----- - 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. 0.2.3 ----- - Remove extraneous space in error message. - Fix up how the plugin displays with ``flake8 --version``. 0.2.2 ----- - Better support for input provided via stdin. 0.2.1 ----- - Prevent AllError or EnvironmentErrors from being raised. Thanks Alex Pyrgiotis. 0.2.0 ----- - Upgrade to pep257 0.3.0 0.1.4 ----- - Stop truncating error messages 0.1.3 ----- - Really fix the installation issue this time. 0.1.2 ----- - Actually fix the PyPI release. **Ugh** 0.1.1 ----- - Fix the PyPI release. 0.1.0 ----- - Initial Release! Keywords: PEP 257,pydocstyle,pep257,docstrings,flake8 Platform: UNKNOWN Classifier: Intended Audience :: Developers Classifier: Environment :: Console Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 3 Classifier: Operating System :: OS Independent Classifier: License :: OSI Approved :: MIT License Provides: flake8_docstrings flake8-docstrings-1.1.0/MANIFEST.in0000664000175000017500000000016613041473476020214 0ustar icordascicordasc00000000000000include HISTORY.rst include LICENSE include README.rst include flake8_docstrings.py include setup.cfg include tox.ini flake8-docstrings-1.1.0/setup.cfg0000664000175000017500000000010313100744434020255 0ustar icordascicordasc00000000000000[bdist_wheel] universal = 1 [egg_info] tag_build = tag_date = 0