Assertion failure (self.logical_line.strip() == self.logical_line) #119

Closed
myint opened this Issue Jul 31, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@myint
Member

myint commented Jul 31, 2012

See sPickle-0.0.7/sPickle/_sPickle.py from PyPi. It only happens on Python 2 (tested on 2.5 through 2.7). Python 3 is fine.

python2.7  ../../pep8/pep8.py --first pypi_tmp/sPickle/sPickle-0.0.7/sPickle/_sPickle.py
pypi_tmp/sPickle/sPickle-0.0.7/sPickle/_sPickle.py:60:31: E225 missing whitespace around operator
pypi_tmp/sPickle/sPickle-0.0.7/sPickle/_sPickle.py:61:1: W293 blank line contains whitespace
Traceback (most recent call last):
  File "../../pep8/pep8.py", line 1934, in <module>
    _main()
  File "../../pep8/pep8.py", line 1920, in _main
    report = pep8style.check_files()
  File "../../pep8/pep8.py", line 1591, in check_files
    runner(path)
  File "../../pep8/pep8.py", line 1600, in input_file
    return fchecker.check_all(expected=expected, line_offset=line_offset)
  File "../../pep8/pep8.py", line 1343, in check_all
    self.check_logical()
  File "../../pep8/pep8.py", line 1272, in check_logical
    self.build_tokens_line()
  File "../../pep8/pep8.py", line 1266, in build_tokens_line
    assert self.logical_line.strip() == self.logical_line
AssertionError
@myint

This comment has been minimized.

Show comment Hide comment
@myint

myint Jul 31, 2012

Member

Note the mixed line terminators.

$ file  pypi_tmp/sPickle/sPickle-0.0.7/sPickle/_sPickle.py
pypi_tmp/sPickle/sPickle-0.0.7/sPickle/_sPickle.py: ASCII English text, with CRLF, CR, LF line terminators
Member

myint commented Jul 31, 2012

Note the mixed line terminators.

$ file  pypi_tmp/sPickle/sPickle-0.0.7/sPickle/_sPickle.py
pypi_tmp/sPickle/sPickle-0.0.7/sPickle/_sPickle.py: ASCII English text, with CRLF, CR, LF line terminators

@florentx florentx closed this in 2f974e4 Dec 22, 2012

@florentx

This comment has been minimized.

Show comment Hide comment
@florentx

florentx Dec 22, 2012

Contributor

Thanks, fixed

Contributor

florentx commented Dec 22, 2012

Thanks, fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment