From be2aac14f893ef116fec7311ab9d28b0eb82e2d6 Mon Sep 17 00:00:00 2001 From: Sourcery AI Date: Tue, 25 Apr 2023 20:30:27 +0000 Subject: [PATCH] 'Refactored by Sourcery' --- jax_pep503/build.py | 4 +--- jax_pep503/main.py | 8 ++++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/jax_pep503/build.py b/jax_pep503/build.py index fcee7fe..92d1c93 100644 --- a/jax_pep503/build.py +++ b/jax_pep503/build.py @@ -23,9 +23,7 @@ async def _build_index(html_dir: pathlib.Path = HTML_DIR): url_paths = ['/'] package_links = await get_package_links() - for package in package_links: - url_paths.append(f'/{package}/') - + url_paths.extend(f'/{package}/' for package in package_links) for url_path in url_paths: response = client.get(url_path) response.raise_for_status() diff --git a/jax_pep503/main.py b/jax_pep503/main.py index 33c46c6..ffc2345 100644 --- a/jax_pep503/main.py +++ b/jax_pep503/main.py @@ -35,10 +35,10 @@ async def get_package_links() -> _Links: - links = {} - for package_name in (await get_links()): - links[package_name] = {'href': f'{package_name}/'} - return links + return { + package_name: {'href': f'{package_name}/'} + for package_name in (await get_links()) + } async def get_package_release_links(package_name: str) -> _Links: