From 247d40cf55d211f2790401013eee401d895cd6f0 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Mon, 2 Sep 2019 11:39:28 +0200 Subject: [PATCH] gen_isr_tables: Fix pylint warning by using isinstance() Fix this warning, as a preparation for a CI check: arch/common/gen_isr_tables.py:167:11: C0123: Using type() instead of isinstance() for a typecheck. (unidiomatic-typecheck) isinstance() has the advantage that it also handles inheritance, though it doesn't really matter here. It's more common at least. Signed-off-by: Ulf Magnusson --- arch/common/gen_isr_tables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/common/gen_isr_tables.py b/arch/common/gen_isr_tables.py index 232045fd40f..b3c1a1d9915 100755 --- a/arch/common/gen_isr_tables.py +++ b/arch/common/gen_isr_tables.py @@ -164,7 +164,7 @@ def write_source_file(fp, vt, swt, intlist, syms): for i in range(nv): param, func = swt[i] - if type(func) is int: + if isinstance(func, int): func_as_string = "{0:#x}".format(func) else: func_as_string = func