[Python-modules-commits] [flake8-docstrings] 01/03: New upstream version 1.1.0

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Sun Sep 3 04:41:21 UTC 2017


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository flake8-docstrings.

commit 167bc8a32d2fdf2442bb630347abbb0a4661b285
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Fri Jun 9 15:51:55 2017 +0100

    New upstream version 1.1.0
---
 HISTORY.rst                                     | 103 +++++++++++++++++
 LICENSE                                         |  19 ++++
 MANIFEST.in                                     |   6 +
 PKG-INFO                                        | 140 ++++++++++++++++++++++++
 README.rst                                      |  17 +++
 flake8_docstrings.egg-info/PKG-INFO             | 140 ++++++++++++++++++++++++
 flake8_docstrings.egg-info/SOURCES.txt          |  14 +++
 flake8_docstrings.egg-info/dependency_links.txt |   1 +
 flake8_docstrings.egg-info/entry_points.txt     |   3 +
 flake8_docstrings.egg-info/requires.txt         |   3 +
 flake8_docstrings.egg-info/top_level.txt        |   1 +
 flake8_docstrings.py                            |  87 +++++++++++++++
 setup.cfg                                       |   7 ++
 setup.py                                        |  50 +++++++++
 tox.ini                                         |  30 +++++
 15 files changed, 621 insertions(+)

diff --git a/HISTORY.rst b/HISTORY.rst
new file mode 100644
index 0000000..4cc65a5
--- /dev/null
+++ b/HISTORY.rst
@@ -0,0 +1,103 @@
+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!
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..aa83619
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,19 @@
+Copyright (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.
diff --git a/MANIFEST.in b/MANIFEST.in
new file mode 100644
index 0000000..6b68635
--- /dev/null
+++ b/MANIFEST.in
@@ -0,0 +1,6 @@
+include HISTORY.rst
+include LICENSE
+include README.rst
+include flake8_docstrings.py
+include setup.cfg
+include tox.ini
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..2ba874e
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,140 @@
+Metadata-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 at 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
diff --git a/README.rst b/README.rst
new file mode 100644
index 0000000..219996f
--- /dev/null
+++ b/README.rst
@@ -0,0 +1,17 @@
+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
diff --git a/flake8_docstrings.egg-info/PKG-INFO b/flake8_docstrings.egg-info/PKG-INFO
new file mode 100644
index 0000000..2ba874e
--- /dev/null
+++ b/flake8_docstrings.egg-info/PKG-INFO
@@ -0,0 +1,140 @@
+Metadata-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 at 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
diff --git a/flake8_docstrings.egg-info/SOURCES.txt b/flake8_docstrings.egg-info/SOURCES.txt
new file mode 100644
index 0000000..12b436f
--- /dev/null
+++ b/flake8_docstrings.egg-info/SOURCES.txt
@@ -0,0 +1,14 @@
+HISTORY.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.txt
\ No newline at end of file
diff --git a/flake8_docstrings.egg-info/dependency_links.txt b/flake8_docstrings.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/flake8_docstrings.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/flake8_docstrings.egg-info/entry_points.txt b/flake8_docstrings.egg-info/entry_points.txt
new file mode 100644
index 0000000..4620ce2
--- /dev/null
+++ b/flake8_docstrings.egg-info/entry_points.txt
@@ -0,0 +1,3 @@
+[flake8.extension]
+D = flake8_docstrings:pep257Checker
+
diff --git a/flake8_docstrings.egg-info/requires.txt b/flake8_docstrings.egg-info/requires.txt
new file mode 100644
index 0000000..d184cb2
--- /dev/null
+++ b/flake8_docstrings.egg-info/requires.txt
@@ -0,0 +1,3 @@
+flake8
+pydocstyle >= 2.0
+flake8-polyfill
diff --git a/flake8_docstrings.egg-info/top_level.txt b/flake8_docstrings.egg-info/top_level.txt
new file mode 100644
index 0000000..3f2bd06
--- /dev/null
+++ b/flake8_docstrings.egg-info/top_level.txt
@@ -0,0 +1 @@
+flake8_docstrings
diff --git a/flake8_docstrings.py b/flake8_docstrings.py
new file mode 100644
index 0000000..688c1e4
--- /dev/null
+++ b/flake8_docstrings.py
@@ -0,0 +1,87 @@
+# -*- 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()
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..adf5ed7
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,7 @@
+[bdist_wheel]
+universal = 1
+
+[egg_info]
+tag_build = 
+tag_date = 0
+
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..43465c9
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+"""``flake8-docstring`` lives on
+`GitLab <https://gitlab.com/pycqa/flake8-docstrings>`_.
+"""
+
+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 at anybox.fr',
+    maintainer='Ian Cordasco',
+    maintainer_email='graffatcolmingov at 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'],
+)
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..c36b593
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,30 @@
+[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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/flake8-docstrings.git



More information about the Python-modules-commits mailing list