Skip to content

Commit

Permalink
Do not set traitlet until the end
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim committed May 18, 2022
1 parent 17f542c commit 07270be
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def find_public_metadata(self, meta, primary_only=False):
del d[badkey]

if COMMENTCARD_KEY in meta:
self.has_comments = True
has_comments = True

def get_comment(key):
if key in meta[COMMENTCARD_KEY]._header:
Expand All @@ -84,7 +84,7 @@ def get_comment(key):
val = ''
return val
else:
self.has_comments = False
has_comments = False

def get_comment(key):
return ''
Expand All @@ -94,9 +94,9 @@ def get_comment(key):
if len(public_meta) > 0:
self.metadata = public_meta
self.has_metadata = True
self.has_comments = has_comments
else:
self.metadata = []
self.has_metadata = False
self.reset()


# TODO: If this is natively supported by asdf in the future, replace with native function.
Expand Down

0 comments on commit 07270be

Please sign in to comment.