The following issues were found

ports/esp32/boards/UM_FEATHERS2/manifest.py
4 issues
Undefined variable 'include'
Error

Line: 1 Column: 1

              include("$(PORT_DIR)/boards/manifest.py")
freeze("$(PORT_DIR)/boards/UM_TINYPICO/modules", "dotstar.py")
freeze("modules")

            

Reported by Pylint.

Undefined variable 'freeze'
Error

Line: 2 Column: 1

              include("$(PORT_DIR)/boards/manifest.py")
freeze("$(PORT_DIR)/boards/UM_TINYPICO/modules", "dotstar.py")
freeze("modules")

            

Reported by Pylint.

Undefined variable 'freeze'
Error

Line: 3 Column: 1

              include("$(PORT_DIR)/boards/manifest.py")
freeze("$(PORT_DIR)/boards/UM_TINYPICO/modules", "dotstar.py")
freeze("modules")

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              include("$(PORT_DIR)/boards/manifest.py")
freeze("$(PORT_DIR)/boards/UM_TINYPICO/modules", "dotstar.py")
freeze("modules")

            

Reported by Pylint.

tests/net_inet/uasyncio_cancel_stream.py
4 issues
Consider explicitly re-raising using the 'from' keyword
Error

Line: 10 Column: 9

                      import asyncio
    except ImportError:
        print("SKIP")
        raise SystemExit


async def get(reader):
    print("start")
    try:

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Test cancelling a task waiting on stream IO

try:
    import uasyncio as asyncio
except ImportError:
    try:
        import asyncio
    except ImportError:
        print("SKIP")

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 13 Column: 1

                      raise SystemExit


async def get(reader):
    print("start")
    try:
        await reader.read(10)
        print("fail")
    except asyncio.CancelledError:

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 22 Column: 1

                      print("cancelled")


async def main(url):
    reader, writer = await asyncio.open_connection(url, 80)
    task = asyncio.create_task(get(reader))
    await asyncio.sleep(0)
    print("cancelling")
    task.cancel()

            

Reported by Pylint.

tests/perf_bench/bm_nqueens.py
4 issues
Missing module docstring
Error

Line: 1 Column: 1

              # Source: https://github.com/python/pyperformance
# License: MIT

# Simple, brute-force N-Queens solver.
# author: collinwinter@google.com (Collin Winter)
# n_queens function: Copyright 2009 Raymond Hettinger

# Pure-Python implementation of itertools.permutations().
def permutations(iterable, r=None):

            

Reported by Pylint.

Argument name "r" doesn't conform to snake_case naming style
Error

Line: 9 Column: 1

              # n_queens function: Copyright 2009 Raymond Hettinger

# Pure-Python implementation of itertools.permutations().
def permutations(iterable, r=None):
    """permutations(range(3), 2) --> (0,1) (0,2) (1,0) (1,2) (2,0) (2,1)"""
    pool = tuple(iterable)
    n = len(pool)
    if r is None:
        r = n

            

Reported by Pylint.

Variable name "n" doesn't conform to snake_case naming style
Error

Line: 12 Column: 5

              def permutations(iterable, r=None):
    """permutations(range(3), 2) --> (0,1) (0,2) (1,0) (1,2) (2,0) (2,1)"""
    pool = tuple(iterable)
    n = len(pool)
    if r is None:
        r = n
    indices = list(range(n))
    cycles = list(range(n - r + 1, n + 1))[::-1]
    yield tuple(pool[i] for i in indices[:r])

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 56 Column: 1

              }


def bm_setup(params):
    res = None

    def run():
        nonlocal res
        for _ in range(params[0]):

            

Reported by Pylint.

tests/pyb/i2c.py
4 issues
Unable to import 'pyb'
Error

Line: 1 Column: 1

              import pyb
from pyb import I2C

# test we can correctly create by id
for bus in (-1, 0, 1):
    try:
        I2C(bus)
        print("I2C", bus)
    except ValueError:

            

Reported by Pylint.

Unable to import 'pyb'
Error

Line: 2 Column: 1

              import pyb
from pyb import I2C

# test we can correctly create by id
for bus in (-1, 0, 1):
    try:
        I2C(bus)
        print("I2C", bus)
    except ValueError:

            

Reported by Pylint.

Unused import pyb
Error

Line: 1 Column: 1

              import pyb
from pyb import I2C

# test we can correctly create by id
for bus in (-1, 0, 1):
    try:
        I2C(bus)
        print("I2C", bus)
    except ValueError:

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import pyb
from pyb import I2C

# test we can correctly create by id
for bus in (-1, 0, 1):
    try:
        I2C(bus)
        print("I2C", bus)
    except ValueError:

            

Reported by Pylint.

tests/pyb/i2c_accel.py
4 issues
Unable to import 'pyb'
Error

Line: 3 Column: 1

              # use accelerometer to test i2c bus

import pyb
from pyb import I2C

if not hasattr(pyb, "Accel"):
    print("SKIP")
    raise SystemExit


            

Reported by Pylint.

Unable to import 'pyb'
Error

Line: 4 Column: 1

              # use accelerometer to test i2c bus

import pyb
from pyb import I2C

if not hasattr(pyb, "Accel"):
    print("SKIP")
    raise SystemExit


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # use accelerometer to test i2c bus

import pyb
from pyb import I2C

if not hasattr(pyb, "Accel"):
    print("SKIP")
    raise SystemExit


            

Reported by Pylint.

Constant name "accel_addr" doesn't conform to UPPER_CASE naming style
Error

Line: 10 Column: 1

                  print("SKIP")
    raise SystemExit

accel_addr = 76

pyb.Accel()  # this will init the MMA for us

i2c = I2C(1, I2C.CONTROLLER, baudrate=400000)


            

Reported by Pylint.

tests/pyb/pyb_f405.py
4 issues
Unable to import 'pyb'
Error

Line: 3 Column: 1

              # test pyb module on F405 MCUs

import os, pyb

if not "STM32F405" in os.uname().machine:
    print("SKIP")
    raise SystemExit

print(pyb.freq())

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # test pyb module on F405 MCUs

import os, pyb

if not "STM32F405" in os.uname().machine:
    print("SKIP")
    raise SystemExit

print(pyb.freq())

            

Reported by Pylint.

Multiple imports on one line (os, pyb)
Error

Line: 3 Column: 1

              # test pyb module on F405 MCUs

import os, pyb

if not "STM32F405" in os.uname().machine:
    print("SKIP")
    raise SystemExit

print(pyb.freq())

            

Reported by Pylint.

Variable name "e" doesn't conform to snake_case naming style
Error

Line: 16 Column: 1

              i2c = pyb.I2C(2, pyb.I2C.CONTROLLER)
try:
    i2c.recv(1, 1)
except OSError as e:
    print(repr(e))

            

Reported by Pylint.

tests/pyb/timer.py
4 issues
Unable to import 'pyb'
Error

Line: 3 Column: 1

              # check basic functionality of the timer class

import pyb
from pyb import Timer

tim = Timer(4)
tim = Timer(4, prescaler=100, period=200)
print(tim.prescaler())
print(tim.period())

            

Reported by Pylint.

Unable to import 'pyb'
Error

Line: 4 Column: 1

              # check basic functionality of the timer class

import pyb
from pyb import Timer

tim = Timer(4)
tim = Timer(4, prescaler=100, period=200)
print(tim.prescaler())
print(tim.period())

            

Reported by Pylint.

Unused import pyb
Error

Line: 3 Column: 1

              # check basic functionality of the timer class

import pyb
from pyb import Timer

tim = Timer(4)
tim = Timer(4, prescaler=100, period=200)
print(tim.prescaler())
print(tim.period())

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # check basic functionality of the timer class

import pyb
from pyb import Timer

tim = Timer(4)
tim = Timer(4, prescaler=100, period=200)
print(tim.prescaler())
print(tim.period())

            

Reported by Pylint.

examples/rp2/pio_exec.py
4 issues
Unable to import 'machine'
Error

Line: 8 Column: 1

              #   - using StateMachine.exec

import time
from machine import Pin
import rp2

# Define an empty program that uses a single set pin.
@rp2.asm_pio(set_init=rp2.PIO.OUT_LOW)
def prog():

            

Reported by Pylint.

Unable to import 'rp2'
Error

Line: 9 Column: 1

              
import time
from machine import Pin
import rp2

# Define an empty program that uses a single set pin.
@rp2.asm_pio(set_init=rp2.PIO.OUT_LOW)
def prog():
    pass

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Example using PIO to turn on an LED via an explicit exec.
#
# Demonstrates:
#   - using set_init and set_base
#   - using StateMachine.exec

import time
from machine import Pin
import rp2

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 13 Column: 1

              
# Define an empty program that uses a single set pin.
@rp2.asm_pio(set_init=rp2.PIO.OUT_LOW)
def prog():
    pass


# Construct the StateMachine, binding Pin(25) to the set pin.
sm = rp2.StateMachine(0, prog, set_base=Pin(25))

            

Reported by Pylint.

tests/stress/recursive_gen.py
4 issues
Missing module docstring
Error

Line: 1 Column: 1

              # test deeply recursive generators

# simple "yield from" recursion
def gen():
    yield from gen()


try:
    list(gen())

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 4 Column: 1

              # test deeply recursive generators

# simple "yield from" recursion
def gen():
    yield from gen()


try:
    list(gen())

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 14 Column: 1

                  print("RuntimeError")

# recursion via an iterator over a generator
def gen2():
    for x in gen2():
        yield x


try:

            

Reported by Pylint.

Variable name "x" doesn't conform to snake_case naming style
Error

Line: 15 Column: 9

              
# recursion via an iterator over a generator
def gen2():
    for x in gen2():
        yield x


try:
    next(gen2())

            

Reported by Pylint.

tests/thread/thread_exc2.py
4 issues
Unable to import 'utime'
Error

Line: 2 Column: 1

              # test raising exception within thread which is not caught
import utime
import _thread


def thread_entry():
    raise ValueError



            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # test raising exception within thread which is not caught
import utime
import _thread


def thread_entry():
    raise ValueError



            

Reported by Pylint.

standard import "import _thread" should be placed before "import utime"
Error

Line: 3 Column: 1

              # test raising exception within thread which is not caught
import utime
import _thread


def thread_entry():
    raise ValueError



            

Reported by Pylint.

Missing function or method docstring
Error

Line: 6 Column: 1

              import _thread


def thread_entry():
    raise ValueError


_thread.start_new_thread(thread_entry, ())
utime.sleep(1)

            

Reported by Pylint.