File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
- #!/usr/bin/env python2.7
1
+ #!/usr/bin/env python3
2
2
#
3
3
#===- google-java-format-diff.py - google-java-format Diff Reformatter -----===#
4
4
#
31
31
import re
32
32
import string
33
33
import subprocess
34
- import StringIO
34
+ import io
35
35
import sys
36
36
from distutils .spawn import find_executable
37
37
@@ -109,9 +109,9 @@ def main():
109
109
base_command = [binary ]
110
110
111
111
# Reformat files containing changes in place.
112
- for filename , lines in lines_by_file .iteritems ():
112
+ for filename , lines in lines_by_file .items ():
113
113
if args .i and args .verbose :
114
- print 'Formatting' , filename
114
+ print ( 'Formatting' , filename )
115
115
command = base_command [:]
116
116
if args .i :
117
117
command .append ('-i' )
@@ -134,7 +134,7 @@ def main():
134
134
if not args .i :
135
135
with open (filename ) as f :
136
136
code = f .readlines ()
137
- formatted_code = StringIO .StringIO (stdout ).readlines ()
137
+ formatted_code = io .StringIO (stdout ).readlines ()
138
138
diff = difflib .unified_diff (code , formatted_code ,
139
139
filename , filename ,
140
140
'(before formatting)' , '(after formatting)' )
You can’t perform that action at this time.
0 commit comments