From d8c2a9fdd508da4459d8df84b03737dc35cd46b3 Mon Sep 17 00:00:00 2001 From: John Readey Date: Fri, 1 Nov 2024 17:43:22 -0500 Subject: [PATCH] fix flake8 errors --- h5pyd/_hl/group.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/h5pyd/_hl/group.py b/h5pyd/_hl/group.py index 8801b56..c256c82 100644 --- a/h5pyd/_hl/group.py +++ b/h5pyd/_hl/group.py @@ -197,7 +197,7 @@ def _make_group(self, parent_id=None, parent_name=None, link=None): body["link"] = link_json self.log.debug(f"create group with body: {body}") rsp = self.POST('/groups', body=body) - + group_json = rsp groupId = GroupID(self, group_json) sub_group = Group(groupId) @@ -208,9 +208,8 @@ def _make_group(self, parent_id=None, parent_name=None, link=None): parent_name = parent_name + '/' + link self.log.debug(f"create group - parent name: {parent_name}") sub_group._name = parent_name - - return sub_group + return sub_group def create_group(self, h5path, track_order=False): """ Create and return a new subgroup. @@ -227,7 +226,7 @@ def create_group(self, h5path, track_order=False): sub_group = self._make_group() sub_group._track_order = track_order return sub_group - + if h5path[-1] == '/': raise ValueError("Invalid path for create_group") elif h5path[0] == '/': @@ -259,7 +258,7 @@ def create_group(self, h5path, track_order=False): sub_group = self._make_group(parent_id=parent_uuid, parent_name=parent_name, link=link) sub_group._track_order = track_order parent_uuid = sub_group.id.id - + else: # sub-group already exsits self.log.debug(f"create group - found subgroup: {link}")