Skip to content

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

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

Merged
merged 3 commits into from
Oct 24, 2023
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
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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: [
Expand Down
4 changes: 3 additions & 1 deletion src/_pytask/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down