Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 13, 2023
1 parent 39ba056 commit 66ff624
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions xarray/backends/netCDF4_.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,13 +438,19 @@ def get_encoding(self):
}

def get_group_stores(self):
return FrozenDict((group_name, self.select_group(group_name)) for group_name in self.ds.groups)
return FrozenDict(
(group_name, self.select_group(group_name)) for group_name in self.ds.groups
)

def select_group(self, group):
"""Return new NetCDF4DataStore for specified group of this NetCDF4DataStore."""
if group in self.ds.groups:
return self.__init__(
manager=self._manager, group=group, mode=self._mode, lock=self.lock, autoclose=self.autoclose
manager=self._manager,
group=group,
mode=self._mode,
lock=self.lock,
autoclose=self.autoclose,
)
else:
raise KeyError(group)
Expand Down

0 comments on commit 66ff624

Please sign in to comment.