From 3e40372e180dc19a90526812d190dbf8f6b388d8 Mon Sep 17 00:00:00 2001 From: wpbonelli Date: Thu, 16 Jan 2025 20:15:49 -0500 Subject: [PATCH] remove pdb line --- modflow_devtools/dfn.py | 2 -- modflow_devtools/misc.py | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/modflow_devtools/dfn.py b/modflow_devtools/dfn.py index 2b3fed5..cd31aea 100644 --- a/modflow_devtools/dfn.py +++ b/modflow_devtools/dfn.py @@ -397,8 +397,6 @@ def _fields() -> Vars: if not var.get("in_record", False) } - # import pdb; pdb.set_trace() - # group variables by block blocks = { name: {v["name"]: v for v in block} diff --git a/modflow_devtools/misc.py b/modflow_devtools/misc.py index 586a958..271394b 100644 --- a/modflow_devtools/misc.py +++ b/modflow_devtools/misc.py @@ -554,8 +554,9 @@ def set_env(*remove, **update): def filter_recursive(d: Any, pred: Callable) -> Any: """ - If the object is a mapping, recursively drop any, - `None` values, otherwise return it unchanged. + If the object is a mapping, recursively apply + the predicate, keeping passing entries. Return + other objects unchanged. """ if isinstance(d, Mapping): return {k: filter_recursive(v, pred) for k, v in d.items() if pred(v)}