diff options
author | iaz1607 <iaz1607@yandex-team.com> | 2023-11-30 12:16:39 +0300 |
---|---|---|
committer | iaz1607 <iaz1607@yandex-team.com> | 2023-11-30 12:56:46 +0300 |
commit | 8951ddf780e02616cdb2ec54a02bc354e8507c0f (patch) | |
tree | 478097488957d3b554e25868c972a959bb40d78e /build/scripts/gen_java_codenav_entry.py | |
parent | a5acb7aa4ca5a4603215e878eb0cad786793262b (diff) | |
download | ydb-8951ddf780e02616cdb2ec54a02bc354e8507c0f.tar.gz |
`build/scripts` ya style --py
Diffstat (limited to 'build/scripts/gen_java_codenav_entry.py')
-rw-r--r-- | build/scripts/gen_java_codenav_entry.py | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/build/scripts/gen_java_codenav_entry.py b/build/scripts/gen_java_codenav_entry.py index ff0a5c737d..2959dc4843 100644 --- a/build/scripts/gen_java_codenav_entry.py +++ b/build/scripts/gen_java_codenav_entry.py @@ -22,26 +22,43 @@ def just_do_it(java, kythe, kythe_to_proto, out_name, binding_only, kindexes): for kindex in kindex_inputs: print >> sys.stderr, '[INFO] Processing:', kindex indexer_start = datetime.datetime.now() - p = subprocess.Popen([java, '-jar', os.path.join(kythe, 'indexers/java_indexer.jar'), kindex], stdout=subprocess.PIPE) + p = subprocess.Popen( + [java, '-jar', os.path.join(kythe, 'indexers/java_indexer.jar'), kindex], stdout=subprocess.PIPE + ) indexer_out, _ = p.communicate() - print >> sys.stderr, '[INFO] Indexer execution time:', (datetime.datetime.now() - indexer_start).total_seconds(), 'seconds' + print >> sys.stderr, '[INFO] Indexer execution time:', ( + datetime.datetime.now() - indexer_start + ).total_seconds(), 'seconds' if p.returncode: raise Exception('java_indexer failed with exit code {}'.format(p.returncode)) dedup_start = datetime.datetime.now() p = subprocess.Popen([os.path.join(kythe, 'tools/dedup_stream')], stdin=subprocess.PIPE, stdout=subprocess.PIPE) dedup_out, _ = p.communicate(indexer_out) - print >> sys.stderr, '[INFO] Dedup execution time:', (datetime.datetime.now() - dedup_start).total_seconds(), 'seconds' + print >> sys.stderr, '[INFO] Dedup execution time:', ( + datetime.datetime.now() - dedup_start + ).total_seconds(), 'seconds' if p.returncode: raise Exception('dedup_stream failed with exit code {}'.format(p.returncode)) entrystream_start = datetime.datetime.now() - p = subprocess.Popen([os.path.join(kythe, 'tools/entrystream'), '--write_json'], stdin=subprocess.PIPE, stdout=open(temp_out_name, 'a')) + p = subprocess.Popen( + [os.path.join(kythe, 'tools/entrystream'), '--write_json'], + stdin=subprocess.PIPE, + stdout=open(temp_out_name, 'a'), + ) p.communicate(dedup_out) if p.returncode: raise Exception('entrystream failed with exit code {}'.format(p.returncode)) - print >> sys.stderr, '[INFO] Entrystream execution time:', (datetime.datetime.now() - entrystream_start).total_seconds(), 'seconds' + print >> sys.stderr, '[INFO] Entrystream execution time:', ( + datetime.datetime.now() - entrystream_start + ).total_seconds(), 'seconds' preprocess_start = datetime.datetime.now() - subprocess.check_call([kythe_to_proto, '--preprocess-entry', '--entries', temp_out_name, '--out', out_name] + (['--only-binding-data'] if binding_only else [])) - print >> sys.stderr, '[INFO] Preprocessing execution time:', (datetime.datetime.now() - preprocess_start).total_seconds(), 'seconds' + subprocess.check_call( + [kythe_to_proto, '--preprocess-entry', '--entries', temp_out_name, '--out', out_name] + + (['--only-binding-data'] if binding_only else []) + ) + print >> sys.stderr, '[INFO] Preprocessing execution time:', ( + datetime.datetime.now() - preprocess_start + ).total_seconds(), 'seconds' print >> sys.stderr, '[INFO] Total execution time:', (datetime.datetime.now() - start).total_seconds(), 'seconds' |