Run yapf on all python files in the repo
Signed-off-by: Ravago Jones <ravagojones@gmail.com>
Change-Id: I221e04c3f517fab8535b22551553799e0fee7a80
diff --git a/tools/actions/generate_compile_command.py b/tools/actions/generate_compile_command.py
index b41f2fc..6f10e09 100755
--- a/tools/actions/generate_compile_command.py
+++ b/tools/actions/generate_compile_command.py
@@ -5,23 +5,26 @@
import third_party.bazel.protos.extra_actions_base_pb2 as extra_actions_base_pb2
+
def _get_cpp_command(cpp_compile_info):
- compiler = cpp_compile_info.tool
- options = ' '.join(cpp_compile_info.compiler_option)
- source = cpp_compile_info.source_file
- output = cpp_compile_info.output_file
- return '%s %s -c %s -o %s' % (compiler, options, source, output), source
+ compiler = cpp_compile_info.tool
+ options = ' '.join(cpp_compile_info.compiler_option)
+ source = cpp_compile_info.source_file
+ output = cpp_compile_info.output_file
+ return '%s %s -c %s -o %s' % (compiler, options, source, output), source
+
def main(argv):
- action = extra_actions_base_pb2.ExtraActionInfo()
- with open(argv[1], 'rb') as f:
- action.MergeFromString(f.read())
- command, source_file = _get_cpp_command(
- action.Extensions[extra_actions_base_pb2.CppCompileInfo.cpp_compile_info])
- with open(argv[2], 'w') as f:
- f.write(command)
- f.write('\0')
- f.write(source_file)
+ action = extra_actions_base_pb2.ExtraActionInfo()
+ with open(argv[1], 'rb') as f:
+ action.MergeFromString(f.read())
+ command, source_file = _get_cpp_command(action.Extensions[
+ extra_actions_base_pb2.CppCompileInfo.cpp_compile_info])
+ with open(argv[2], 'w') as f:
+ f.write(command)
+ f.write('\0')
+ f.write(source_file)
+
if __name__ == '__main__':
- sys.exit(main(sys.argv))
+ sys.exit(main(sys.argv))