From 21f172794ed6d5389572d8959a59313782b1faa0 Mon Sep 17 00:00:00 2001 From: Gilles Duboscq Date: Fri, 22 Sep 2023 16:44:27 +0200 Subject: [PATCH] Use `in` --- mx.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mx.py b/mx.py index 213ed954..69564d5b 100755 --- a/mx.py +++ b/mx.py @@ -15128,7 +15128,7 @@ def _registerDep(src, dst, edge): if args.graph_file: ext = get_file_extension(args.graph_file) - if ext == 'dot' or ext == '': + if ext in ('dot', ''): dot_file = args.graph_file else: known_formats = 'ps', 'pdf', 'svg', 'png', 'gif', 'jpg' @@ -15143,7 +15143,7 @@ def _registerDep(src, dst, edge): f.write('ranksep=1;\n') for src, dst, kind in edges: attributes = {} - if kind == DEP_BUILD or kind == DEP_ANNOTATION_PROCESSOR: + if kind in (DEP_BUILD, DEP_ANNOTATION_PROCESSOR): attributes['style'] = 'dashed' if kind == DEP_STANDARD: attributes['color'] = 'blue'