Merge branch 'formatter-print-observe-newline' into 'master'

Respect a formatter's newline setting when printing

See merge request pycqa/flake8!222
This commit is contained in:
Ian Stapleton Cordasco 2018-01-01 00:57:09 +00:00
commit 6381d86f00
2 changed files with 5 additions and 5 deletions

View file

@ -172,7 +172,7 @@ class BaseFormatter(object):
if self.output_fd is not None:
self.output_fd.write(output + self.newline)
if self.output_fd is None or self.options.tee:
print(output)
print(output, end=self.newline)
def write(self, line, source):
"""Write the line either to the output file or stdout.