1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-03 03:42:35 +01:00

pep8: Ignore line break before binary operator

PEP8 has switched its guidance [1] for where a line break should occur
in relation to a binary operator, so don't raise this warning for
new code and update the code base to follow the new style.

[1] https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator
This commit is contained in:
Marc Bonnici
2020-10-19 18:09:04 +01:00
committed by setrofim
parent fbb84eca72
commit aa4df95a69
19 changed files with 63 additions and 63 deletions

View File

@@ -404,8 +404,8 @@ def istextfile(fileobj, blocksize=512):
If more than 30% of the chars in the block are non-text, or there
are NUL ('\x00') bytes in the block, assume this is a binary file.
"""
_text_characters = (b''.join(chr(i) for i in range(32, 127)) +
b'\n\r\t\f\b')
_text_characters = (b''.join(chr(i) for i in range(32, 127))
+ b'\n\r\t\f\b')
block = fileobj.read(blocksize)
if b'\x00' in block: