MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / dump

Method dump

tests/cluecode/cluecode_test_utils.py:117–124  ·  view source on GitHub ↗

Dump a representation of self to a .yml data_file in YAML block format.

(self, check_exists=False)

Source from the content-addressed store, hash-verified

115 return saneyaml.dump(self.to_dict())
116
117 def dump(self, check_exists=False):
118 """
119 Dump a representation of self to a .yml data_file in YAML block format.
120 """
121 if check_exists and path.exists(self.data_file):
122 raise Exception(self.data_file)
123 with io.open(self.data_file, 'w', encoding='utf-8') as df:
124 df.write(self.dumps())
125
126
127COPYRIGHT_TEST_TEMPLATE ="""what:

Callers 8

check_yaml_scanFunction · 0.45
check_rdf_scanFunction · 0.45
check_cyclone_outputFunction · 0.45
check_text_linesFunction · 0.45
dumpsMethod · 0.45
closure_test_functionFunction · 0.45

Calls 4

dumpsMethod · 0.95
existsMethod · 0.45
openMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected