Skip to content

Commit

Permalink
Update chip.py
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnohj authored Aug 8, 2024
1 parent f9016dc commit 7a20c35
Showing 1 changed file with 29 additions and 33 deletions.
62 changes: 29 additions & 33 deletions adafruit_platformdetect/chip.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,41 +109,37 @@ def id(
product = dev["product_id"]
# NOTE: If any products are added here, they need added
# to _rp2040_u2if_id() in board.py as well.
# pylint: disable=too-many-boolean-expressions
if (
(
# Raspberry Pi Pico
vendor == 0xCAFE
and product == 0x4005
# Raspberry Pi Pico

Check failure on line 113 in adafruit_platformdetect/chip.py

View workflow job for this annotation

GitHub Actions / test

Too many boolean expressions in if statement (6/5)
vendor == 0xCAFE
and product == 0x4005
) or (
# Waveshare RP2040 One
vendor == 0x2E8A
and product == 0x103A
) or (
# Feather RP2040
# Itsy Bitsy RP2040
# QT Py RP2040
# QT2040 Trinkey
# MacroPad RP2040
# Feather RP2040 ThinkInk
# Feather RP2040 RFM
# Feather RP2040 CAN Bus
vendor == 0x239A
and product
in (
0x00F1,
0x00FD,
0x00F7,
0x0109,
0x0107,
0x812C,
0x812E,
0x8130,
0x0105,
)
or (
# Waveshare RP2040 One
vendor == 0x2E8A
and product == 0x103A
)
or (
# Feather RP2040
# Itsy Bitsy RP2040
# QT Py RP2040
# QT2040 Trinkey
# MacroPad RP2040
# Feather RP2040 ThinkInk
# Feather RP2040 RFM
# Feather RP2040 CAN Bus
vendor == 0x239A
and product
in (
0x00F1,
0x00FD,
0x00F7,
0x0109,
0x0107,
0x812C,
0x812E,
0x8130,
0x0105,
)
):
):
self._chip_id = chips.RP2040_U2IF
return self._chip_id
raise RuntimeError(
Expand Down

0 comments on commit 7a20c35

Please sign in to comment.