Skip to content

Commit

Permalink
Do not raise unused object warnings for subgroups
Browse files Browse the repository at this point in the history
  • Loading branch information
mstimberg committed Jun 4, 2024
1 parent 5ab61af commit 6fd792e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions brian2/groups/subgroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,8 @@ def __repr__(self):
f"<{classname} {self.name!r} of {self.source.name!r} "
f"from {self.start} to {self.stop}>"
)

def __del__(self):
# Do not raise a warning if the subgroup gets deleted (subgroups do not need
# to be part of a network to be useful)
pass

0 comments on commit 6fd792e

Please sign in to comment.