kopia lustrzana https://github.com/micropython/micropython-lib
drivers/display/lcd160cr: Use isinstance() for type checking.
Fixes linter warning E721, expanded in Ruff 823 to include direct comparison against built-in types.pull/713/head
rodzic
01ab7ba6e2
commit
674e734a1c
|
@ -5,7 +5,7 @@ import time, math, framebuf, lcd160cr
|
||||||
|
|
||||||
|
|
||||||
def get_lcd(lcd):
|
def get_lcd(lcd):
|
||||||
if type(lcd) is str:
|
if isinstance(lcd, str):
|
||||||
lcd = lcd160cr.LCD160CR(lcd)
|
lcd = lcd160cr.LCD160CR(lcd)
|
||||||
return lcd
|
return lcd
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue