From 4466c97f475f7913dd3f8a31bbe59c2028520927 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Thu, 23 Dec 2021 07:58:20 +0100 Subject: add Makefile and format with black --- cargo_check.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cargo_check.py') 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) -- cgit v1.2.3