Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 3, 2025
1 parent 3c6ad2a commit 99f2dc2
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 23 deletions.
2 changes: 0 additions & 2 deletions conda_forge_webservices/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,6 @@ def pr_detailed_comment(
except Exception as _git_try_err:
if _git_try_num == NUM_GIT_CLONE_TRIES - 1:
raise _git_try_err
else:
pass
else:
break

Expand Down
3 changes: 1 addition & 2 deletions conda_forge_webservices/feedstock_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,7 @@ def comment_on_outputs_copy(feedstock, git_sha, errors, valid, copied):
if issue is None:
if git_sha is not None:
issue = repo.create_issue(
"[warning] failed package validation "
f"and/or copy for commit {git_sha}",
f"[warning] failed package validation and/or copy for commit {git_sha}",
body=message,
)
else:
Expand Down
18 changes: 9 additions & 9 deletions conda_forge_webservices/tests/linting/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def test_cli_skip_ci(skip_if_no_tokens, skip_if_linting_via_gha):
child = subprocess.Popen(
[
sys.executable,
"-m" "conda_forge_webservices.linting",
"-mconda_forge_webservices.linting",
"conda-forge/conda-forge-webservices",
"58",
"--enable-commenting",
Expand All @@ -23,7 +23,7 @@ def test_cli_success_bad(skip_if_no_tokens, skip_if_linting_via_gha):
child = subprocess.Popen(
[
sys.executable,
"-m" "conda_forge_webservices.linting",
"-mconda_forge_webservices.linting",
"conda-forge/conda-forge-webservices",
"17",
"--enable-commenting",
Expand All @@ -39,7 +39,7 @@ def test_cli_success_ok_above_ignored_good(skip_if_no_tokens, skip_if_linting_vi
child = subprocess.Popen(
[
sys.executable,
"-m" "conda_forge_webservices.linting",
"-mconda_forge_webservices.linting",
"conda-forge/conda-forge-webservices",
"54",
"--enable-commenting",
Expand All @@ -56,7 +56,7 @@ def test_cli_success_ok_beside_ignored_good(skip_if_no_tokens, skip_if_linting_v
child = subprocess.Popen(
[
sys.executable,
"-m" "conda_forge_webservices.linting",
"-mconda_forge_webservices.linting",
"conda-forge/conda-forge-webservices",
"62",
"--enable-commenting",
Expand All @@ -73,7 +73,7 @@ def test_cli_success_conflict_ok(skip_if_no_tokens, skip_if_linting_via_gha):
child = subprocess.Popen(
[
sys.executable,
"-m" "conda_forge_webservices.linting",
"-mconda_forge_webservices.linting",
"conda-forge/conda-forge-webservices",
"56",
"--enable-commenting",
Expand All @@ -89,7 +89,7 @@ def test_cli_success_conflict_2_ok(skip_if_no_tokens, skip_if_linting_via_gha):
child = subprocess.Popen(
[
sys.executable,
"-m" "conda_forge_webservices.linting",
"-mconda_forge_webservices.linting",
"conda-forge/conda-forge-webservices",
"57",
"--enable-commenting",
Expand All @@ -105,7 +105,7 @@ def test_cli_success_good(skip_if_no_tokens, skip_if_linting_via_gha):
child = subprocess.Popen(
[
sys.executable,
"-m" "conda_forge_webservices.linting",
"-mconda_forge_webservices.linting",
"conda-forge/conda-forge-webservices",
"16",
"--enable-commenting",
Expand All @@ -121,7 +121,7 @@ def test_cli_success_no_recipe(skip_if_no_tokens, skip_if_linting_via_gha):
child = subprocess.Popen(
[
sys.executable,
"-m" "conda_forge_webservices.linting",
"-mconda_forge_webservices.linting",
"conda-forge/conda-forge-webservices",
"523",
"--enable-commenting",
Expand All @@ -137,7 +137,7 @@ def test_cli_success_v1_recipe(skip_if_no_tokens, skip_if_linting_via_gha):
child = subprocess.Popen(
[
sys.executable,
"-m" "conda_forge_webservices.linting",
"-mconda_forge_webservices.linting",
"conda-forge/conda-forge-webservices",
"632",
"--enable-commenting",
Expand Down
4 changes: 2 additions & 2 deletions conda_forge_webservices/tests/test_feedstock_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ def test_validate_feedstock_outputs_badoutputhash(valid_out, valid_hash):
}
assert len(errs) == 4
assert (
"output noarch/b-0.1-py_0.conda not allowed for " "conda-forge/bar-feedstock"
"output noarch/b-0.1-py_0.conda not allowed for conda-forge/bar-feedstock"
) in errs
assert (
"output noarch/d-0.1-py_0.conda not allowed for " "conda-forge/bar-feedstock"
"output noarch/d-0.1-py_0.conda not allowed for conda-forge/bar-feedstock"
) in errs
assert "output noarch/a-0.1-py_0.conda does not have a valid md5 checksum" in errs
assert "output noarch/d-0.1-py_0.conda does not have a valid md5 checksum" in errs
Expand Down
2 changes: 1 addition & 1 deletion conda_forge_webservices/tests/test_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_github_app_tokens_for_webservices(token_repo):

msg = with_action_url("[ci skip] test webservices app token can commit")
subprocess.run(
f"cd {tmpdir}/{repo} && " f"git commit -m '{msg}' " "--allow-empty",
f"cd {tmpdir}/{repo} && git commit -m '{msg}' --allow-empty",
shell=True,
check=True,
)
Expand Down
6 changes: 3 additions & 3 deletions conda_forge_webservices/tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,9 @@ def generate_app_token_for_feedstock(app_id, raw_pem, repo, readonly=False):
)

assert gh_token_data.permissions == permissions, gh_token_data.permissions
assert (
gh_token_data.repository_selection == "selected"
), gh_token_data.repository_selection
assert gh_token_data.repository_selection == "selected", (
gh_token_data.repository_selection
)
returned_repos = set(
rp["name"] for rp in gh_token_data.raw_data["repositories"]
)
Expand Down
2 changes: 1 addition & 1 deletion scripts/test_cfep13_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
)

OUTPUTS_REPO = (
"https://x-access-token:${GH_TOKEN}@github.com/conda-forge/" "feedstock-outputs.git"
"https://x-access-token:${GH_TOKEN}@github.com/conda-forge/feedstock-outputs.git"
)

try:
Expand Down
2 changes: 1 addition & 1 deletion scripts/test_cfep13_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from conda_forge_webservices.utils import pushd, with_action_url

OUTPUTS_REPO = (
"https://x-access-token:${GH_TOKEN}@github.com/conda-forge" "/feedstock-outputs.git"
"https://x-access-token:${GH_TOKEN}@github.com/conda-forge/feedstock-outputs.git"
)

try:
Expand Down
3 changes: 1 addition & 2 deletions tests/test_live_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
523,
"failure",
[
"I was trying to look for recipes to lint for "
"you, but couldn't find any.",
"I was trying to look for recipes to lint for you, but couldn't find any.",
],
),
(
Expand Down

0 comments on commit 99f2dc2

Please sign in to comment.