Skip to content

Commit 3f16427

Browse files
committed
util: rename for clarity
Signed-off-by: Vitor Bandeira <[email protected]>
1 parent ce533ab commit 3f16427

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

flow/util/genRuleFile.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,15 +311,15 @@ def gen_rule_file(
311311
else:
312312
rule_value = ceil(rule_value * 100) / 100.0
313313

314-
skip_metric = (
314+
preserve_old_rule = (
315315
True if len(include_metrics) > 0 and field not in include_metrics else False
316316
)
317-
can_compare = OLD_RULES is not None and field in OLD_RULES.keys()
317+
has_old_rule = OLD_RULES is not None and field in OLD_RULES.keys()
318318

319-
if can_compare and skip_metric:
319+
if has_old_rule and preserve_old_rule:
320320
rule_value = OLD_RULES[field]["value"]
321321

322-
if can_compare and not skip_metric:
322+
if has_old_rule and not preserve_old_rule:
323323
old_rule = OLD_RULES[field]
324324
if old_rule["compare"] != option["compare"]:
325325
print("[WARNING] Compare operator changed since last update.")

0 commit comments

Comments
 (0)