Skip to content

Commit

Permalink
fix: better error if requires is not a set
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Dec 22, 2023
1 parent 50ef410 commit a71e86b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/repo_review/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,11 @@ def process(
graph: dict[str, set[str]] = {
n: getattr(t, "requires", set()) for n, t in tasks.items()
}
for name, s in graph.items():
if not isinstance(s, set):
msg = f"requires must be a set, got {s!r} for {name!r}" # type: ignore[unreachable]
raise TypeError(msg)

# Keep track of which checks have been completed
completed: dict[str, str | None] = {}

Expand Down

0 comments on commit a71e86b

Please sign in to comment.