Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #3661

Merged
merged 2 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ repos:
- --py36-plus

- repo: https://github.com/crate-ci/typos
rev: dictgen-v0.3.1
rev: typos-dict-v0.12.4
hooks:
- id: typos

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.4
hooks:
- id: ruff
args: [ --fix ]
Expand Down
2 changes: 1 addition & 1 deletion conda_forge_tick/auto_tick.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def _handle_solvability_error(
<details>
<div align="left">
<pre>
{'</pre><pre>'.join(sorted(set(errors)))}
{"</pre><pre>".join(sorted(set(errors)))}
</pre>
</div>
</details>
Expand Down
2 changes: 1 addition & 1 deletion conda_forge_tick/lazy_json_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ def default(obj: Any) -> Any:
elif isinstance(obj, nx.DiGraph):
nld = nx.node_link_data(obj, edges="links")
links = nld["links"]
links2 = sorted(links, key=lambda x: f'{x["source"]}{x["target"]}')
links2 = sorted(links, key=lambda x: f"{x['source']}{x['target']}")
nld["links"] = links2
return {"__nx_digraph__": True, "node_link_data": nld}
raise TypeError(repr(obj) + " is not JSON serializable")
Expand Down
4 changes: 2 additions & 2 deletions conda_forge_tick/make_migrators.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,8 +830,8 @@ def initialize_migrators(
for m in migrators + pinning_migrators:
if isinstance(m, GraphMigrator):
print(
f' {getattr(m, "name", m)} graph size: '
f'{len(getattr(m, "graph", []))}',
f" {getattr(m, 'name', m)} graph size: "
f"{len(getattr(m, 'graph', []))}",
flush=True,
)

Expand Down
6 changes: 3 additions & 3 deletions conda_forge_tick/migrators/arch.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,9 @@ def __init__(
effective_graph=effective_graph,
)

assert (
not self.check_solvable
), "We don't want to check solvability for arm osx!"
assert not self.check_solvable, (
"We don't want to check solvability for arm osx!"
)
self.target_packages = target_packages
self.name = name

Expand Down
4 changes: 2 additions & 2 deletions conda_forge_tick/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@
try:
return _run(use_orig_cbc_path=True)
except (SystemExit, Exception):
logger.debug("parsing w/ conda_build_config.yaml failed! " "trying without...")
logger.debug("parsing w/ conda_build_config.yaml failed! trying without...")

Check warning on line 907 in conda_forge_tick/utils.py

View check run for this annotation

Codecov / codecov/patch

conda_forge_tick/utils.py#L907

Added line #L907 was not covered by tests
try:
return _run(use_orig_cbc_path=False)
except (SystemExit, Exception) as e:
Expand Down Expand Up @@ -1117,7 +1117,7 @@
def dump_graph_json(gx: nx.DiGraph, filename: str = "graph.json") -> None:
nld = nx.node_link_data(gx, edges="links")
links = nld["links"]
links2 = sorted(links, key=lambda x: f'{x["source"]}{x["target"]}')
links2 = sorted(links, key=lambda x: f"{x['source']}{x['target']}")

Check warning on line 1120 in conda_forge_tick/utils.py

View check run for this annotation

Codecov / codecov/patch

conda_forge_tick/utils.py#L1120

Added line #L1120 was not covered by tests
nld["links"] = links2

lzj = LazyJson(filename)
Expand Down
24 changes: 12 additions & 12 deletions tests/test_container_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,16 +318,16 @@
print(f"out: {captured.out}\nerr: {captured.err}")

if "git commit -m " in captured.err:
assert (
msg is not None
), f"msg: {msg}\nout: {captured.out}\nerr: {captured.err}"
assert msg.startswith(
"MNT:"
), f"msg: {msg}\nout: {captured.out}\nerr: {captured.err}"
assert msg is not None, (
f"msg: {msg}\nout: {captured.out}\nerr: {captured.err}"
)
assert msg.startswith("MNT:"), (
f"msg: {msg}\nout: {captured.out}\nerr: {captured.err}"
)
else:
assert (
msg is None
), f"msg: {msg}\nout: {captured.out}\nerr: {captured.err}"
assert msg is None, (

Check warning on line 328 in tests/test_container_tasks.py

View check run for this annotation

Codecov / codecov/patch

tests/test_container_tasks.py#L328

Added line #L328 was not covered by tests
f"msg: {msg}\nout: {captured.out}\nerr: {captured.err}"
)

with pushd(tmpdir_local):
subprocess.run(
Expand Down Expand Up @@ -377,9 +377,9 @@
rel_local_fnames = {
os.path.relpath(fname, tmpdir_local) for fname in local_fnames
}
assert (
rel_cont_fnames == rel_local_fnames
), f"{rel_cont_fnames} != {rel_local_fnames}"
assert rel_cont_fnames == rel_local_fnames, (
f"{rel_cont_fnames} != {rel_local_fnames}"
)

for cfname in cont_fnames:
lfname = os.path.join(tmpdir_local, os.path.relpath(cfname, tmpdir_cont))
Expand Down
2 changes: 1 addition & 1 deletion tests/test_matplotlib_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
old_pkg="matplotlib",
new_pkg="matplotlib-base",
rationale=(
"Unless you need `pyqt`, recipes should depend only on " "`matplotlib-base`."
"Unless you need `pyqt`, recipes should depend only on `matplotlib-base`."
),
pr_limit=5,
)
Expand Down
6 changes: 2 additions & 4 deletions tests/test_migrator_to_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,7 @@ def test_migrator_to_json_matplotlib_base():
old_pkg="matplotlib",
new_pkg="matplotlib-base",
rationale=(
"Unless you need `pyqt`, recipes should depend only on "
"`matplotlib-base`."
"Unless you need `pyqt`, recipes should depend only on `matplotlib-base`."
),
pr_limit=5,
)
Expand Down Expand Up @@ -193,8 +192,7 @@ def test_migrator_to_json_rebuild():
old_pkg="matplotlib",
new_pkg="matplotlib-base",
rationale=(
"Unless you need `pyqt`, recipes should depend only on "
"`matplotlib-base`."
"Unless you need `pyqt`, recipes should depend only on `matplotlib-base`."
),
pr_limit=5,
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_migrators.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ def test_yaml_migration_rebuild_no_buildno(tmpdir):
old_pkg="matplotlib",
new_pkg="matplotlib-base",
rationale=(
"Unless you need `pyqt`, recipes should depend only on " "`matplotlib-base`."
"Unless you need `pyqt`, recipes should depend only on `matplotlib-base`."
),
pr_limit=5,
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_migrators_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def test_yaml_migration_rebuild_no_buildno(tmpdir):
old_pkg="matplotlib",
new_pkg="matplotlib-base",
rationale=(
"Unless you need `pyqt`, recipes should depend only on " "`matplotlib-base`."
"Unless you need `pyqt`, recipes should depend only on `matplotlib-base`."
),
pr_limit=5,
)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_version_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ def test_version_noup(case, new_ver, tmpdir, caplog):
tmpdir=tmpdir,
)

assert "The recipe did not change in the version migration," in str(
assert "The recipe did not change in the version migration," in str(e.value), (
e.value
), e.value
)


def test_version_cupy(tmpdir, caplog):
Expand Down