diff --git a/tools/pretty_flake8.py b/tools/pretty_flake8.py index f08c16847..2989f4fe4 100755 --- a/tools/pretty_flake8.py +++ b/tools/pretty_flake8.py @@ -11,6 +11,7 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. +from __future__ import print_function import re import sys @@ -37,9 +38,9 @@ def main(): if len(m['file']) > max_filename_len: max_filename_len = len(m['file']) else: - print line + print(line) - print 'Flake8 Results' + print('Flake8 Results') ct = PrettyTable([ "File", @@ -57,7 +58,7 @@ def main(): for line in raw_errors: ct.add_row(format_dict(line)) - print ct + print(ct) with open('flake8_results.html', 'w') as f: f.write('
%s' % ct.get_html_string(attributes = {"cellspacing": 0})) # noqa