File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -1681,24 +1681,23 @@ def get_file_results(self):
1681
1681
'row' : self .line_offset + line_number , 'col' : offset + 1 ,
1682
1682
'code' : code , 'text' : text ,
1683
1683
})
1684
- # stdout is block buffered when not stdout.isatty().
1685
- # When using pep8 in multiprocess, line can be broken where
1686
- # buffer boundary since other processes write to same file.
1687
- # So flush() after print() to avoid buffer boundary.
1688
- # Typical buffer size is 8192. line written safely when
1689
- # len(line) < 8192.
1690
- sys .stdout .flush ()
1691
1684
if self ._show_source :
1692
1685
if line_number > len (self .lines ):
1693
1686
line = ''
1694
1687
else :
1695
1688
line = self .lines [line_number - 1 ]
1696
1689
print (line .rstrip ())
1697
1690
print (re .sub (r'\S' , ' ' , line [:offset ]) + '^' )
1698
- sys .stdout .flush ()
1699
1691
if self ._show_pep8 and doc :
1700
1692
print (' ' + doc .strip ())
1701
- sys .stdout .flush ()
1693
+
1694
+ # stdout is block buffered when not stdout.isatty().
1695
+ # line can be broken where buffer boundary since other processes
1696
+ # write to same file.
1697
+ # flush() after print() to avoid buffer boundary.
1698
+ # Typical buffer size is 8192. line written safely when
1699
+ # len(line) < 8192.
1700
+ sys .stdout .flush ()
1702
1701
return self .file_errors
1703
1702
1704
1703
You can’t perform that action at this time.
0 commit comments