diff options
author | Martin Fischer <martin@push-f.com> | 2021-11-27 12:36:12 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-11-27 12:54:12 +0100 |
commit | e2aab0547ad4f4c6bcb2f288e54a8f93e054b7fb (patch) | |
tree | 2a79478414a646276d0f7090e716bdff488c5366 | |
parent | a650e9718e7d3e259324dd4a91a0c47061ef945f (diff) |
format with black -S
-rwxr-xr-x | build.py | 21 |
1 files changed, 13 insertions, 8 deletions
@@ -36,12 +36,14 @@ def get_features(dirname): elif 'impl_pr_id' in data: url = 'https://github.com/rust-lang/rust/pull/{}'.format(data['impl_pr_id']) elif 'stabilization_pr_id' in data: - url = 'https://github.com/rust-lang/rust/pull/{}'.format(data['stabilization_pr_id']) + url = 'https://github.com/rust-lang/rust/pull/{}'.format( + data['stabilization_pr_id'] + ) data['url'] = url data['filename'] = feat if data['title'].startswith('the '): - data['title'] = data['title'][len('the '):] + data['title'] = data['title'][len('the ') :] data['title'] = data['title'].replace('implementation', 'impl') if key in features: @@ -60,7 +62,9 @@ def get_features(dirname): features[key] = data - return dict(sorted(features.items(), key=lambda t: t[1]['title'].replace('`', '').lower())) + return dict( + sorted(features.items(), key=lambda t: t[1]['title'].replace('`', '').lower()) + ) with open('caniuse.rs/data/versions.toml') as f: @@ -82,10 +86,7 @@ shutil.copy('style.css', 'target') shutil.copy('script.js', 'target') with open('target/data.json', 'w') as f: - data = dict( - unstable = dict(features = unstable_features), - **versions - ) + data = dict(unstable=dict(features=unstable_features), **versions) json.dump(data, f) @@ -133,7 +134,11 @@ with open('target/index.html', 'w') as f: f.write('</h2>') if 'blog_post_path' in data: - f.write('<a class=release-notes href="https://blog.rust-lang.org/{}">{}</a>'.format(data['blog_post_path'], 'release notes')) + f.write( + '<a class=release-notes href="https://blog.rust-lang.org/{}">{}</a>'.format( + data['blog_post_path'], 'release notes' + ) + ) f.write('</div>') if 'features' in data: |