The following issues were found

tests/basics/fun_kwvarargs.py
11 issues
Missing function or method docstring
Error

Line: 1 Column: 1

              def f1(**kwargs):
    print(kwargs)

f1()
f1(a=1)

def f2(a, **kwargs):
    print(a, kwargs)


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              def f1(**kwargs):
    print(kwargs)

f1()
f1(a=1)

def f2(a, **kwargs):
    print(a, kwargs)


            

Reported by Pylint.

Function name "f1" doesn't conform to snake_case naming style
Error

Line: 1 Column: 1

              def f1(**kwargs):
    print(kwargs)

f1()
f1(a=1)

def f2(a, **kwargs):
    print(a, kwargs)


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 7 Column: 1

              f1()
f1(a=1)

def f2(a, **kwargs):
    print(a, kwargs)

f2(1)
f2(1, b=2)


            

Reported by Pylint.

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

Line: 7 Column: 1

              f1()
f1(a=1)

def f2(a, **kwargs):
    print(a, kwargs)

f2(1)
f2(1, b=2)


            

Reported by Pylint.

Function name "f2" doesn't conform to snake_case naming style
Error

Line: 7 Column: 1

              f1()
f1(a=1)

def f2(a, **kwargs):
    print(a, kwargs)

f2(1)
f2(1, b=2)


            

Reported by Pylint.

Function name "f3" doesn't conform to snake_case naming style
Error

Line: 13 Column: 1

              f2(1)
f2(1, b=2)

def f3(a, *vargs, **kwargs):
    print(a, vargs, kwargs)

f3(1)
f3(1, 2)
f3(1, b=2)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 13 Column: 1

              f2(1)
f2(1, b=2)

def f3(a, *vargs, **kwargs):
    print(a, vargs, kwargs)

f3(1)
f3(1, 2)
f3(1, b=2)

            

Reported by Pylint.

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

Line: 13 Column: 1

              f2(1)
f2(1, b=2)

def f3(a, *vargs, **kwargs):
    print(a, vargs, kwargs)

f3(1)
f3(1, 2)
f3(1, b=2)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 21 Column: 1

              f3(1, b=2)
f3(1, 2, b=3)

def f4(*vargs, **kwargs):
    print(vargs, kwargs)
f4(*(1, 2))
f4(kw_arg=3)
f4(*(1, 2), kw_arg=3)

            

Reported by Pylint.

tests/extmod/uasyncio_cancel_fair.py
11 issues
Consider explicitly re-raising using the 'from' keyword
Error

Line: 11 Column: 9

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


async def task(id, other):
    for i in range(3):
        try:

            

Reported by Pylint.

Redefining built-in 'id'
Error

Line: 14 Column: 16

                      raise SystemExit


async def task(id, other):
    for i in range(3):
        try:
            print("start", id)
            await asyncio.sleep(0)
            print("done", id)

            

Reported by Pylint.

Unused variable 'i'
Error

Line: 15 Column: 9

              

async def task(id, other):
    for i in range(3):
        try:
            print("start", id)
            await asyncio.sleep(0)
            print("done", id)
        except asyncio.CancelledError as er:

            

Reported by Pylint.

Unused variable 'er'
Error

Line: 20 Column: 9

                          print("start", id)
            await asyncio.sleep(0)
            print("done", id)
        except asyncio.CancelledError as er:
            print("cancelled", id)
        if other is not None:
            print(id, "cancels", other)
            tasks[other].cancel()


            

Reported by Pylint.

Global variable 'tasks' undefined at the module level
Error

Line: 28 Column: 5

              

async def main():
    global tasks
    tasks = [
        asyncio.create_task(task(0, 1)),
        asyncio.create_task(task(1, 0)),
        asyncio.create_task(task(2, None)),
    ]

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Test fairness of cancelling a task
# That tasks which continuously cancel each other don't take over the scheduler

try:
    import uasyncio as asyncio
except ImportError:
    try:
        import asyncio
    except ImportError:

            

Reported by Pylint.

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

Line: 14 Column: 1

                      raise SystemExit


async def task(id, other):
    for i in range(3):
        try:
            print("start", id)
            await asyncio.sleep(0)
            print("done", id)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 14 Column: 1

                      raise SystemExit


async def task(id, other):
    for i in range(3):
        try:
            print("start", id)
            await asyncio.sleep(0)
            print("done", id)

            

Reported by Pylint.

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

Line: 20 Column: 9

                          print("start", id)
            await asyncio.sleep(0)
            print("done", id)
        except asyncio.CancelledError as er:
            print("cancelled", id)
        if other is not None:
            print(id, "cancels", other)
            tasks[other].cancel()


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 27 Column: 1

                          tasks[other].cancel()


