Hello community,

here is the log from the commit of package python-pytest-pycodestyle for 
openSUSE:Factory checked in at 2020-06-29 21:18:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-pycodestyle (Old)
 and      /work/SRC/openSUSE:Factory/.python-pytest-pycodestyle.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytest-pycodestyle"

Mon Jun 29 21:18:27 2020 rev:2 rq:817714 version:2.1.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-pytest-pycodestyle/python-pytest-pycodestyle.changes
      2020-06-17 14:47:37.496426783 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-pytest-pycodestyle.new.3060/python-pytest-pycodestyle.changes
    2020-06-29 21:18:49.573869563 +0200
@@ -1,0 +2,6 @@
+Mon Jun 29 11:59:01 UTC 2020 - Marketa Calabkova <mcalabk...@suse.com>
+
+- Update to 2.1.3
+  * code refactoring
+
+-------------------------------------------------------------------

Old:
----
  pytest-pycodestyle-2.1.2.tar.gz

New:
----
  pytest-pycodestyle-2.1.3.tar.gz

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

Other differences:
------------------
++++++ python-pytest-pycodestyle.spec ++++++
--- /var/tmp/diff_new_pack.tf5Iix/_old  2020-06-29 21:18:50.293871791 +0200
+++ /var/tmp/diff_new_pack.tf5Iix/_new  2020-06-29 21:18:50.293871791 +0200
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-pytest-pycodestyle
-Version:        2.1.2
+Version:        2.1.3
 Release:        0
 Summary:        Pytest plugin to run pycodestyle
 License:        MIT

++++++ pytest-pycodestyle-2.1.2.tar.gz -> pytest-pycodestyle-2.1.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-pycodestyle-2.1.2/PKG-INFO 
new/pytest-pycodestyle-2.1.3/PKG-INFO
--- old/pytest-pycodestyle-2.1.2/PKG-INFO       2020-03-23 08:57:19.000000000 
+0100
+++ new/pytest-pycodestyle-2.1.3/PKG-INFO       2020-04-03 03:34:30.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pytest-pycodestyle
-Version: 2.1.2
+Version: 2.1.3
 Summary: pytest plugin to run pycodestyle
 Home-page: https://github.com/henry0312/pytest-pycodestyle
 Author: OMOTO Tsukasa
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-pycodestyle-2.1.2/VERSION 
new/pytest-pycodestyle-2.1.3/VERSION
--- old/pytest-pycodestyle-2.1.2/VERSION        2020-03-23 08:52:46.000000000 
+0100
+++ new/pytest-pycodestyle-2.1.3/VERSION        2020-04-02 17:35:19.000000000 
+0200
@@ -1 +1 @@
-2.1.2
+2.1.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pytest-pycodestyle-2.1.2/src/pytest_pycodestyle.egg-info/PKG-INFO 
new/pytest-pycodestyle-2.1.3/src/pytest_pycodestyle.egg-info/PKG-INFO
--- old/pytest-pycodestyle-2.1.2/src/pytest_pycodestyle.egg-info/PKG-INFO       
2020-03-23 08:57:19.000000000 +0100
+++ new/pytest-pycodestyle-2.1.3/src/pytest_pycodestyle.egg-info/PKG-INFO       
2020-04-03 03:34:30.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pytest-pycodestyle
-Version: 2.1.2
+Version: 2.1.3
 Summary: pytest plugin to run pycodestyle
 Home-page: https://github.com/henry0312/pytest-pycodestyle
 Author: OMOTO Tsukasa
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-pycodestyle-2.1.2/src/pytest_pycodestyle.py 
new/pytest-pycodestyle-2.1.3/src/pytest_pycodestyle.py
--- old/pytest-pycodestyle-2.1.2/src/pytest_pycodestyle.py      2020-03-23 
08:18:23.000000000 +0100
+++ new/pytest-pycodestyle-2.1.3/src/pytest_pycodestyle.py      2020-04-02 
12:14:53.000000000 +0200
@@ -1,6 +1,8 @@
 # https://docs.pytest.org/en/latest/writing_plugins.html
 # https://docs.pytest.org/en/latest/example/nonpython.html#yaml-plugin
 
+import optparse
+
 import py.io
 import pycodestyle
 import pytest
@@ -22,33 +24,33 @@
         # https://github.com/PyCQA/pycodestyle/blob/2.5.0/pycodestyle.py#L2295
         style_guide = pycodestyle.StyleGuide(paths=[str(path)], verbose=False)
         if not style_guide.excluded(filename=str(path)):
-            # store options of pycodestyle
-            parent.style_guide_options = style_guide.options
             # 
https://github.com/pytest-dev/pytest/blob/ee1950af7793624793ee297e5f48b49c8bdf2065/src/_pytest/nodes.py#L477
-            return File.from_parent(parent=parent, fspath=path)
+            return File.from_parent(parent=parent, fspath=path, 
style_guide_options=style_guide.options)
 
 
 class File(pytest.File):
 
+    @classmethod
+    def from_parent(cls, parent, fspath, style_guide_options: optparse.Values):
+        _file = super().from_parent(parent=parent, fspath=fspath)
+        # store options of pycodestyle
+        _file.style_guide_options = style_guide_options
+        return _file
+
     def collect(self):
         # 
https://github.com/pytest-dev/pytest/blob/ee1950af7793624793ee297e5f48b49c8bdf2065/src/_pytest/nodes.py#L399
-        return [Item.from_parent(name=self.name, parent=self.parent, 
nodeid=self.nodeid, fspath=self.fspath)]
+        yield Item.from_parent(parent=self, name=self.name, nodeid=self.nodeid)
 
 
 class Item(pytest.Item):
     CACHE_KEY = 'pycodestyle/mtimes'
 
-    def __init__(self, name, parent, nodeid, fspath):
+    def __init__(self, name, parent, nodeid):
         # 
https://github.com/pytest-dev/pytest/blob/ee1950af7793624793ee297e5f48b49c8bdf2065/src/_pytest/nodes.py#L544
         super().__init__(name, parent=parent, nodeid=f"{nodeid}::PYCODESTYLE")
         self.add_marker('pycodestyle')
-
-        # update fspath that was defined as parent.fspath in Node.__init__
-        # 
https://github.com/pytest-dev/pytest/blob/ee1950af7793624793ee297e5f48b49c8bdf2065/src/_pytest/nodes.py#L126
-        self.fspath = fspath
-
         # load options of pycodestyle
-        self.options = parent.style_guide_options
+        self.options: optparse.Values = self.parent.style_guide_options
 
     def setup(self):
         if not hasattr(self.config, 'cache'):


Reply via email to