Skip to content

Commit

Permalink
chore: improve commentary in datagrabber.utils
Browse files Browse the repository at this point in the history
  • Loading branch information
synchon committed Jul 13, 2023
1 parent d0c3439 commit 81540c5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions junifer/datagrabber/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ def validate_patterns(types: List[str], patterns: Dict[str, str]) -> None:
msg="Length of `types` more than that of `patterns`.",
klass=ValueError,
)

# Missing type in patterns
if any(x not in patterns for x in types):
raise_error(
msg="`patterns` must contain all `types`", klass=ValueError
)

# Wildcard check in patterns
if any("}*" in pattern for pattern in patterns.values()):
raise_error(
msg="`patterns` must not contain `*` following a replacement",
Expand Down

0 comments on commit 81540c5

Please sign in to comment.