MCPcopy Create free account
hub / github.com/comaps/comaps / read

Method read

tools/python/maps_generator/generator/env.py:78–85  ·  view source on GitHub ↗
(version_path: AnyStr)

Source from the content-addressed store, hash-verified

76
77 @staticmethod
78 def read(version_path: AnyStr) -> int:
79 with open(version_path) as f:
80 line = f.readline().strip()
81 try:
82 return int(line)
83 except ValueError:
84 logger.exception(f"Cast '{line}' to int error.")
85 return 0
86
87
88def find_last_build_dir(hint: Optional[AnyStr] = None) -> Optional[AnyStr]:

Callers 15

downloadMethod · 0.45
_get_tokenMethod · 0.45
read_fileMethod · 0.45
check_rawFunction · 0.45
check_androidFunction · 0.45
mainFunction · 0.45
download_fileFunction · 0.45
convertFunction · 0.45
convertMethod · 0.45
_read_versionMethod · 0.45
metadataMethod · 0.45
read_stringFunction · 0.45

Calls

no outgoing calls

Tested by 4

do_POSTMethod · 0.36
UNIT_TESTFunction · 0.36
loadFileFunction · 0.36
test_smokeMethod · 0.36