From 674e734a1cc1f3ea66b24d3fa490a01a94ed6d08 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 9 Aug 2023 18:59:03 +1000 Subject: [PATCH] drivers/display/lcd160cr: Use isinstance() for type checking. Fixes linter warning E721, expanded in Ruff 823 to include direct comparison against built-in types. --- micropython/drivers/display/lcd160cr/lcd160cr_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micropython/drivers/display/lcd160cr/lcd160cr_test.py b/micropython/drivers/display/lcd160cr/lcd160cr_test.py index 883c7d3b7..c717a3fd5 100644 --- a/micropython/drivers/display/lcd160cr/lcd160cr_test.py +++ b/micropython/drivers/display/lcd160cr/lcd160cr_test.py @@ -5,7 +5,7 @@ def get_lcd(lcd): - if type(lcd) is str: + if isinstance(lcd, str): lcd = lcd160cr.LCD160CR(lcd) return lcd