Skip to content

Commit

Permalink
Fix a goof in the warning infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
pgunn committed Dec 4, 2023
1 parent 92505b1 commit 9258508
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions caiman/source_extraction/cnmf/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -1140,11 +1140,10 @@ def change_params(self, params_dict, allow_legacy=True, warn_unused=True, verbos
cat_handle[paramkey] = params_dict[paramkey] # Do the update
if legacy_used:
logging.warning(f"In setting CNMFParams, non-pathed parameters were used; this is deprecated. allow_legacy will default to False, and then will be removed in future versions of Caiman")

# END
if warn_unused:
for toplevel_k in params_dict:
if toplevel_k not in consumed:
if toplevel_k not in consumed and toplevel_k not in list(self.__dict__.keys()):
logging.warning(f"In setting CNMFParams, provided toplevel key {toplevel_k} was unused. This is a bug!")
self.check_consistency()

Expand Down

0 comments on commit 9258508

Please sign in to comment.