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

[ENH] Update error message printed on overlapping cycles to be more verbose #100

Merged
merged 3 commits into from
Aug 2, 2024
Merged
Changes from 2 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
5 changes: 3 additions & 2 deletions cycler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@
r_peek: dict[K, V] = next(iter(right)) if right is not None else {}
l_key: set[K] = set(l_peek.keys())
r_key: set[K] = set(r_peek.keys())
if l_key & r_key:
raise ValueError("Can not compose overlapping cycles")
if common_keys := l_key & r_key:
raise ValueError(f"Cannot compose overlapping cycles, duplicate key(s): {common_keys}")

Check failure on line 85 in cycler/__init__.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] reported by reviewdog 🐶 E501 line too long (95 > 88 characters) Raw Output: ./cycler/__init__.py:85:89: E501 line too long (95 > 88 characters)

return l_key | r_key


Expand Down
Loading