Skip to content

Commit

Permalink
Forbid empty include/exclude combinations
Browse files Browse the repository at this point in the history
  • Loading branch information
druzsan committed Feb 7, 2024
1 parent 32ef104 commit d0056ef
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def assert_valid_extra(extra: Any) -> None:
f"Each include/exclude combination must a mapping (Python "
f"dict), but Python {type(combination)} received."
)
if not combination:
raise ValueError("Include/exclude combination contains no values.")
for variable, value in combination.items():
if not isinstance(variable, str):
raise TypeError(
Expand Down

0 comments on commit d0056ef

Please sign in to comment.