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

Method save

src/scancode/outdated.py:97–106  ·  view source on GitHub ↗
(self, latest_version, current_time)

Source from the content-addressed store, hash-verified

95 self.state = {}
96
97 def save(self, latest_version, current_time):
98 # Attempt to write out our version check file
99 with lockfile.FileLock(self.lockfile_path).locked(timeout=10):
100 state = {
101 'last_check': current_time.strftime(SELFCHECK_DATE_FMT),
102 'latest_version': latest_version,
103 }
104 with open(self.statefile_path, 'w') as statefile:
105 json.dump(state, statefile, sort_keys=True,
106 separators=(',', ':'))
107
108
109def build_outdated_message(installed_version, release_date, newer_version=''):

Callers 7

fetch_newer_versionFunction · 0.95
process_codebaseMethod · 0.45
process_codebaseMethod · 0.45
process_codebaseMethod · 0.45

Calls 3

lockedMethod · 0.80
strftimeMethod · 0.80
dumpMethod · 0.45

Tested by

no test coverage detected