Skip to content

Commit

Permalink
Clean up default filter dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
CoreySpohn committed Dec 12, 2024
1 parent 3a16bd9 commit 4e38bb3
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions EXOSIMS/Prototypes/TargetList.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ def __init__(

# Set up optional filters
default_filters = {
"outside_IWA_filter": {"enabled": True, "params": {}},
"completeness_filter": {"enabled": True, "params": {}},
"outside_IWA_filter": {"enabled": True},
"completeness_filter": {"enabled": True},
}
# Add the binary filter to the default optional filters
if optional_filters.get("binary_filter"):
Expand All @@ -379,12 +379,10 @@ def __init__(
f"Using binary_filter value of {optional_filters.get('enabled')}."
)
else:
default_filters["binary_filter"] = {
"enabled": self.filterBinaries,
"params": {},
}
# Add the provided optional filters to the default filters and then
# save the combined dictionary as a class attribute
default_filters["binary_filter"] = {"enabled": self.filterBinaries}
# Add the provided optional filters to the default filters, overriding
# the defaults if necessary, and then save the combined dictionary as a
# class attribute
default_filters.update(optional_filters)
self.optional_filters = default_filters

Expand Down

0 comments on commit 4e38bb3

Please sign in to comment.