diff options
author | Christopher Baines <mail@cbaines.net> | 2018-12-09 10:42:54 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2018-12-09 10:42:54 +0000 |
commit | 35110450a38daac5a3d13d2d799d78732cd6c0f1 (patch) | |
tree | a7bbe9e6a343939d048ccab200a298d99d38beda /gnu/packages/patches | |
parent | 8f182d77f4e5c708a728148d6926d2ec1e66067d (diff) | |
download | guix-fix-python-ipython.tar guix-fix-python-ipython.tar.gz |
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/python-pycodestyle-keep-compatability-with-stdlib-tokenize.py-changes.patch | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gnu/packages/patches/python-pycodestyle-keep-compatability-with-stdlib-tokenize.py-changes.patch b/gnu/packages/patches/python-pycodestyle-keep-compatability-with-stdlib-tokenize.py-changes.patch new file mode 100644 index 0000000000..66185d65e9 --- /dev/null +++ b/gnu/packages/patches/python-pycodestyle-keep-compatability-with-stdlib-tokenize.py-changes.patch @@ -0,0 +1,17 @@ +diff --git a/pycodestyle.py b/pycodestyle.py +index 0d725d27..fbc3dca3 100755 +--- a/pycodestyle.py ++++ b/pycodestyle.py +@@ -258,10 +258,10 @@ def trailing_blank_lines(physical_line, lines, line_number, total_lines): + """ + if line_number == total_lines: + stripped_last_line = physical_line.rstrip() +- if not stripped_last_line: ++ if physical_line and not stripped_last_line: + return 0, "W391 blank line at end of file" + if stripped_last_line == physical_line: +- return len(physical_line), "W292 no newline at end of file" ++ return len(lines[-1]), "W292 no newline at end of file" + + + @register_check |