Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pycodestyle for 
openSUSE:Factory checked in at 2021-03-21 23:19:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pycodestyle (Old)
 and      /work/SRC/openSUSE:Factory/.python-pycodestyle.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pycodestyle"

Sun Mar 21 23:19:15 2021 rev:8 rq:879831 version:2.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pycodestyle/python-pycodestyle.changes    
2020-05-28 09:06:03.499472166 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-pycodestyle.new.2401/python-pycodestyle.changes
  2021-03-21 23:19:17.876717148 +0100
@@ -1,0 +2,8 @@
+Tue Mar 16 18:44:38 UTC 2021 - John Vandenberg <[email protected]>
+
+- Update to v2.7.0
+  * Fix physical checks (such as W191) at end of file.
+  * Add ``--indent-size`` option (defaulting to ``4``).
+  * W605: fix escaped crlf false positive on windows.
+
+-------------------------------------------------------------------

Old:
----
  pycodestyle-2.6.0.tar.gz

New:
----
  pycodestyle-2.7.0.tar.gz

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

Other differences:
------------------
++++++ python-pycodestyle.spec ++++++
--- /var/tmp/diff_new_pack.80lBKg/_old  2021-03-21 23:19:18.288717289 +0100
+++ /var/tmp/diff_new_pack.80lBKg/_new  2021-03-21 23:19:18.288717289 +0100
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define oldpython python
 Name:           python-pycodestyle
-Version:        2.6.0
+Version:        2.7.0
 Release:        0
 Summary:        Python style guide checker
 License:        MIT

++++++ pycodestyle-2.6.0.tar.gz -> pycodestyle-2.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycodestyle-2.6.0/CHANGES.txt 
new/pycodestyle-2.7.0/CHANGES.txt
--- old/pycodestyle-2.6.0/CHANGES.txt   2020-05-11 21:20:29.000000000 +0200
+++ new/pycodestyle-2.7.0/CHANGES.txt   2021-03-14 19:42:11.000000000 +0100
@@ -1,6 +1,16 @@
 Changelog
 =========
 
+2.7.0 (2021-03-14)
+------------------
+
+Changes:
+
+* Fix physical checks (such as W191) at end of file.  PR #961.
+* Add ``--indent-size`` option (defaulting to ``4``).  PR #970.
+* W605: fix escaped crlf false positive on windows.  PR #976.
+
+
 2.6.0 (2020-05-11)
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycodestyle-2.6.0/PKG-INFO 
new/pycodestyle-2.7.0/PKG-INFO
--- old/pycodestyle-2.6.0/PKG-INFO      2020-05-11 21:56:03.000000000 +0200
+++ new/pycodestyle-2.7.0/PKG-INFO      2021-03-14 19:43:36.266295000 +0100
@@ -1,13 +1,14 @@
 Metadata-Version: 1.2
 Name: pycodestyle
-Version: 2.6.0
+Version: 2.7.0
 Summary: Python style guide checker
-Home-page: https://pycodestyle.readthedocs.io/
+Home-page: https://pycodestyle.pycqa.org/
 Author: Johann C. Rocholl
 Author-email: [email protected]
 Maintainer: Ian Lee
 Maintainer-email: [email protected]
 License: Expat license
+Project-URL: Changes, 
https://pycodestyle.pycqa.org/en/latest/developer.html#changes
 Description: pycodestyle (formerly called pep8) - Python style guide checker
         ===============================================================
         
@@ -16,7 +17,7 @@
            :alt: Build status
         
         .. image:: 
https://readthedocs.org/projects/pycodestyle/badge/?version=latest
-            :target: https://pycodestyle.readthedocs.io
+            :target: https://pycodestyle.pycqa.org
             :alt: Documentation Status
         
         .. image:: https://img.shields.io/pypi/wheel/pycodestyle.svg
@@ -113,7 +114,7 @@
         Links
         -----
         
-        * `Read the documentation <https://pycodestyle.readthedocs.io/>`_
+        * `Read the documentation <https://pycodestyle.pycqa.org/>`_
         
         * `Fork me on GitHub <http://github.com/PyCQA/pycodestyle>`_
         
@@ -121,6 +122,16 @@
         Changelog
         =========
         
