diff options
-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: |