Skip to content

Commit

Permalink
Use more_itertools to iterable over args of set/getitem in config
Browse files Browse the repository at this point in the history
This fixes yt-project#3155
  • Loading branch information
cphyc committed Mar 29, 2021
1 parent 5aa1c29 commit 021c387
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yt/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ def set(self, *args, metadata=None):
)

def __setitem__(self, args, value):
section, *keys = args
section, *keys = always_iterable(args)
self.set(section, *keys, value, metadata=None)

def __getitem__(self, key):
section, *keys = key
section, *keys = always_iterable(key)
return self.get(section, *keys)

def remove(self, *args):
Expand Down

0 comments on commit 021c387

Please sign in to comment.