From 508f50fbdd5c08a1e318c688a7d7167bac4a2870 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 25 Jul 2021 12:04:58 +0300 Subject: [PATCH] aedi: simplify condition in target filter for cmake modules --- aedi/target/base.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/aedi/target/base.py b/aedi/target/base.py index 258eb075..4c88396d 100644 --- a/aedi/target/base.py +++ b/aedi/target/base.py @@ -469,11 +469,8 @@ class CMakeStaticDependencyTarget(CMakeTarget): for regex in import_regexes: match = regex.match(line) - if not match: - continue - else: - if match.group('target') != target: - return None + if match and match.group('target') != target: + return None return line