MCPcopy Create free account
hub / github.com/dropbox/pyannotate / generate_annotations_json

Function generate_annotations_json

pyannotate_tools/annotations/main.py:73–78  ·  view source on GitHub ↗

Like generate_annotations_json_string() but writes JSON to a file.

(source_path, target_path, only_simple=False)

Source from the content-addressed store, hash-verified

71
72
73def generate_annotations_json(source_path, target_path, only_simple=False):
74 # type: (str, str, bool) -> None
75 """Like generate_annotations_json_string() but writes JSON to a file."""
76 results = generate_annotations_json_string(source_path, only_simple=only_simple)
77 with open(target_path, 'w') as f:
78 json.dump(results, f, sort_keys=True, indent=4)

Callers 2

test_generationMethod · 0.90
test_ambiguous_kindMethod · 0.90

Calls 1

Tested by 2

test_generationMethod · 0.72
test_ambiguous_kindMethod · 0.72