Skip to content

Commit

Permalink
edtlib: re-appease the linter
Browse files Browse the repository at this point in the history
At some point in the past, we had to suppress a couple of false
positive pylint warnings to pass CI. But now the linter seems to have
figured out its original mistake and is complaining about a useless
supression. Sigh. Play along.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
  • Loading branch information
mbolivar-nordic committed Nov 2, 2022
1 parent ac9033a commit b30f4d7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions scripts/dts/python-devicetree/src/devicetree/edtlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,9 +818,7 @@ def flash_controller(self):
def spi_cs_gpio(self):
"See the class docstring"

# We know on_buses is always a list, but pylint doesn't.
# So ignore the error.
if not ("spi" in self.on_buses # pylint: disable=unsupported-membership-test
if not ("spi" in self.on_buses
and "cs-gpios" in self.bus_node.props):
return None

Expand Down Expand Up @@ -873,9 +871,7 @@ def _init_binding(self):
# works the same way in Zephyr as it does elsewhere.
binding = None

# We know on_buses is always a list, but pylint doesn't.
# So ignore the error.
for bus in on_buses: # pylint: disable=not-an-iterable
for bus in on_buses:
if (compat, bus) in self.edt._compat2binding:
binding = self.edt._compat2binding[compat, bus]
break
Expand Down

0 comments on commit b30f4d7

Please sign in to comment.