Skip to content

Commit

Permalink
try
Browse files Browse the repository at this point in the history
  • Loading branch information
mavaylon1 committed Nov 6, 2023
1 parent ca05060 commit c454c6e
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/hdmf/common/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,11 +281,14 @@ def __gather_columns(cls, name, bases, classdict):
if len(bases) and 'DynamicTable' in globals():
for item in bases[::-1]: # reverse the bases tuple as the code suggest it should be last
if issubclass(item, Container):
if item.__columns__ is not cls.__columns__:
new_columns = list(cls.__columns__)
new_columns[0:0] = item.__columns__ # prepend superclass columns to new_columns
cls.__columns__ = tuple(new_columns)
break
try:
if item.__columns__ is not cls.__columns__:
new_columns = list(cls.__columns__)
new_columns[0:0] = item.__columns__ # prepend superclass columns to new_columns
cls.__columns__ = tuple(new_columns)
break
except AttributeError: # raises error when "__columns__" is not an attr of item
continue

@docval({'name': 'name', 'type': str, 'doc': 'the name of this table'}, # noqa: C901
{'name': 'description', 'type': str, 'doc': 'a description of what is in this table'},
Expand Down

0 comments on commit c454c6e

Please sign in to comment.