Skip to content

Commit

Permalink
Merge pull request #560 from eqcorrscan/party-init
Browse files Browse the repository at this point in the history
Force Party instantiation to be made from Families
  • Loading branch information
calum-chamberlain authored Dec 11, 2024
2 parents fa424aa + ca4ee54 commit 4e64935
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions eqcorrscan/core/match_filter/party.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ def __init__(self, families=None):
if isinstance(families, Family):
families = [families]
if families:
assert isinstance(families, list), \
"Families must be list of Family objects"
assert all(isinstance(f, Family) for f in families), \
"Families must be list of Family objects"
self.families.extend(families)

def __repr__(self):
Expand Down

0 comments on commit 4e64935

Please sign in to comment.