From 49d9d1b27ec7a8665358eecda4a5fe3fc91bbc4d Mon Sep 17 00:00:00 2001 From: mpenning Date: Fri, 13 Oct 2023 05:06:44 -0500 Subject: [PATCH] Add noqa --- ciscoconfparse/ccp_util.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ciscoconfparse/ccp_util.py b/ciscoconfparse/ccp_util.py index 472e0161..5f8b22d1 100644 --- a/ciscoconfparse/ccp_util.py +++ b/ciscoconfparse/ccp_util.py @@ -3475,7 +3475,8 @@ def as_list(self): """Return a list of sorted components; an empty string is automatically rejected. This method is tricky to test due to the requirement for the `.sort_list` attribute on all elements; avoid using the ordered nature of `as_list` and use `as_set`.""" try: [getattr(x, "sort_list") for x in self._list] - return [str(ii) for ii in sorted(list(set(self._list)) if ii != "", key=lambda x: x.sort_list, reverse=False)] + # Disable linter qa checks on this embedded list syntax... + return [str(ii) for ii in sorted(list(set(self._list)) if ii != "", key=lambda x: x.sort_list, reverse=False)] # noqa except AttributeError as eee: logger.error(eee) raise ListItemMissingAttribute(eee)