Skip to content

Commit

Permalink
Switch cast to set order to clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
phackstock committed Jan 22, 2024
1 parent 7cd2a82 commit 3071024
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nomenclature/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@

def convert_to_set(v: str | list[str] | set[str]) -> set[str]:
match v:
case str(v):
return {v}
case list(v):
return set(v)
case set(v):
return v
case list(v):
return set(v)
case str(v):
return {v}
case _:
raise TypeError("`repositories` must be of type str, list or set.")

Expand Down

0 comments on commit 3071024

Please sign in to comment.