Hello community,

here is the log from the commit of package python-flake8-docstrings for 
openSUSE:Factory checked in at 2019-10-08 19:59:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-flake8-docstrings (Old)
 and      /work/SRC/openSUSE:Factory/.python-flake8-docstrings.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-flake8-docstrings"

Tue Oct  8 19:59:18 2019 rev:6 rq:736030 version:1.5.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-flake8-docstrings/python-flake8-docstrings.changes
        2019-09-13 15:04:15.141270333 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-flake8-docstrings.new.2352/python-flake8-docstrings.changes
      2019-10-08 19:59:19.863945791 +0200
@@ -1,0 +2,6 @@
+Tue Oct  8 08:53:09 UTC 2019 - Tomáš Chvátal <tchva...@suse.com>
+
+- Update to 1.5.0:
+  * Add --ignore-decorators option
+
+-------------------------------------------------------------------

Old:
----
  flake8-docstrings-1.4.0.tar.gz

New:
----
  flake8-docstrings-1.5.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-flake8-docstrings.spec ++++++
--- /var/tmp/diff_new_pack.CYNVVk/_old  2019-10-08 19:59:20.431944091 +0200
+++ /var/tmp/diff_new_pack.CYNVVk/_new  2019-10-08 19:59:20.435944079 +0200
@@ -18,11 +18,10 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-flake8-docstrings
-Version:        1.4.0
+Version:        1.5.0
 Release:        0
 Summary:        Extension for flake8 which uses pydocstyle to check docstrings
 License:        MIT
-Group:          Development/Languages/Python
 URL:            https://gitlab.com/pycqa/flake8-docstrings
 Source:         
https://files.pythonhosted.org/packages/source/f/flake8-docstrings/flake8-docstrings-%{version}.tar.gz
 BuildRequires:  %{python_module setuptools}

++++++ flake8-docstrings-1.4.0.tar.gz -> flake8-docstrings-1.5.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flake8-docstrings-1.4.0/HISTORY.rst 
new/flake8-docstrings-1.5.0/HISTORY.rst
--- old/flake8-docstrings-1.4.0/HISTORY.rst     2019-08-26 18:33:14.000000000 
+0200
+++ new/flake8-docstrings-1.5.0/HISTORY.rst     2019-09-30 18:07:58.000000000 
+0200
@@ -1,6 +1,12 @@
 History/Changelog
 =================
 
+1.5.0
+-----
+
+- Add ``--ignore-decorators`` option which allows functions with a specific
+  decorator to ignore error codes.
+
 1.4.0
 -----
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flake8-docstrings-1.4.0/PKG-INFO 
new/flake8-docstrings-1.5.0/PKG-INFO
--- old/flake8-docstrings-1.4.0/PKG-INFO        2019-08-26 18:35:25.000000000 
+0200
+++ new/flake8-docstrings-1.5.0/PKG-INFO        2019-09-30 18:09:02.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: flake8-docstrings
-Version: 1.4.0
+Version: 1.5.0
 Summary: Extension for flake8 which uses pydocstyle to check docstrings
 Home-page: https://gitlab.com/pycqa/flake8-docstrings
 Author: Simon ANDRÉ
@@ -40,6 +40,12 @@
         History/Changelog
         =================
         
+        1.5.0
+        -----
+        
+        - Add ``--ignore-decorators`` option which allows functions with a 
specific
+          decorator to ignore error codes.
+        
         1.4.0
         -----
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/flake8-docstrings-1.4.0/flake8_docstrings.egg-info/PKG-INFO 
new/flake8-docstrings-1.5.0/flake8_docstrings.egg-info/PKG-INFO
--- old/flake8-docstrings-1.4.0/flake8_docstrings.egg-info/PKG-INFO     
2019-08-26 18:35:25.000000000 +0200
+++ new/flake8-docstrings-1.5.0/flake8_docstrings.egg-info/PKG-INFO     
2019-09-30 18:09:02.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: flake8-docstrings
-Version: 1.4.0
+Version: 1.5.0
 Summary: Extension for flake8 which uses pydocstyle to check docstrings
 Home-page: https://gitlab.com/pycqa/flake8-docstrings
 Author: Simon ANDRÉ
@@ -40,6 +40,12 @@
         History/Changelog
         =================
         
+        1.5.0
+        -----
+        
+        - Add ``--ignore-decorators`` option which allows functions with a 
specific
+          decorator to ignore error codes.
+        
         1.4.0
         -----
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/flake8-docstrings-1.4.0/flake8_docstrings.py 
new/flake8-docstrings-1.5.0/flake8_docstrings.py
--- old/flake8-docstrings-1.4.0/flake8_docstrings.py    2019-08-26 
18:32:50.000000000 +0200
+++ new/flake8-docstrings-1.5.0/flake8_docstrings.py    2019-09-30 
18:08:03.000000000 +0200
@@ -5,6 +5,7 @@
 included as module into flake8
 """
 
+import re
 import sys
 try:
     import pydocstyle as pep257
@@ -18,7 +19,7 @@
 else:
     tokenize_open = open
 
-__version__ = '1.4.0'
+__version__ = '1.5.0'
 __all__ = ('pep257Checker',)
 
 
@@ -83,21 +84,35 @@
                 "those)."
             )
         )
+        parser.add_option(
+            "--ignore-decorators",
+            action="store",
+            parse_from_config=True,
+            default=None,
+            help=(
+                "pydocstyle ignore-decorators regular expression, "
+                "default None. "
+                "Ignore any functions or methods that are decorated by "
+                "a function with a name fitting this regular expression. "
+                "The default is not ignore any decorated functions. "
+            ),
+        )
 
     @classmethod
     def parse_options(cls, options):
         """Parse the configuration options given to flake8."""
         cls.convention = options.docstring_convention
+        cls.ignore_decorators = (
+            re.compile(options.ignore_decorators) if options.ignore_decorators
+            else None
+        )
 
     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 calling through the CLI
             for err in self.checker.check_source(
                 self.source,
                 self.filename,
-                ignore_decorators=None,
+                ignore_decorators=self.ignore_decorators,
             ):
                 yield err
         except pep257.AllError as err:


Reply via email to