+        2.7.0 (2021-03-14)
+        ------------------
+        
+        Changes:
+        
+        * Fix physical checks (such as W191) at end of file.  PR #961.
+        * Add ``--indent-size`` option (defaulting to ``4``).  PR #970.
+        * W605: fix escaped crlf false positive on windows.  PR #976.
+        
+        
         2.6.0 (2020-05-11)
         ------------------
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycodestyle-2.6.0/README.rst 
new/pycodestyle-2.7.0/README.rst
--- old/pycodestyle-2.6.0/README.rst    2020-04-23 23:57:11.000000000 +0200
+++ new/pycodestyle-2.7.0/README.rst    2021-03-14 19:42:11.000000000 +0100
@@ -6,7 +6,7 @@
    :alt: Build status
 
 .. image:: https://readthedocs.org/projects/pycodestyle/badge/?version=latest
-    :target: https://pycodestyle.readthedocs.io
+    :target: https://pycodestyle.pycqa.org
     :alt: Documentation Status
 
 .. image:: https://img.shields.io/pypi/wheel/pycodestyle.svg
@@ -103,6 +103,6 @@
 Links
 -----
 
-* `Read the documentation <https://pycodestyle.readthedocs.io/>`_
+* `Read the documentation <https://pycodestyle.pycqa.org/>`_
 
 * `Fork me on GitHub <http://github.com/PyCQA/pycodestyle>`_
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycodestyle-2.6.0/docs/index.rst 
new/pycodestyle-2.7.0/docs/index.rst
--- old/pycodestyle-2.6.0/docs/index.rst        2020-04-23 23:57:11.000000000 
+0200
+++ new/pycodestyle-2.7.0/docs/index.rst        2021-03-14 19:42:11.000000000 
+0100
@@ -21,7 +21,7 @@
    API <api>
    developer
 
-* Online documentation: https://pycodestyle.readthedocs.io/
+* Online documentation: https://pycodestyle.pycqa.org/
 * Source code and issue tracker: https://github.com/pycqa/pycodestyle
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycodestyle-2.6.0/docs/intro.rst 
new/pycodestyle-2.7.0/docs/intro.rst
--- old/pycodestyle-2.6.0/docs/intro.rst        2020-04-23 23:57:11.000000000 
+0200
+++ new/pycodestyle-2.7.0/docs/intro.rst        2021-03-14 19:42:11.000000000 
+0100
@@ -159,6 +159,7 @@
     --max-line-length=n  set maximum allowed line length (default: 79)
     --max-doc-length=n   set maximum allowed doc line length and perform these
                          checks (unchecked if not set)
+    --indent-size=n      set how many spaces make up an indent (default: 4)
     --hang-closing       hang closing bracket instead of matching indentation 
of
                          opening bracket's line
     --format=format      set the error format [default|pylint|<custom>]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycodestyle-2.6.0/pycodestyle.egg-info/PKG-INFO 
new/pycodestyle-2.7.0/pycodestyle.egg-info/PKG-INFO
--- old/pycodestyle-2.6.0/pycodestyle.egg-info/PKG-INFO 2020-05-11 
21:56:03.000000000 +0200
+++ new/pycodestyle-2.7.0/pycodestyle.egg-info/PKG-INFO 2021-03-14 
19:43:36.000000000 +0100
@@ -1,13 +1,14 @@
 Metadata-Version: 1.2
 Name: pycodestyle
-Version: 2.6.0
+Version: 2.7.0
 Summary: Python style guide checker
-Home-page: https://pycodestyle.readthedocs.io/
+Home-page: https://pycodestyle.pycqa.org/
 Author: Johann C. Rocholl
 Author-email: [email protected]
 Maintainer: Ian Lee
 Maintainer-email: [email protected]
 License: Expat license
+Project-URL: Changes, 
https://pycodestyle.pycqa.org/en/latest/developer.html#changes
 Description: pycodestyle (formerly called pep8) - Python style guide checker
         ===============================================================
         
@@ -16,7 +17,7 @@
            :alt: Build status
         
         .. image:: 
https://readthedocs.org/projects/pycodestyle/badge/?version=latest
-            :target: https://pycodestyle.readthedocs.io
+            :target: https://pycodestyle.pycqa.org
             :alt: Documentation Status
         
         .. image:: https://img.shields.io/pypi/wheel/pycodestyle.svg
