diff --git a/scripts/benchmark/src/benchmark/resolver.py b/scripts/benchmark/src/benchmark/resolver.py index 923a4c313722..54ae8471944a 100644 --- a/scripts/benchmark/src/benchmark/resolver.py +++ b/scripts/benchmark/src/benchmark/resolver.py @@ -443,9 +443,9 @@ def resolve_incremental( self.setup(requirements_file, cwd=cwd) poetry_lock = os.path.join(cwd, "poetry.lock") - assert not os.path.exists( - poetry_lock - ), f"Lockfile already exists at: {poetry_lock}" + assert not os.path.exists(poetry_lock), ( + f"Lockfile already exists at: {poetry_lock}" + ) # Run a resolution, to ensure that the lockfile exists. # TODO(charlie): Make this a `setup`. @@ -499,9 +499,9 @@ def resolve_noop(self, requirements_file: str, *, cwd: str) -> Command | None: self.setup(requirements_file, cwd=cwd) poetry_lock = os.path.join(cwd, "poetry.lock") - assert not os.path.exists( - poetry_lock - ), f"Lockfile already exists at: {poetry_lock}" + assert not os.path.exists(poetry_lock), ( + f"Lockfile already exists at: {poetry_lock}" + ) # Run a resolution, to ensure that the lockfile exists. # TODO(charlie): Make this a `setup`. @@ -536,9 +536,9 @@ def install_cold(self, requirements_file: str, *, cwd: str) -> Command | None: self.setup(requirements_file, cwd=cwd) poetry_lock = os.path.join(cwd, "poetry.lock") - assert not os.path.exists( - poetry_lock - ), f"Lockfile already exists at: {poetry_lock}" + assert not os.path.exists(poetry_lock), ( + f"Lockfile already exists at: {poetry_lock}" + ) # Run a resolution, to ensure that the lockfile exists. # TODO(charlie): Make this a `setup`. @@ -581,9 +581,9 @@ def install_warm(self, requirements_file: str, *, cwd: str) -> Command | None: self.setup(requirements_file, cwd=cwd) poetry_lock = os.path.join(cwd, "poetry.lock") - assert not os.path.exists( - poetry_lock - ), f"Lockfile already exists at: {poetry_lock}" + assert not os.path.exists(poetry_lock), ( + f"Lockfile already exists at: {poetry_lock}" + ) # Run a resolution, to ensure that the lockfile exists. subprocess.check_call( diff --git a/scripts/popular_packages/pypi_10k_most_dependents.ipynb b/scripts/popular_packages/pypi_10k_most_dependents.ipynb index 9dcf3c0d1b3c..6b9d401e68ca 100644 --- a/scripts/popular_packages/pypi_10k_most_dependents.ipynb +++ b/scripts/popular_packages/pypi_10k_most_dependents.ipynb @@ -37,7 +37,7 @@ " if i not in responses:\n", " # https://libraries.io/api#project-search\n", " sort = \"dependents_count\"\n", - " url = f\"https://libraries.io/api/search?platforms=Pypi&per_page=100&page={i+1}&sort{sort}&api_key={api_key}\"\n", + " url = f\"https://libraries.io/api/search?platforms=Pypi&per_page=100&page={i + 1}&sort{sort}&api_key={api_key}\"\n", " responses[i] = httpx.get(url, timeout=30.0).json()" ] }, diff --git a/scripts/publish/test_publish.py b/scripts/publish/test_publish.py index 55666274c1c7..f3f8e8d0fdb0 100644 --- a/scripts/publish/test_publish.py +++ b/scripts/publish/test_publish.py @@ -371,8 +371,8 @@ def publish_project(target: str, uv: Path, client: httpx.Client): ): raise RuntimeError( f"PyPI re-upload of the same files failed: " - f"{output.count("Uploading")} != {len(expected_filenames)}, " - f"{output.count("already exists")} != 0\n" + f"{output.count('Uploading')} != {len(expected_filenames)}, " + f"{output.count('already exists')} != 0\n" f"---\n{output}\n---" ) @@ -407,8 +407,8 @@ def publish_project(target: str, uv: Path, client: httpx.Client): ): raise RuntimeError( f"Re-upload with check URL failed: " - f"{output.count("Uploading")} != 0, " - f"{output.count("already exists")} != {len(expected_filenames)}\n" + f"{output.count('Uploading')} != 0, " + f"{output.count('already exists')} != {len(expected_filenames)}\n" f"---\n{output}\n---" ) diff --git a/scripts/scenarios/generate.py b/scripts/scenarios/generate.py index 6b9c4e462115..d6db67eeb354 100755 --- a/scripts/scenarios/generate.py +++ b/scripts/scenarios/generate.py @@ -269,9 +269,9 @@ def update_common_mod_rs(packse_version: str): url_matcher = re.compile( re.escape(before_version) + '[^"]+' + re.escape(after_version) ) - assert ( - len(url_matcher.findall(test_common)) == 1 - ), f"PACKSE_VERSION not found in {TESTS_COMMON_MOD_RS}" + assert len(url_matcher.findall(test_common)) == 1, ( + f"PACKSE_VERSION not found in {TESTS_COMMON_MOD_RS}" + ) test_common = url_matcher.sub(build_vendor_links_url, test_common) TESTS_COMMON_MOD_RS.write_text(test_common)