Skip to content

Commit

Permalink
remove checks for ignored keys by moving dict pops
Browse files Browse the repository at this point in the history
  • Loading branch information
mpound committed Jan 7, 2025
1 parent 04f92fe commit 81131e6
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/dysh/util/selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,12 @@ def _check_keys(self, keys):
If one or more keywords are unrecognized
"""
ignorekeys = ["PROPOSED_CHANNEL_RULE"]
# ignorekeys = ["PROPOSED_CHANNEL_RULE"]
unrecognized = []
ku = [k.upper() for k in keys]
for k in ignorekeys:
if k in ku:
ku.remove(k)
# for k in ignorekeys:
# if k in ku:
# ku.remove(k)
for k in ku:
if k not in self and k not in self._aliases:
unrecognized.append(k)
Expand Down Expand Up @@ -519,12 +519,14 @@ def _base_select(self, tag=None, **kwargs):
True if the selection resulted in a new fule, False if not (no data selected)
"""
self._check_keys(kwargs.keys())
row = {}
# pop these before check_keys, which is intended to check SDFITS keywords
proposed_channel_rule = kwargs.pop("proposed_channel_rule", None)
# if called via _select_from_mixed_kwargs, then we want to merge all the
# selections
df = kwargs.pop("startframe", self)
proposed_channel_rule = kwargs.pop("proposed_channel_rule", None)
self._check_keys(kwargs.keys())
row = {}

single_value_queries = None
multi_value_queries = None
for k, v in list(kwargs.items()):
Expand Down

0 comments on commit 81131e6

Please sign in to comment.