Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • pycqa/pycodestyle
1 result
Show changes
Commits on Source (2)
Loading
Loading
@@ -1538,7 +1538,9 @@ def parse_udiff(diff, patterns=None, parent='.'):
rv[path].update(range(row, row + nrows))
elif line[:3] == '+++':
path = line[4:].split('\t', 1)[0]
if path[:2] == 'b/':
# Git diff will use (i)ndex, (w)ork tree, (c)ommit and (o)bject
# instead of a/b/c/d as prefixes for patches
if path[:2] in ('b/', 'w/', 'i/'):
path = path[2:]
rv[path] = set()
return dict([(os.path.join(parent, path), rows)
Loading
Loading
Loading
Loading
@@ -191,3 +191,13 @@ class ShellTestCase(unittest.TestCase):
self.assertFalse(errcode)
self.assertFalse(stdout)
self.assertFalse(stderr)
for index, diff_line in enumerate(diff_lines, 0):
diff_line = diff_line.replace('a/', 'i/')
diff_lines[index] = diff_line.replace('b/', 'w/')
self.stdin = '\n'.join(diff_lines)
stdout, stderr, errcode = self.pycodestyle('--diff')
self.assertFalse(errcode)
self.assertFalse(stdout)
self.assertFalse(stderr)