mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
Upgrade to the latest Ruff version (#10433)
This commit is contained in:
parent
15ec830bea
commit
359ef288f8
4 changed files with 20 additions and 20 deletions
|
@ -443,9 +443,9 @@ class Poetry(Suite):
|
|||
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 @@ class Poetry(Suite):
|
|||
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 @@ class Poetry(Suite):
|
|||
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 @@ class Poetry(Suite):
|
|||
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(
|
||||
|
|
|
@ -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()"
|
||||
]
|
||||
},
|
||||
|
|
|
@ -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---"
|
||||
)
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue