diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e6598bf7..91362ac1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -44,15 +44,15 @@ repos: hooks: - id: sort-all - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 23.10.0 hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.292 + rev: v0.1.1 hooks: - id: ruff - repo: https://github.com/dosisod/refurb - rev: v1.21.0 + rev: v1.22.1 hooks: - id: refurb args: [--ignore, FURB126] @@ -63,7 +63,7 @@ repos: args: [-v, --fail-under=75] exclude: ^(tests/|docs/|scripts/|docs_src/) - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.6.0 + rev: v1.6.1 hooks: - id: mypy additional_dependencies: [ diff --git a/src/_pytask/dag.py b/src/_pytask/dag.py index 758a7f1c..07953838 100644 --- a/src/_pytask/dag.py +++ b/src/_pytask/dag.py @@ -204,7 +204,9 @@ def _check_if_dag_has_cycles(dag: nx.DiGraph) -> None: def _format_cycles(cycles: list[tuple[str, ...]]) -> str: """Format cycles as a paths connected by arrows.""" - chain = [x for i, x in enumerate(itertools.chain(*cycles)) if i % 2 == 0] + chain = [ + x for i, x in enumerate(itertools.chain.from_iterable(cycles)) if i % 2 == 0 + ] chain += [cycles[-1][1]] lines = chain[:1]