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

Function build_outdated_message

src/scancode/outdated.py:109–130  ·  view source on GitHub ↗

Return a message about outdated version for display.

(installed_version, release_date, newer_version='')

Source from the content-addressed store, hash-verified

107
108
109def build_outdated_message(installed_version, release_date, newer_version=''):
110 """
111 Return a message about outdated version for display.
112 """
113 rel_date, _, _ = release_date.isoformat().partition('T')
114
115 newer_version = newer_version or ''
116 newer_version = newer_version.strip()
117 if newer_version:
118 newer_version = f'{newer_version} '
119
120 msg = (
121 'WARNING: Outdated ScanCode Toolkit version! '
122 f'You are using an outdated version of ScanCode Toolkit: {installed_version} '
123 f'released on: {rel_date}. '
124 f'A new version {newer_version}is available with important '
125 f'improvements including bug and security fixes, updated license, '
126 f'copyright and package detection, and improved scanning accuracy. '
127 'Please download and install the latest version of ScanCode. '
128 'Visit https://github.com/nexB/scancode-toolkit/releases for details.'
129 )
130 return msg
131
132
133def check_scancode_version(

Callers 1

check_scancode_versionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected