diff options
Diffstat (limited to 'cargo_check.py')
-rwxr-xr-x | cargo_check.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cargo_check.py b/cargo_check.py index 3350c56..0246881 100755 --- a/cargo_check.py +++ b/cargo_check.py @@ -15,6 +15,7 @@ with open('Cargo.toml') as f: version = info if isinstance(info, str) else info.get('version') tasks.append((name, version)) + def check_package(info): name, version = info res = sess.get('https://crates.io/api/v1/crates/{}'.format(name)) @@ -22,7 +23,12 @@ def check_package(info): if latest_version['yanked']: print(name, 'was yanked') elif not latest_version['num'].startswith(version): - print('{} is outdated ({}), {} is available'.format(name, version, latest_version['num'])) + print( + '{} is outdated ({}), {} is available'.format( + name, version, latest_version['num'] + ) + ) + pool = Pool() pool.map(check_package, tasks) |