@@ -113,7 +114,7 @@
         Links
         -----
         
-        * `Read the documentation <https://pycodestyle.readthedocs.io/>`_
+        * `Read the documentation <https://pycodestyle.pycqa.org/>`_
         
         * `Fork me on GitHub <http://github.com/PyCQA/pycodestyle>`_
         
@@ -121,6 +122,16 @@
         Changelog
         =========
         
+        2.7.0 (2021-03-14)
+        ------------------
+        
+        Changes:
+        
+        * Fix physical checks (such as W191) at end of file.  PR #961.
+        * Add ``--indent-size`` option (defaulting to ``4``).  PR #970.
+        * W605: fix escaped crlf false positive on windows.  PR #976.
+        
+        
         2.6.0 (2020-05-11)
         ------------------
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycodestyle-2.6.0/pycodestyle.egg-info/SOURCES.txt 
new/pycodestyle-2.7.0/pycodestyle.egg-info/SOURCES.txt
--- old/pycodestyle-2.6.0/pycodestyle.egg-info/SOURCES.txt      2020-05-11 
21:56:03.000000000 +0200
+++ new/pycodestyle-2.7.0/pycodestyle.egg-info/SOURCES.txt      2021-03-14 
19:43:36.000000000 +0100
@@ -48,6 +48,7 @@
 testsuite/W39.py
 testsuite/W60.py
 testsuite/__init__.py
+testsuite/crlf.py
 testsuite/latin-1.py
 testsuite/noqa.py
 testsuite/python3.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycodestyle-2.6.0/pycodestyle.py 
new/pycodestyle-2.7.0/pycodestyle.py
--- old/pycodestyle-2.6.0/pycodestyle.py        2020-05-11 21:15:00.000000000 
+0200
+++ new/pycodestyle-2.7.0/pycodestyle.py        2021-03-14 19:42:11.000000000 
+0100
@@ -78,7 +78,7 @@
 except ImportError:
     from ConfigParser import RawConfigParser
 
-__version__ = '2.6.0'
+__version__ = '2.7.0'
 
 DEFAULT_EXCLUDE = '.svn,CVS,.bzr,.hg,.git,__pycache__,.tox'
 DEFAULT_IGNORE = 'E121,E123,E126,E226,E24,E704,W503,W504'
@@ -104,6 +104,7 @@
     'method': 1,
 }
 MAX_DOC_LENGTH = 72
+INDENT_SIZE = 4
 REPORT_FORMAT = {
     'default': '%(path)s:%(row)d:%(col)d: %(code)s %(text)s',
     'pylint': '%(path)s:%(row)d: [%(code)s] %(text)s',
@@ -264,7 +265,7 @@
     However the last line should end with a new line (warning W292).
     """
     if line_number == total_lines:
-        stripped_last_line = physical_line.rstrip()
+        stripped_last_line = physical_line.rstrip('\r\n')
         if physical_line and not stripped_last_line:
             return 0, "W391 blank line at end of file"
         if stripped_last_line == physical_line:
@@ -543,8 +544,9 @@
 
 @register_check
 def indentation(logical_line, previous_logical, indent_char,
-                indent_level, previous_indent_level):
-    r"""Use 4 spaces per indentation level.
+                indent_level, previous_indent_level,
+                indent_size, indent_size_str):
+    r"""Use indent_size (PEP8 says 4) spaces per indentation level.
 
     For really old code that you don't want to mess up, you can continue
     to use 8-space tabs.
@@ -564,8 +566,11 @@
     """
     c = 0 if logical_line else 3
     tmpl = "E11%d %s" if logical_line else "E11%d %s (comment)"
-    if indent_level % 4:
-        yield 0, tmpl % (1 + c, "indentation is not a multiple of four")
+    if indent_level % indent_size:
+        yield 0, tmpl % (
+            1 + c,
+            "indentation is not a multiple of " + indent_size_str,
+        )
     indent_expect = previous_logical.endswith(':')
     if indent_expect and indent_level <= previous_indent_level:
         yield 0, tmpl % (2 + c, "expected an indented block")
@@ -581,7 +586,8 @@
 
 @register_check
 def continued_indentation(logical_line, tokens, indent_level, hang_closing,
-                          indent_char, noqa, verbose):
+                          indent_char, indent_size, indent_size_str, noqa,
+                          verbose):
     r"""Continuation lines indentation.
 
     Continuation lines should align wrapped elements either vertically
@@ -620,7 +626,8 @@
     indent_next = logical_line.endswith(':')
 
     row = depth = 0
-    valid_hangs = (4,) if indent_char != '\t' else (4, 8)
+    valid_hangs = (indent_size,) if indent_char != '\t' \
+        else (indent_size, indent_size * 2)
     # remember how many brackets were opened on each line
     parens = [0] * nrows
     # relative indents of physical lines
@@ -685,7 +692,8 @@
                     # visual indent is broken
                     yield (start, "E128 continuation line "
                            "under-indented for visual indent")
-            elif hanging_indent or (indent_next and rel_indent[row] == 8):
+            elif hanging_indent or (indent_next and
+                                    rel_indent[row] == 2 * indent_size):
                 # hanging indent is verified
                 if close_bracket and not hang_closing:
                     yield (start, "E123 closing bracket does not match "
@@ -708,7 +716,7 @@
                     error = "E131", "unaligned for hanging indent"
                 else:
                     hangs[depth] = hang
-                    if hang > 4:
+                    if hang > indent_size:
                         error = "E126", "over-indented for hanging indent"
                     else:
                         error = "E121", "under-indented for hanging indent"
@@ -775,8 +783,8 @@
         if last_token_multiline:
             rel_indent[end[0] - first_row] = rel_indent[row]
 
-    if indent_next and expand_indent(line) == indent_level + 4:
-        pos = (start[0], indent[0] + 4)
+    if indent_next and expand_indent(line) == indent_level + indent_size:
+        pos = (start[0], indent[0] + indent_size)
         if visual_indent:
             code = "E129 visually indented line"
         else:
@@ -1806,10 +1814,8 @@
     def readlines(filename):
         """Read the source code."""
         try:
-            with open(filename, 'rb') as f:
-                (coding, lines) = tokenize.detect_encoding(f.readline)
-                f = TextIOWrapper(f, coding, line_buffering=True)
-                return [line.decode(coding) for line in lines] + f.readlines()
+            with tokenize.open(filename) as f:
+                return f.readlines()
         except (LookupError, SyntaxError, UnicodeError):
             # Fall back if file encoding is improperly declared
             with open(filename, encoding='latin-1') as f:
@@ -1960,8 +1966,12 @@
         self._ast_checks = options.ast_checks
         self.max_line_length = options.max_line_length
         self.max_doc_length = options.max_doc_length
+        self.indent_size = options.indent_size
         self.multiline = False  # in a multiline string?
         self.hang_closing = options.hang_closing
+        self.indent_size = options.indent_size
+        self.indent_size_str = ({2: 'two', 4: 'four', 8: 'eight'}
+                                .get(self.indent_size, str(self.indent_size)))
         self.verbose = options.verbose
         self.filename = filename
         # Dictionary where a checker can store its custom state.
@@ -2125,21 +2135,30 @@
             self.report_error(1, 0, 'E902 %s' % self._io_error, readlines)
         tokengen = tokenize.generate_tokens(self.readline)
         try:
+            prev_physical = ''
             for token in tokengen:
                 if token[2][0] > self.total_lines:
                     return
                 self.noqa = token[4] and noqa(token[4])
-                self.maybe_check_physical(token)
+                self.maybe_check_physical(token, prev_physical)
                 yield token
+                prev_physical = token[4]
         except (SyntaxError, tokenize.TokenError):
             self.report_invalid_syntax()
 
-    def maybe_check_physical(self, token):
+    def maybe_check_physical(self, token, prev_physical):
         """If appropriate for token, check current physical line(s)."""
         # Called after every token, but act only on end of line.
+
+        # a newline token ends a single physical line.
         if _is_eol_token(token):
-            # Obviously, a newline token ends a single physical line.
-            self.check_physical(token[4])
+            # if the file does not end with a newline, the NEWLINE
+            # token is inserted by the parser, but it does not contain
+            # the previous physical line in `token[4]`
+            if token[4] == '':
+                self.check_physical(prev_physical)
+            else:
+                self.check_physical(token[4])
         elif token[0] == tokenize.STRING and '\n' in token[1]:
             # Less obviously, a string that contains newlines is a
             # multiline string, either triple-quoted or with internal
@@ -2519,8 +2538,8 @@
                           usage="%prog [options] input ...")
     parser.config_options = [
         'exclude', 'filename', 'select', 'ignore', 'max-line-length',
-        'max-doc-length', 'hang-closing', 'count', 'format', 'quiet',
-        'show-pep8', 'show-source', 'statistics', 'verbose']
+        'max-doc-length', 'indent-size', 'hang-closing', 'count', 'format',
+        'quiet', 'show-pep8', 'show-source', 'statistics', 'verbose']
     parser.add_option('-v', '--verbose', default=0, action='count',
                       help="print status messages, or debug with -vv")
     parser.add_option('-q', '--quiet', default=0, action='count',
@@ -2560,6 +2579,10 @@
                       default=None,
                       help="set maximum allowed doc line length and perform "
                            "these checks (unchecked if not set)")
+    parser.add_option('--indent-size', type='int', metavar='n',
+                      default=INDENT_SIZE,
+                      help="set how many spaces make up an indent "
+                           "(default: %default)")
     parser.add_option('--hang-closing', action='store_true',
                       help="hang closing bracket instead of matching "
                            "indentation of opening bracket's line")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycodestyle-2.6.0/setup.py 
new/pycodestyle-2.7.0/setup.py
--- old/pycodestyle-2.6.0/setup.py      2020-04-23 23:57:11.000000000 +0200
+++ new/pycodestyle-2.7.0/setup.py      2021-03-14 19:42:11.000000000 +0100
@@ -28,7 +28,7 @@
     author_email='[email protected]',
     maintainer='Ian Lee',
     maintainer_email='[email protected]',
-    url='https://pycodestyle.readthedocs.io/',
+    url='https://pycodestyle.pycqa.org/',
     license='Expat license',
     py_modules=['pycodestyle'],
     namespace_packages=[],
@@ -63,5 +63,8 @@
         'Programming Language :: Python :: Implementation :: PyPy',
         'Topic :: Software Development :: Libraries :: Python Modules',
     ],
-    test_suite='testsuite.test_all.suite',
+    project_urls={
+        'Changes':
+        'https://pycodestyle.pycqa.org/en/latest/developer.html#changes',
+    },
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycodestyle-2.6.0/testsuite/W29.py 
new/pycodestyle-2.7.0/testsuite/W29.py
--- old/pycodestyle-2.6.0/testsuite/W29.py      2020-04-23 23:57:11.000000000 
+0200
+++ new/pycodestyle-2.7.0/testsuite/W29.py      2021-03-14 19:42:11.000000000 
+0100
@@ -9,6 +9,11 @@
 #: W291:2:35
 '''multiline
 string with trailing whitespace'''   
+#: W291 W292 noeol
+x = 1   
+#: W191 W292 noeol
+if False:
+       pass  # indented with tabs
 #: W292:1:36 noeol
 # This line doesn't have a linefeed
 #: W292:1:5 E225:1:2 noeol
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycodestyle-2.6.0/testsuite/W39.py 
new/pycodestyle-2.7.0/testsuite/W39.py
--- old/pycodestyle-2.6.0/testsuite/W39.py      2020-04-23 23:57:11.000000000 
+0200
+++ new/pycodestyle-2.7.0/testsuite/W39.py      2021-03-14 19:42:11.000000000 
+0100
@@ -5,7 +5,7 @@
 # Two additional empty lines
 
 
-#: W391:4:1 W293:3:1 W293:4:1 noeol
+#: W292:4:5 W293:3:1 W293:4:1 noeol
 # The last lines contain space
 
     
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycodestyle-2.6.0/testsuite/crlf.py 
new/pycodestyle-2.7.0/testsuite/crlf.py
--- old/pycodestyle-2.6.0/testsuite/crlf.py     1970-01-01 01:00:00.000000000 
+0100
+++ new/pycodestyle-2.7.0/testsuite/crlf.py     2021-03-14 19:42:11.000000000 
+0100
@@ -0,0 +1,3 @@
+'''\
+test
+'''
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycodestyle-2.6.0/testsuite/test_api.py 
new/pycodestyle-2.7.0/testsuite/test_api.py
--- old/pycodestyle-2.6.0/testsuite/test_api.py 2020-04-23 23:57:11.000000000 
+0200
+++ new/pycodestyle-2.7.0/testsuite/test_api.py 2021-03-14 19:42:11.000000000 
+0100
@@ -391,3 +391,52 @@
 
         # TODO: runner
         # TODO: input_file
+
+    def test_styleguides_other_indent_size(self):
+        pycodestyle.register_check(DummyChecker, ['Z701'])
+        lines = [
+            'def foo():\n',
+            '    pass\n',
+            '\n',
+            '\n',
+            'def foo_correct():\n',
+            '   pass\n',
+            '\n',
+            '\n',
+            'def bar():\n',
+            '   [1, 2, 3,\n',
+            '     4, 5, 6,\n',
+            '     ]\n',
+            '\n',
+            '\n',
+            'if (1 in [1, 2, 3]\n',
+            '      and bool(0) is False\n',
+            '     and bool(1) is True):\n',
+            '   pass\n'
+        ]
+
+        pep8style = pycodestyle.StyleGuide()
+        pep8style.options.indent_size = 3
+        count_errors = pep8style.input_file('stdin', lines=lines)
+        stdout = sys.stdout.getvalue()
+        self.assertEqual(count_errors, 4)
+        expected = (
+            'stdin:2:5: '
+            'E111 indentation is not a multiple of 3'
+        )
+        self.assertTrue(expected in stdout)
+        expected = (
+            'stdin:11:6: '
+            'E127 continuation line over-indented for visual indent'
+        )
+        self.assertTrue(expected in stdout)
+        expected = (
+            'stdin:12:6: '
+            'E124 closing bracket does not match visual indentation'
+        )
+        self.assertTrue(expected in stdout)
+        expected = (
+            'stdin:17:6: '
+            'E127 continuation line over-indented for visual indent'
+        )
+        self.assertTrue(expected in stdout)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycodestyle-2.6.0/testsuite/test_shell.py 
new/pycodestyle-2.7.0/testsuite/test_shell.py
--- old/pycodestyle-2.6.0/testsuite/test_shell.py       2020-04-23 
23:57:11.000000000 +0200
+++ new/pycodestyle-2.7.0/testsuite/test_shell.py       2021-03-14 
19:42:11.000000000 +0100
@@ -79,7 +79,7 @@
         self.assertFalse(stderr)
         self.assertEqual(len(stdout), 24)
         for line, num, col in zip(stdout, (3, 6, 6, 9, 12), (3, 6, 6, 1, 5)):
-            path, x, y, msg = line.split(':')
+            path, x, y, msg = line.rsplit(':', 3)
             self.assertTrue(path.endswith(E11))
             self.assertEqual(x, str(num))
             self.assertEqual(y, str(col))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pycodestyle-2.6.0/testsuite/test_util.py 
new/pycodestyle-2.7.0/testsuite/test_util.py
--- old/pycodestyle-2.6.0/testsuite/test_util.py        2020-04-23 
23:57:11.000000000 +0200
+++ new/pycodestyle-2.7.0/testsuite/test_util.py        2021-03-14 
19:42:11.000000000 +0100
@@ -8,8 +8,6 @@
 
 class UtilTestCase(unittest.TestCase):
     def test_normalize_paths(self):
-        cwd = os.getcwd()
-
         self.assertEqual(normalize_paths(''), [])
         self.assertEqual(normalize_paths([]), [])
         self.assertEqual(normalize_paths(None), [])
@@ -17,7 +15,11 @@
         self.assertEqual(normalize_paths('foo'), ['foo'])
         self.assertEqual(normalize_paths('foo,bar'), ['foo', 'bar'])
         self.assertEqual(normalize_paths('foo,  bar  '), ['foo', 'bar'])
-        self.assertEqual(normalize_paths('/foo/bar,baz/../bat'),
-                         ['/foo/bar', cwd + '/bat'])
-        self.assertEqual(normalize_paths(".pyc,\n   build/*"),
-                         ['.pyc', cwd + '/build/*'])
+        self.assertEqual(
+            normalize_paths('/foo/bar,baz/../bat'),
+            [os.path.realpath('/foo/bar'), os.path.abspath('bat')],
+        )
+        self.assertEqual(
+            normalize_paths(".pyc,\n   build/*"),
+            ['.pyc', os.path.abspath('build/*')],
+        )

Reply via email to