Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#3661)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/crate-ci/typos: dictgen-v0.3.1 → typos-dict-v0.12.4](crate-ci/typos@dictgen-v0.3.1...typos-dict-v0.12.4)
- [github.com/astral-sh/ruff-pre-commit: v0.8.6 → v0.9.4](astral-sh/ruff-pre-commit@v0.8.6...v0.9.4)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Feb 3, 2025
1 parent 5fc1181 commit a7a13de
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 32 deletions.
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 @@ def filter(self, record):
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...")
try:
return _run(use_orig_cbc_path=False)
except (SystemExit, Exception) as e:
Expand Down Expand Up @@ -1117,7 +1117,7 @@ def pluck(G: nx.DiGraph, node_id: Any) -> None:
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']}")
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 @@ def test_container_tasks_rerender_feedstock_containerized_same_as_local(
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, (
f"msg: {msg}\nout: {captured.out}\nerr: {captured.err}"
)

with pushd(tmpdir_local):
subprocess.run(
Expand Down Expand Up @@ -377,9 +377,9 @@ def test_container_tasks_rerender_feedstock_containerized_same_as_local(
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

0 comments on commit a7a13de

Please sign in to comment.