async def main():
    global tasks
    tasks = [
        asyncio.create_task(task(0, 1)),
        asyncio.create_task(task(1, 0)),
        asyncio.create_task(task(2, None)),

            

Reported by Pylint.

tests/basics/try_else_finally.py
11 issues
No exception type(s) specified
Error

Line: 6 Column: 1

              # base case
try:
    print(1)
except:
    print(2)
else:
    print(3)
finally:
    print(4)

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 17 Column: 1

              try:
    print(1)
    raise Exception
except:
    print(2)
else:
    print(3)
finally:
    print(4)

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 35 Column: 1

                      print(3)
    finally:
        print(4)
except:
    print('caught')

# nested within outer try
try:
    print(1)

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 44 Column: 5

                  try:
        print(2)
        raise Exception
    except:
        print(3)
    else:
        print(4)
    finally:
        print(5)

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 50 Column: 1

                      print(4)
    finally:
        print(5)
except:
    print(6)
else:
    print(7)
finally:
    print(8)

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 61 Column: 1

              try:
    print(1)
    raise Exception
except:
    print(2)
    try:
        print(3)
    except:
        print(4)

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 65 Column: 5

                  print(2)
    try:
        print(3)
    except:
        print(4)
    else:
        print(5)
    finally:
        print(6)

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 80 Column: 1

              try:
    print(1)
    raise Exception
except:
    print(2)
    try:
        print(3)
        raise Exception
    except:

            

Reported by Pylint.

Consider explicitly re-raising using the 'from' keyword
Error

Line: 84 Column: 9

                  print(2)
    try:
        print(3)
        raise Exception
    except:
        print(4)
    else:
        print(5)
    finally:

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 85 Column: 5

                  try:
        print(3)
        raise Exception
    except:
        print(4)
    else:
        print(5)
    finally:
        print(6)

            

Reported by Pylint.

tests/basics/gen_yield_from_throw3.py
11 issues
No exception type(s) specified
Error

Line: 48 Column: 1

              print(next(g))
try:
    g.throw(ValueError)
except:
    print('ValueError')

# the thrown 123 is not an exception so raises a TypeError
g = gen2()
print(next(g))

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # yield-from a user-defined generator with a throw() method

class Iter:
    def __iter__(self):
        return self

    def __next__(self):
        return 1


            

Reported by Pylint.

Missing class docstring
Error

Line: 3 Column: 1

              # yield-from a user-defined generator with a throw() method

class Iter:
    def __iter__(self):
        return self

    def __next__(self):
        return 1


            

Reported by Pylint.

Method could be a function
Error

Line: 7 Column: 5

                  def __iter__(self):
        return self

    def __next__(self):
        return 1

    def throw(self, x):
        print('throw', x)
        return 456

            

Reported by Pylint.

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

Line: 10 Column: 5

                  def __next__(self):
        return 1

    def throw(self, x):
        print('throw', x)
        return 456

def gen():
    yield from Iter()

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 10 Column: 5

                  def __next__(self):
        return 1

    def throw(self, x):
        print('throw', x)
        return 456

def gen():
    yield from Iter()

            

Reported by Pylint.

Method could be a function
Error

Line: 10 Column: 5

                  def __next__(self):
        return 1

    def throw(self, x):
        print('throw', x)
        return 456

def gen():
    yield from Iter()

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 14 Column: 1

                      print('throw', x)
        return 456

def gen():
    yield from Iter()

# calling close() should not call throw()
g = gen()
print(next(g))

            

Reported by Pylint.

Missing class docstring
Error

Line: 33 Column: 1

              print(g.throw(ZeroDivisionError))

# this user-defined generator doesn't have a throw() method
class Iter2:
    def __iter__(self):
        return self

    def __next__(self):
        return 1

            

Reported by Pylint.

Method could be a function
Error

Line: 37 Column: 5

                  def __iter__(self):
        return self

    def __next__(self):
        return 1

def gen2():
    yield from Iter2()


            

Reported by Pylint.

tests/basics/fun_defargs.py
11 issues
No value for argument 'p1' in function call
Error

Line: 16 Column: 5

              fun2(1, None)
fun2(0, "bar", 200)
try:
    fun2()
except TypeError:
    print("TypeError")
try:
    fun2(1, 2, 3, 4)
except TypeError:

            

Reported by Pylint.

Too many positional arguments for function call
Error

Line: 20 Column: 5

              except TypeError:
    print("TypeError")
try:
    fun2(1, 2, 3, 4)
except TypeError:
    print("TypeError")

# lambda as default arg (exposes nested behaviour in compiler)
def f(x=lambda:1):

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # testing default args to a function

def fun1(val=5):
    print(val)

fun1()
fun1(10)

def fun2(p1, p2=100, p3="foo"):

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 3 Column: 1

              # testing default args to a function

def fun1(val=5):
    print(val)

fun1()
fun1(10)

def fun2(p1, p2=100, p3="foo"):

            

Reported by Pylint.

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

Line: 9 Column: 1

              fun1()
fun1(10)

def fun2(p1, p2=100, p3="foo"):
    print(p1, p2, p3)

fun2(1)
fun2(1, None)
fun2(0, "bar", 200)

            

Reported by Pylint.

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

Line: 9 Column: 1

              fun1()
fun1(10)

def fun2(p1, p2=100, p3="foo"):
    print(p1, p2, p3)

fun2(1)
fun2(1, None)
fun2(0, "bar", 200)

            

Reported by Pylint.

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

Line: 9 Column: 1

              fun1()
fun1(10)

def fun2(p1, p2=100, p3="foo"):
    print(p1, p2, p3)

fun2(1)
fun2(1, None)
fun2(0, "bar", 200)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 9 Column: 1

              fun1()
fun1(10)

def fun2(p1, p2=100, p3="foo"):
    print(p1, p2, p3)

fun2(1)
fun2(1, None)
fun2(0, "bar", 200)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 25 Column: 1

                  print("TypeError")

# lambda as default arg (exposes nested behaviour in compiler)
def f(x=lambda:1):
    return x()
print(f())
print(f(f))
print(f(lambda:2))

            

Reported by Pylint.

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

Line: 25 Column: 1

                  print("TypeError")

# lambda as default arg (exposes nested behaviour in compiler)
def f(x=lambda:1):
    return x()
print(f())
print(f(f))
print(f(lambda:2))

            

Reported by Pylint.

tests/esp32/partition_ota.py
11 issues
Unable to import 'machine'
Error

Line: 5 Column: 1

              # Running this test requires firmware with an OTA Partition, such as the GENERIC_OTA "board".
# This test also requires patience as it copies the boot partition into the other OTA slot.

import machine
from esp32 import Partition

# start by checking that the running partition table has OTA partitions, 'cause if
# it doesn't there's nothing we can test
cur = Partition(Partition.RUNNING)

            

Reported by Pylint.

Unable to import 'esp32'
Error

Line: 6 Column: 1

              # This test also requires patience as it copies the boot partition into the other OTA slot.

import machine
from esp32 import Partition

# start by checking that the running partition table has OTA partitions, 'cause if
# it doesn't there's nothing we can test
cur = Partition(Partition.RUNNING)
cur_name = cur.info()[4]

            

Reported by Pylint.

Unable to import 'uos'
Error

Line: 25 Column: 1

              

# replace boot.py with the test code that will run on each reboot
import uos

try:
    uos.rename("boot.py", "boot-orig.py")
except:
    pass

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 29 Column: 1

              
try:
    uos.rename("boot.py", "boot-orig.py")
except:
    pass
with open("boot.py", "w") as f:
    f.write("DEBUG=" + str(DEBUG))
    f.write(
        """

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Test ESP32 OTA updates, including automatic roll-back.
# Running this test requires firmware with an OTA Partition, such as the GENERIC_OTA "board".
# This test also requires patience as it copies the boot partition into the other OTA slot.

import machine
from esp32 import Partition

# start by checking that the running partition table has OTA partitions, 'cause if
# it doesn't there's nothing we can test

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 19 Column: 1

              DEBUG = True


def log(*args):
    if DEBUG:
        print(*args)


# replace boot.py with the test code that will run on each reboot

            

Reported by Pylint.

third party import "import uos" should be placed before "from esp32 import Partition"
Error

Line: 25 Column: 1

              

# replace boot.py with the test code that will run on each reboot
import uos

try:
    uos.rename("boot.py", "boot-orig.py")
except:
    pass

            

Reported by Pylint.

Import "import uos" should be placed at the top of the module
Error

Line: 25 Column: 1

              

# replace boot.py with the test code that will run on each reboot
import uos

try:
    uos.rename("boot.py", "boot-orig.py")
except:
    pass

            

Reported by Pylint.

Try, Except, Pass detected.
Security

Line: 29
Suggestion: https://bandit.readthedocs.io/en/latest/plugins/b110_try_except_pass.html

              
try:
    uos.rename("boot.py", "boot-orig.py")
except:
    pass
with open("boot.py", "w") as f:
    f.write("DEBUG=" + str(DEBUG))
    f.write(
        """

            

Reported by Bandit.

Missing function or method docstring
Error

Line: 87 Column: 1

                  )


def copy_partition(src, dest):
    log("Partition copy: {} --> {}".format(src.info(), dest.info()))
    sz = src.info()[3]
    if dest.info()[3] != sz:
        raise ValueError("Sizes don't match: {} vs {}".format(sz, dest.info()[3]))
    addr = 0

            

Reported by Pylint.

tests/extmod/btree_error.py
11 issues
Statement seems to have no effect
Error

Line: 6 Column: 5

              try:
    import btree, uio, uerrno

    uio.IOBase
except (ImportError, AttributeError):
    print("SKIP")
    raise SystemExit



            

Reported by Pylint.

Consider explicitly re-raising using the 'from' keyword
Error

Line: 9 Column: 5

                  uio.IOBase
except (ImportError, AttributeError):
    print("SKIP")
    raise SystemExit


class Device(uio.IOBase):
    def __init__(self, read_ret=0, ioctl_ret=0):
        self.read_ret = read_ret

            

Reported by Pylint.

Unused argument 'arg'
Error

Line: 21 Column: 26

                      print("read", len(buf))
        return self.read_ret

    def ioctl(self, cmd, arg):
        print("ioctl", cmd)
        return self.ioctl_ret


# Invalid pagesize; errno comes from btree library

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Test that errno's propagate correctly through btree module.

try:
    import btree, uio, uerrno

    uio.IOBase
except (ImportError, AttributeError):
    print("SKIP")
    raise SystemExit

            

Reported by Pylint.

Multiple imports on one line (btree, uio, uerrno)
Error

Line: 4 Column: 5

              # Test that errno's propagate correctly through btree module.

try:
    import btree, uio, uerrno

    uio.IOBase
except (ImportError, AttributeError):
    print("SKIP")
    raise SystemExit

            

Reported by Pylint.

Missing class docstring
Error

Line: 12 Column: 1

                  raise SystemExit


class Device(uio.IOBase):
    def __init__(self, read_ret=0, ioctl_ret=0):
        self.read_ret = read_ret
        self.ioctl_ret = ioctl_ret

    def readinto(self, buf):

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 17 Column: 5

                      self.read_ret = read_ret
        self.ioctl_ret = ioctl_ret

    def readinto(self, buf):
        print("read", len(buf))
        return self.read_ret

    def ioctl(self, cmd, arg):
        print("ioctl", cmd)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 21 Column: 5

                      print("read", len(buf))
        return self.read_ret

    def ioctl(self, cmd, arg):
        print("ioctl", cmd)
        return self.ioctl_ret


# Invalid pagesize; errno comes from btree library

            

Reported by Pylint.

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

Line: 29 Column: 1

              # Invalid pagesize; errno comes from btree library
try:
    db = btree.open(Device(), pagesize=511)
except OSError as er:
    print("OSError", er.errno == uerrno.EINVAL)

# Valid pagesize, device returns error on read; errno comes from Device.readinto
try:
    db = btree.open(Device(-1000), pagesize=512)

            

Reported by Pylint.

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

Line: 35 Column: 1

              # Valid pagesize, device returns error on read; errno comes from Device.readinto
try:
    db = btree.open(Device(-1000), pagesize=512)
except OSError as er:
    print(repr(er))

# Valid pagesize, device returns error on seek; errno comes from Device.ioctl
try:
    db = btree.open(Device(0, -1001), pagesize=512)

            

Reported by Pylint.

tests/basics/try4.py
11 issues
Undefined variable 'foo'
Error

Line: 5 Column: 9

              
def f():
    try:
        foo()
    except:
        print("except 1")
        try:
            bar()
        except:

            

Reported by Pylint.

Undefined variable 'bar'
Error

Line: 9 Column: 13

                  except:
        print("except 1")
        try:
            bar()
        except:
            print("except 2")
            try:
                baz()
            except:

            

Reported by Pylint.

Undefined variable 'baz'
Error

Line: 13 Column: 17

                      except:
            print("except 2")
            try:
                baz()
            except:
                print("except 3")
            bak()

try:

            

Reported by Pylint.

Undefined variable 'bak'
Error

Line: 16 Column: 13

                              baz()
            except:
                print("except 3")
            bak()

try:
    f()
except:
    print("f except")

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 6 Column: 5

              def f():
    try:
        foo()
    except:
        print("except 1")
        try:
            bar()
        except:
            print("except 2")

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 10 Column: 9

                      print("except 1")
        try:
            bar()
        except:
            print("except 2")
            try:
                baz()
            except:
                print("except 3")

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 14 Column: 13

                          print("except 2")
            try:
                baz()
            except:
                print("except 3")
            bak()

try:
    f()

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 20 Column: 1

              
try:
    f()
except:
    print("f except")

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # triple nested exceptions

def f():
    try:
        foo()
    except:
        print("except 1")
        try:
            bar()

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 3 Column: 1

              # triple nested exceptions

def f():
    try:
        foo()
    except:
        print("except 1")
        try:
            bar()

            

Reported by Pylint.

tests/perf_bench/viper_call2a.py
11 issues
Undefined variable 'micropython'
Error

Line: 1 Column: 2

              @micropython.viper
def f2a(x, y):
    return x


@micropython.native
def call(r):
    f = f2a
    for _ in r:

            

Reported by Pylint.

Undefined variable 'micropython'
Error

Line: 6 Column: 2

                  return x


@micropython.native
def call(r):
    f = f2a
    for _ in r:
        f(1, 2)


            

Reported by Pylint.

Unused argument 'y'
Error

Line: 2 Column: 12

              @micropython.viper
def f2a(x, y):
    return x


@micropython.native
def call(r):
    f = f2a
    for _ in r:

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              @micropython.viper
def f2a(x, y):
    return x


@micropython.native
def call(r):
    f = f2a
    for _ in r:

            

Reported by Pylint.

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

Line: 2 Column: 1

              @micropython.viper
def f2a(x, y):
    return x


@micropython.native
def call(r):
    f = f2a
    for _ in r:

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 2 Column: 1

              @micropython.viper
def f2a(x, y):
    return x


@micropython.native
def call(r):
    f = f2a
    for _ in r:

            

Reported by Pylint.

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

Line: 2 Column: 1

              @micropython.viper
def f2a(x, y):
    return x


@micropython.native
def call(r):
    f = f2a
    for _ in r:

            

Reported by Pylint.

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

Line: 7 Column: 1

              

@micropython.native
def call(r):
    f = f2a
    for _ in r:
        f(1, 2)



            

Reported by Pylint.

Missing function or method docstring
Error

Line: 7 Column: 1

              

@micropython.native
def call(r):
    f = f2a
    for _ in r:
        f(1, 2)



            

Reported by Pylint.

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

Line: 8 Column: 5

              
@micropython.native
def call(r):
    f = f2a
    for _ in r:
        f(1, 2)


bm_params = {

            

Reported by Pylint.

tests/pyb/timer_callback.py
11 issues
Unable to import 'pyb'
Error

Line: 3 Column: 1

              # check callback feature of the timer class

import pyb
from pyb import Timer

# callback function that disables the callback when called
def cb1(t):
    print("cb1")
    t.callback(None)

            

Reported by Pylint.

Unable to import 'pyb'
Error

Line: 4 Column: 1

              # check callback feature of the timer class

import pyb
from pyb import Timer

# callback function that disables the callback when called
def cb1(t):
    print("cb1")
    t.callback(None)

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # check callback feature of the timer class

import pyb
from pyb import Timer

# callback function that disables the callback when called
def cb1(t):
    print("cb1")
    t.callback(None)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 7 Column: 1

              from pyb import Timer

# callback function that disables the callback when called
def cb1(t):
    print("cb1")
    t.callback(None)


# callback function that disables the timer when called

            

Reported by Pylint.

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

Line: 7 Column: 1

              from pyb import Timer

# callback function that disables the callback when called
def cb1(t):
    print("cb1")
    t.callback(None)


# callback function that disables the timer when called

            

Reported by Pylint.

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

Line: 13 Column: 1

              

# callback function that disables the timer when called
def cb2(t):
    print("cb2")
    t.deinit()


# callback where cb4 closes over cb3.y

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 13 Column: 1

              

# callback function that disables the timer when called
def cb2(t):
    print("cb2")
    t.deinit()


# callback where cb4 closes over cb3.y

            

Reported by Pylint.

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

Line: 19 Column: 1

              

# callback where cb4 closes over cb3.y
def cb3(x):
    y = x

    def cb4(t):
        print("cb4", y)
        t.callback(None)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 19 Column: 1

              

# callback where cb4 closes over cb3.y
def cb3(x):
    y = x

    def cb4(t):
        print("cb4", y)
        t.callback(None)

            

Reported by Pylint.

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

Line: 20 Column: 5

              
# callback where cb4 closes over cb3.y
def cb3(x):
    y = x

    def cb4(t):
        print("cb4", y)
        t.callback(None)


            

Reported by Pylint.