The following issues were found
tests/pyb/accel.py
2 issues
Line: 1
Column: 1
import pyb
if not hasattr(pyb, "Accel"):
print("SKIP")
raise SystemExit
accel = pyb.Accel()
print(accel)
accel.x()
Reported by Pylint.
Line: 1
Column: 1
import pyb
if not hasattr(pyb, "Accel"):
print("SKIP")
raise SystemExit
accel = pyb.Accel()
print(accel)
accel.x()
Reported by Pylint.
tests/pyb/adcall.py
2 issues
Line: 1
Column: 1
from pyb import Pin, ADCAll
pins = [Pin.cpu.A0, Pin.cpu.A1, Pin.cpu.A2, Pin.cpu.A3]
# set pins to IN mode, init ADCAll, then check pins are ANALOG
for p in pins:
p.init(p.IN)
adc = ADCAll(12)
for p in pins:
Reported by Pylint.
Line: 1
Column: 1
from pyb import Pin, ADCAll
pins = [Pin.cpu.A0, Pin.cpu.A1, Pin.cpu.A2, Pin.cpu.A3]
# set pins to IN mode, init ADCAll, then check pins are ANALOG
for p in pins:
p.init(p.IN)
adc = ADCAll(12)
for p in pins:
Reported by Pylint.
tests/basics/string_rpartition.py
2 issues
Line: 5
Column: 5
str.partition
except AttributeError:
print("SKIP")
raise SystemExit
print("asdf".rpartition('g'))
print("asdf".rpartition('a'))
print("asdf".rpartition('s'))
print("asdf".rpartition('f'))
Reported by Pylint.
Line: 1
Column: 1
try:
str.partition
except AttributeError:
print("SKIP")
raise SystemExit
print("asdf".rpartition('g'))
print("asdf".rpartition('a'))
print("asdf".rpartition('s'))
Reported by Pylint.
tests/pyb/can2.py
2 issues
Line: 7
Column: 5
CAN(2)
except (ImportError, ValueError):
print("SKIP")
raise SystemExit
# Testing rtr messages
bus2 = CAN(2, CAN.LOOPBACK, extframe=True)
while bus2.any(0):
bus2.recv(0)
Reported by Pylint.
Line: 1
Column: 1
try:
from pyb import CAN
CAN(2)
except (ImportError, ValueError):
print("SKIP")
raise SystemExit
# Testing rtr messages
Reported by Pylint.
tests/pyb/dac.py
2 issues
Line: 1
Column: 1
import pyb
if not hasattr(pyb, "DAC"):
print("SKIP")
raise SystemExit
dac = pyb.DAC(1)
print(dac)
dac.noise(100)
Reported by Pylint.
Line: 1
Column: 1
import pyb
if not hasattr(pyb, "DAC"):
print("SKIP")
raise SystemExit
dac = pyb.DAC(1)
print(dac)
dac.noise(100)
Reported by Pylint.
tests/pyb/extint.py
2 issues
Line: 1
Column: 1
import pyb
# test basic functionality
ext = pyb.ExtInt("X5", pyb.ExtInt.IRQ_RISING, pyb.Pin.PULL_DOWN, lambda l: print("line:", l))
ext.disable()
ext.enable()
print(ext.line())
ext.swint()
Reported by Pylint.
Line: 1
Column: 1
import pyb
# test basic functionality
ext = pyb.ExtInt("X5", pyb.ExtInt.IRQ_RISING, pyb.Pin.PULL_DOWN, lambda l: print("line:", l))
ext.disable()
ext.enable()
print(ext.line())
ext.swint()
Reported by Pylint.
tests/feature_check/bytearray.py
2 issues
Line: 2
Column: 5
try:
bytearray
print("bytearray")
except NameError:
print("no")
Reported by Pylint.
Line: 1
Column: 1
try:
bytearray
print("bytearray")
except NameError:
print("no")
Reported by Pylint.
tests/basics/exception_chain.py
2 issues
Line: 5
Column: 8
# exception works as expected.
try:
raise Exception from None
except Exception:
print("Caught Exception")
Reported by Pylint.
Line: 1
Column: 1
# Exception chaining is not supported, but check that basic
# exception works as expected.
try:
raise Exception from None
except Exception:
print("Caught Exception")
Reported by Pylint.
tests/basics/string_center.py
2 issues
Line: 5
Column: 5
str.center
except:
print("SKIP")
raise SystemExit
print("foo".center(0))
print("foo".center(1))
print("foo".center(3))
print("foo".center(4))
Reported by Pylint.
Line: 1
Column: 1
try:
str.center
except:
print("SKIP")
raise SystemExit
print("foo".center(0))
print("foo".center(1))
print("foo".center(3))
Reported by Pylint.
tests/pyb/pin.py
2 issues
Line: 1
Column: 1
from pyb import Pin
p = Pin("X8", Pin.IN)
print(p)
print(p.name())
print(p.pin())
print(p.port())
p = Pin("X8", Pin.IN, Pin.PULL_UP)
Reported by Pylint.
Line: 1
Column: 1
from pyb import Pin
p = Pin("X8", Pin.IN)
print(p)
print(p.name())
print(p.pin())
print(p.port())
p = Pin("X8", Pin.IN, Pin.PULL_UP)
Reported by Pylint.