From 138a138b711d00d36987604f09985e594e2c9af3 Mon Sep 17 00:00:00 2001 From: Alex Nelson Date: Mon, 30 Jun 2025 10:21:23 -0400 Subject: [PATCH] Re-spell if-ladder This patch rearranges evalaution components to assist in understanding if-ladder coverage. No effects were observed on Make-managed files. Signed-off-by: Alex Nelson --- case_mapping/base.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/case_mapping/base.py b/case_mapping/base.py index 1664dfa..5b33670 100644 --- a/case_mapping/base.py +++ b/case_mapping/base.py @@ -61,12 +61,11 @@ def _append_stuff(self, key, *args, refs=False, objects=False): if len(args) == 1 and not args[0]: # True if no objects to append provided pass else: - if len(args) and self.get(key) is None: - self[key] = list() - elif len(args) and isinstance( - self[key], dict - ): # if single ref add it to list - self[key] = [self[key]] + if len(args): + if self.get(key) is None: + self[key] = list() + elif isinstance(self[key], dict): # if single ref add it to list + self[key] = [self[key]] for item in args: if isinstance(item, UcoThing): if refs: