MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / __write_file

Method __write_file

scripts/dump_data.py:100–110  ·  view source on GitHub ↗
(self, data, filepath)

Source from the content-addressed store, hash-verified

98 self.__write_file(data, filepath)
99
100 def __write_file(self, data, filepath):
101 data_str = json.dumps(
102 data,
103 ensure_ascii=False,
104 cls=CustomEncoder,
105 indent=self.indent,
106 # We're handling sorting in customized encoder
107 sort_keys=False)
108 data_bytes = data_str.encode('utf8')
109 with open(filepath, 'wb') as f:
110 f.write(data_bytes)
111
112 def __secure_name(self, name):
113 """

Callers 1

writeMethod · 0.95

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected