Create nodes from key and return group name.
(self, key: str)
| 1997 | return group |
| 1998 | |
| 1999 | def _create_nodes_and_group(self, key: str) -> Node: |
| 2000 | """Create nodes from key and return group name.""" |
| 2001 | # assertion for mypy |
| 2002 | assert self._handle is not None |
| 2003 | |
| 2004 | paths = key.split("/") |
| 2005 | # recursively create the groups |
| 2006 | path = "/" |
| 2007 | for p in paths: |
| 2008 | if not len(p): |
| 2009 | continue |
| 2010 | new_path = path |
| 2011 | if not path.endswith("/"): |
| 2012 | new_path += "/" |
| 2013 | new_path += p |
| 2014 | group = self.get_node(new_path) |
| 2015 | if group is None: |
| 2016 | group = self._handle.create_group(path, p) |
| 2017 | path = new_path |
| 2018 | return group |
| 2019 | |
| 2020 | |
| 2021 | class TableIterator: |
no test coverage detected