From ad8ac7469bd577dcc19849ac6e76dcd5914c0006 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 3 Sep 2019 14:17:54 +0200 Subject: [PATCH] x86: gen_idt.py: Simplify test with 'not in' Getting slightly subjective, but fixes this pylint warning: arch/x86/gen_idt.py:281:11: R1714: Consider merging these comparisons with "in" to 'handler not in (spur_code, spur_nocode)' (consider-using-in) Getting rid of pylint warnings for a CI check. I could disable any controversial ones (it's already a list of warnings to enable anyway). Signed-off-by: Ulf Magnusson --- arch/x86/gen_idt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/gen_idt.py b/arch/x86/gen_idt.py index 9ef4fbc9d31..f668ce8ac8f 100755 --- a/arch/x86/gen_idt.py +++ b/arch/x86/gen_idt.py @@ -277,7 +277,7 @@ def create_irq_vectors_allocated(vectors, spur_code, spur_nocode, filename): vbits = [0 for i in range(num_chars)] for i in range(len(vectors)): handler, _, _ = vectors[i] - if handler != spur_code and handler != spur_nocode: + if handler not in (spur_code, spur_nocode): continue vbit_index = i // 8