Skip to content

Commit

Permalink
fix(config): do not turn keys of type set into list in update_config()
Browse files Browse the repository at this point in the history
This ensures that Config.paths_ignore is really a set. Making it easy to
merge other paths to ignore with it.
  • Loading branch information
agateau-gg authored and Jguer committed Oct 12, 2021
1 parent 5101734 commit 9ffb488
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ggshield/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ def update_config(self, **kwargs: Any) -> None:
if key in self.get_attributes_keys():
if isinstance(getattr(self, key), list):
getattr(self, key).extend(item)
elif isinstance(getattr(self, key), set):
getattr(self, key).update(item)
else:
setattr(self, key, item)
else:
Expand Down

0 comments on commit 9ffb488

Please sign in to comment.