Skip to content

Commit

Permalink
fix(info): correct numbering logic
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjayankur31 committed Nov 8, 2024
1 parent dd57bf6 commit 57c666d
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions pyneuroml/utils/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,22 +151,19 @@ def summary(
pass

for attr, membs in nml2_doc_info.items():
if "members" in membs.keys():
num_members = len(membs["members"])
ctr = 0
for amemb in membs["members"]:
amemb_info = ""
num_members = len(membs["members"])
ctr = 0
for amemb in membs["members"]:
ctr += 1
if isinstance(amemb, str):
amemb_info += amemb
else:
amemb_info += amemb.info(
show_contents="set", return_format="string"
)
ctr += 1
if isinstance(amemb, str):
amemb_info += amemb
else:
amemb_info += amemb.info(
show_contents="set", return_format="string"
)
if len(amemb_info) > 0:
info += f"*** {attr} ({ctr}/{num_members}) ***\n\n{amemb_info}\n*** {attr} ({ctr}/{num_members}) ***\n\n"
else:
info += f"*** {attr} ***\n\n{membs}\n*** {attr} ***\n\n"

print(info)

Expand Down

0 comments on commit 57c666d

Please sign in to comment.