The following issues were found

tests/cmdline/cmd_showbc.py
217 issues
Instance of 'tuple' has no 'c' member
Error

Line: 32 Column: 9

                  m = not (a == b and b == c)

    # attributes
    n = b.c
    b.c = n

    # subscript
    p = b[0]
    b[0] = p

            

Reported by Pylint.

'b' does not support item assignment
Error

Line: 37 Column: 5

              
    # subscript
    p = b[0]
    b[0] = p
    b[0] += p

    # slice
    a = b[::]


            

Reported by Pylint.

'b' does not support item assignment
Error

Line: 38 Column: 5

                  # subscript
    p = b[0]
    b[0] = p
    b[0] += p

    # slice
    a = b[::]

    # sequenc unpacking

            

Reported by Pylint.

Attempting to unpack a non-sequence defined at line 15
Error

Line: 45 Column: 5

              
    # sequenc unpacking
    a, b = c
    a, *a = a

    # tuple swapping
    a, b = b, a
    a, b, c = c, b, a


            

Reported by Pylint.

Non-iterable value c is used in an iterating context
Error

Line: 74 Column: 10

                  a.b()
    a.b(1)
    a.b(c=1)
    a.b(*c)

    # jumps
    if a:
        x
    else:

            

Reported by Pylint.

Using variable 'x' before assignment
Error

Line: 78 Column: 9

              
    # jumps
    if a:
        x
    else:
        y
    while a:
        b
    while not a:

            

Reported by Pylint.

Undefined variable 'y'
Error

Line: 80 Column: 9

                  if a:
        x
    else:
        y
    while a:
        b
    while not a:
        b
    a = a or a

            

Reported by Pylint.

Unable to import 'a'
Error

Line: 117 Column: 5

                      del x

    # import
    import a
    from a import b
    #from sys import * # tested at module scope

    # raise
    raise

            

Reported by Pylint.

Unable to import 'a'
Error

Line: 118 Column: 5

              
    # import
    import a
    from a import b
    #from sys import * # tested at module scope

    # raise
    raise
    raise 1

            

Reported by Pylint.

The raise statement is not inside an except clause
Error

Line: 122 Column: 5

                  #from sys import * # tested at module scope

    # raise
    raise
    raise 1

    # return
    return
    return 1

            

Reported by Pylint.

tools/mpy-tool.py
213 issues
Undefined variable 'long'
Error

Line: 36 Column: 58

                  bytes_cons = lambda val, enc=None: bytearray(val)
    is_str_type = lambda o: type(o) is str
    is_bytes_type = lambda o: type(o) is bytearray
    is_int_type = lambda o: type(o) is int or type(o) is long
else:
    str_cons = str
    bytes_cons = bytes
    is_str_type = lambda o: type(o) is str
    is_bytes_type = lambda o: type(o) is bytes

            

Reported by Pylint.

Unable to import 'makeqstrdata'
Error

Line: 50 Column: 1

              from collections import namedtuple

sys.path.append(sys.path[0] + "/../py")
import makeqstrdata as qstrutil


class FreezeError(Exception):
    def __init__(self, rawcode, msg):
        self.rawcode = rawcode

            

Reported by Pylint.

No value for argument 'msg' in constructor call
Error

Line: 559 Column: 19

              
    def freeze(self, parent_name):
        if self.prelude[2] & ~0x0F:
            raise FreezeError("unable to freeze code with relocations")

        self.freeze_children(parent_name)

        # generate native code data
        print()

            

Reported by Pylint.

Assigning result of a function call, where the function has no return
Error

Line: 1041 Column: 9

                          print(er, file=sys.stderr)
            sys.exit(1)
    elif args.merge:
        merged_mpy = merge_mpy(raw_codes, args.output)


if __name__ == "__main__":
    main()

            

Reported by Pylint.

Unused namedtuple imported from collections
Error

Line: 47 Column: 1

              
import sys
import struct
from collections import namedtuple

sys.path.append(sys.path[0] + "/../py")
import makeqstrdata as qstrutil



            

Reported by Pylint.

__init__ method from base class 'Exception' is not called
Error

Line: 54 Column: 5

              

class FreezeError(Exception):
    def __init__(self, rawcode, msg):
        self.rawcode = rawcode
        self.msg = msg

    def __str__(self):
        return "error while freezing %s: %s" % (self.rawcode.source_file, self.msg)

            

Reported by Pylint.

Redefining built-in 'str'
Error

Line: 73 Column: 24

              

class QStrType:
    def __init__(self, str):
        self.str = str
        self.qstr_esc = qstrutil.qstr_escape(self.str)
        self.qstr_id = "MP_QSTR_" + self.qstr_esc



            

Reported by Pylint.

Redefining name 'read_byte' from outer scope (line 636)
Error

Line: 158 Column: 22

                  return f, ip - ip_start


def read_prelude_sig(read_byte):
    z = read_byte()
    # xSSSSEAA
    S = (z >> 3) & 0xF
    E = (z >> 2) & 0x1
    F = 0

            

Reported by Pylint.

Redefining name 'n' from outer scope (line 81)
Error

Line: 167 Column: 5

                  A = z & 0x3
    K = 0
    D = 0
    n = 0
    while z & 0x80:
        z = read_byte()
        # xFSSKAED
        S |= (z & 0x30) << (2 * n)
        E |= (z & 0x02) << n

            

Reported by Pylint.

Redefining name 'read_byte' from outer scope (line 636)
Error

Line: 182 Column: 23

                  return S, E, F, A, K, D


def read_prelude_size(read_byte):
    I = 0
    C = 0
    n = 0
    while True:
        z = read_byte()

            

Reported by Pylint.

drivers/display/lcd160cr.py
204 issues
Unable to import 'micropython'
Error

Line: 4 Column: 1

              # Driver for official MicroPython LCD160CR display
# MIT license; Copyright (c) 2017 Damien P. George

from micropython import const
from utime import sleep_ms
from ustruct import calcsize, pack_into
import uerrno, machine

# for set_orient

            

Reported by Pylint.

Unable to import 'utime'
Error

Line: 5 Column: 1

              # MIT license; Copyright (c) 2017 Damien P. George

from micropython import const
from utime import sleep_ms
from ustruct import calcsize, pack_into
import uerrno, machine

# for set_orient
PORTRAIT = const(0)

            

Reported by Pylint.

Unable to import 'ustruct'
Error

Line: 6 Column: 1

              
from micropython import const
from utime import sleep_ms
from ustruct import calcsize, pack_into
import uerrno, machine

# for set_orient
PORTRAIT = const(0)
LANDSCAPE = const(1)

            

Reported by Pylint.

Unable to import 'machine'
Error

Line: 7 Column: 1

              from micropython import const
from utime import sleep_ms
from ustruct import calcsize, pack_into
import uerrno, machine

# for set_orient
PORTRAIT = const(0)
LANDSCAPE = const(1)
PORTRAIT_UPSIDEDOWN = const(2)

            

Reported by Pylint.

Unable to import 'uerrno'
Error

Line: 7 Column: 1

              from micropython import const
from utime import sleep_ms
from ustruct import calcsize, pack_into
import uerrno, machine

# for set_orient
PORTRAIT = const(0)
LANDSCAPE = const(1)
PORTRAIT_UPSIDEDOWN = const(2)

            

Reported by Pylint.

Value 'self.buf1' is unsubscriptable
Error

Line: 107 Column: 16

                      t = 5000
        while t:
            self.i2c.readfrom_into(self.i2c_addr, self.buf1)
            if self.buf1[0] >= n:
                self.i2c.readfrom_into(self.i2c_addr, buf)
                return
            t -= 1
            sleep_ms(1)
        raise OSError(uerrno.ETIMEDOUT)

            

Reported by Pylint.

Value 'self.buf1' is unsubscriptable
Error

Line: 118 Column: 17

                      t = 5000
        while t:
            self.i2c.readfrom_into(self.i2c_addr + 1, self.buf1)
            r = self.buf1[0]
            if r >= n:
                return
            t -= 1
            machine.idle()
        raise OSError(uerrno.ETIMEDOUT)

            

Reported by Pylint.

Value 'self.buf[5]' is unsubscriptable
Error

Line: 216 Column: 18

                      self.iflush()
        self._send(b"\x02g0")
        self._waitfor(4, self.buf[5])
        self.w = self.buf[5][1]
        self.h = self.buf[5][2]

    def set_brightness(self, value):
        self._fcmd2("<BBB", 0x16, value)


            

Reported by Pylint.

Value 'self.buf[5]' is unsubscriptable
Error

Line: 217 Column: 18

                      self._send(b"\x02g0")
        self._waitfor(4, self.buf[5])
        self.w = self.buf[5][1]
        self.h = self.buf[5][2]

    def set_brightness(self, value):
        self._fcmd2("<BBB", 0x16, value)

    def set_i2c_addr(self, addr):

            

Reported by Pylint.

Value 'self.buf1' is unsubscriptable
Error

Line: 251 Column: 16

                      t = 1000
        while t:
            self.i2c.readfrom_into(self.i2c_addr, self.buf1)
            if self.buf1[0] >= 2:
                self.i2c.readfrom_into(self.i2c_addr, self.buf[3])
                return self.buf[3][1] | self.buf[3][2] << 8
            t -= 1
            sleep_ms(1)
        raise OSError(uerrno.ETIMEDOUT)

            

Reported by Pylint.

tests/basics/fun_largestate.py
161 issues
Unused variable 'x0'
Error

Line: 5 Column: 5

              
# this function creates 127 locals
def f():
    x0 = 1
    x1 = 1
    x2 = 1
    x3 = 1
    x4 = 1
    x5 = 1

            

Reported by Pylint.

Unused variable 'x1'
Error

Line: 6 Column: 5

              # this function creates 127 locals
def f():
    x0 = 1
    x1 = 1
    x2 = 1
    x3 = 1
    x4 = 1
    x5 = 1
    x6 = 1

            

Reported by Pylint.

Unused variable 'x2'
Error

Line: 7 Column: 5

              def f():
    x0 = 1
    x1 = 1
    x2 = 1
    x3 = 1
    x4 = 1
    x5 = 1
    x6 = 1
    x7 = 1

            

Reported by Pylint.

Unused variable 'x3'
Error

Line: 8 Column: 5

                  x0 = 1
    x1 = 1
    x2 = 1
    x3 = 1
    x4 = 1
    x5 = 1
    x6 = 1
    x7 = 1
    x8 = 1

            

Reported by Pylint.

Unused variable 'x4'
Error

Line: 9 Column: 5

                  x1 = 1
    x2 = 1
    x3 = 1
    x4 = 1
    x5 = 1
    x6 = 1
    x7 = 1
    x8 = 1
    x9 = 1

            

Reported by Pylint.

Unused variable 'x5'
Error

Line: 10 Column: 5

                  x2 = 1
    x3 = 1
    x4 = 1
    x5 = 1
    x6 = 1
    x7 = 1
    x8 = 1
    x9 = 1
    x10 = 1

            

Reported by Pylint.

Unused variable 'x6'
Error

Line: 11 Column: 5

                  x3 = 1
    x4 = 1
    x5 = 1
    x6 = 1
    x7 = 1
    x8 = 1
    x9 = 1
    x10 = 1
    x11 = 1

            

Reported by Pylint.

Unused variable 'x7'
Error

Line: 12 Column: 5

                  x4 = 1
    x5 = 1
    x6 = 1
    x7 = 1
    x8 = 1
    x9 = 1
    x10 = 1
    x11 = 1
    x12 = 1

            

Reported by Pylint.

Unused variable 'x8'
Error

Line: 13 Column: 5

                  x5 = 1
    x6 = 1
    x7 = 1
    x8 = 1
    x9 = 1
    x10 = 1
    x11 = 1
    x12 = 1
    x13 = 1

            

Reported by Pylint.

Unused variable 'x9'
Error

Line: 14 Column: 5

                  x6 = 1
    x7 = 1
    x8 = 1
    x9 = 1
    x10 = 1
    x11 = 1
    x12 = 1
    x13 = 1
    x14 = 1

            

Reported by Pylint.

tools/mpy_ld.py
151 issues
Unable to import 'elftools.elf'
Error

Line: 32 Column: 1

              """

import sys, os, struct, re
from elftools.elf import elffile

sys.path.append(os.path.dirname(__file__) + "/../py")
import makeqstrdata as qstrutil

# MicroPython constants

            

Reported by Pylint.

Unable to import 'makeqstrdata'
Error

Line: 35 Column: 1

              from elftools.elf import elffile

sys.path.append(os.path.dirname(__file__) + "/../py")
import makeqstrdata as qstrutil

# MicroPython constants
MPY_VERSION = 5
MP_NATIVE_ARCH_X86 = 1
MP_NATIVE_ARCH_X64 = 2

            

Reported by Pylint.

Instance of 'GOTEntry' has no 'sec_name' member
Error

Line: 291 Column: 16

                      self.link_addr = link_addr

    def isexternal(self):
        return self.sec_name.startswith(".external")

    def istext(self):
        return self.sec_name.startswith(".text")

    def isrodata(self):

            

Reported by Pylint.

Instance of 'GOTEntry' has no 'sec_name' member
Error

Line: 294 Column: 16

                      return self.sec_name.startswith(".external")

    def istext(self):
        return self.sec_name.startswith(".text")

    def isrodata(self):
        return self.sec_name.startswith((".rodata", ".data.rel.ro"))

    def isbss(self):

            

Reported by Pylint.

Instance of 'GOTEntry' has no 'sec_name' member
Error

Line: 297 Column: 16

                      return self.sec_name.startswith(".text")

    def isrodata(self):
        return self.sec_name.startswith((".rodata", ".data.rel.ro"))

    def isbss(self):
        return self.sec_name.startswith(".bss")



            

Reported by Pylint.

Instance of 'GOTEntry' has no 'sec_name' member
Error

Line: 300 Column: 16

                      return self.sec_name.startswith((".rodata", ".data.rel.ro"))

    def isbss(self):
        return self.sec_name.startswith(".bss")


class LiteralEntry:
    def __init__(self, value, offset):
        self.value = value

            

Reported by Pylint.

Unused variable 's_shndx'
Error

Line: 467 Column: 5

                  # Extract relevant info about symbol that's being relocated
    s = r.sym
    s_bind = s.entry["st_info"]["bind"]
    s_shndx = s.entry["st_shndx"]
    s_type = s.entry["st_info"]["type"]
    r_offset = r["r_offset"] + text_addr
    r_info_type = r["r_info_type"]
    try:
        # only for RELA sections

            

Reported by Pylint.

Attribute 'f' defined outside __init__
Error

Line: 847 Column: 9

              
class MPYOutput:
    def open(self, fname):
        self.f = open(fname, "wb")
        self.prev_base = -1
        self.prev_offset = -1

    def close(self):
        self.f.close()

            

Reported by Pylint.

Attribute 'prev_base' defined outside __init__
Error

Line: 848 Column: 9

              class MPYOutput:
    def open(self, fname):
        self.f = open(fname, "wb")
        self.prev_base = -1
        self.prev_offset = -1

    def close(self):
        self.f.close()


            

Reported by Pylint.

Attribute 'prev_offset' defined outside __init__
Error

Line: 849 Column: 9

                  def open(self, fname):
        self.f = open(fname, "wb")
        self.prev_base = -1
        self.prev_offset = -1

    def close(self):
        self.f.close()

    def write_bytes(self, buf):

            

Reported by Pylint.

tests/perf_bench/misc_pystone.py
134 issues
Global variable 'IntGlob' undefined at the module level
Error

Line: 37 Column: 5

              

def Setup():
    global IntGlob
    global BoolGlob
    global Char1Glob
    global Char2Glob
    global Array1Glob
    global Array2Glob

            

Reported by Pylint.

Global variable 'BoolGlob' undefined at the module level
Error

Line: 38 Column: 5

              
def Setup():
    global IntGlob
    global BoolGlob
    global Char1Glob
    global Char2Glob
    global Array1Glob
    global Array2Glob


            

Reported by Pylint.

Global variable 'Char1Glob' undefined at the module level
Error

Line: 39 Column: 5

              def Setup():
    global IntGlob
    global BoolGlob
    global Char1Glob
    global Char2Glob
    global Array1Glob
    global Array2Glob

    IntGlob = 0

            

Reported by Pylint.

Global variable 'Char2Glob' undefined at the module level
Error

Line: 40 Column: 5

                  global IntGlob
    global BoolGlob
    global Char1Glob
    global Char2Glob
    global Array1Glob
    global Array2Glob

    IntGlob = 0
    BoolGlob = FALSE

            

Reported by Pylint.

Global variable 'Array1Glob' undefined at the module level
Error

Line: 41 Column: 5

                  global BoolGlob
    global Char1Glob
    global Char2Glob
    global Array1Glob
    global Array2Glob

    IntGlob = 0
    BoolGlob = FALSE
    Char1Glob = "\0"

            

Reported by Pylint.

Global variable 'Array2Glob' undefined at the module level
Error

Line: 42 Column: 5

                  global Char1Glob
    global Char2Glob
    global Array1Glob
    global Array2Glob

    IntGlob = 0
    BoolGlob = FALSE
    Char1Glob = "\0"
    Char2Glob = "\0"

            

Reported by Pylint.

Global variable 'IntGlob' undefined at the module level
Error

Line: 53 Column: 5

              

def Proc0(loops):
    global IntGlob
    global BoolGlob
    global Char1Glob
    global Char2Glob
    global Array1Glob
    global Array2Glob

            

Reported by Pylint.

Global variable 'BoolGlob' undefined at the module level
Error

Line: 54 Column: 5

              
def Proc0(loops):
    global IntGlob
    global BoolGlob
    global Char1Glob
    global Char2Glob
    global Array1Glob
    global Array2Glob
    global PtrGlb

            

Reported by Pylint.

Global variable 'Char1Glob' undefined at the module level
Error

Line: 55 Column: 5

              def Proc0(loops):
    global IntGlob
    global BoolGlob
    global Char1Glob
    global Char2Glob
    global Array1Glob
    global Array2Glob
    global PtrGlb
    global PtrGlbNext

            

Reported by Pylint.

Global variable 'Char2Glob' undefined at the module level
Error

Line: 56 Column: 5

                  global IntGlob
    global BoolGlob
    global Char1Glob
    global Char2Glob
    global Array1Glob
    global Array2Glob
    global PtrGlb
    global PtrGlbNext


            

Reported by Pylint.

tools/gendoc.py
129 issues
Unable to import 'markdown'
Error

Line: 8 Column: 1

              import os
import argparse
import re
import markdown

# given a list of (name,regex) pairs, find the first one that matches the given line
def re_match_first(regexs, line):
    for name, regex in regexs:
        match = re.match(regex, line)

            

Reported by Pylint.

Instance of 'MarkdownWriter' has no 'args' member
Error

Line: 108 Column: 50

                      self.para(descr)

    def function(self, ctx, name, args, descr):
        proto = "{}.{}{}".format(ctx, self.name, self.args)
        self.heading(3, "`" + proto + "`")
        self.para(descr)

    def method(self, ctx, name, args, descr):
        if name == "\\constructor":

            

Reported by Pylint.

Instance of 'MarkdownWriter' has no 'name' member
Error

Line: 108 Column: 39

                      self.para(descr)

    def function(self, ctx, name, args, descr):
        proto = "{}.{}{}".format(ctx, self.name, self.args)
        self.heading(3, "`" + proto + "`")
        self.para(descr)

    def method(self, ctx, name, args, descr):
        if name == "\\constructor":

            

Reported by Pylint.

Attribute 'lines' defined outside __init__
Error

Line: 78 Column: 9

                      pass

    def start(self):
        self.lines = []

    def end(self):
        return "\n".join(self.lines)

    def heading(self, level, text):

            

Reported by Pylint.

Unused argument 'short_descr'
Error

Line: 103 Column: 28

                  def single_line(self, text):
        self.lines.append(text)

    def module(self, name, short_descr, descr):
        self.heading(1, "module {}".format(name))
        self.para(descr)

    def function(self, ctx, name, args, descr):
        proto = "{}.{}{}".format(ctx, self.name, self.args)

            

Reported by Pylint.

Unused argument 'args'
Error

Line: 107 Column: 35

                      self.heading(1, "module {}".format(name))
        self.para(descr)

    def function(self, ctx, name, args, descr):
        proto = "{}.{}{}".format(ctx, self.name, self.args)
        self.heading(3, "`" + proto + "`")
        self.para(descr)

    def method(self, ctx, name, args, descr):

            

Reported by Pylint.

Unused argument 'name'
Error

Line: 107 Column: 29

                      self.heading(1, "module {}".format(name))
        self.para(descr)

    def function(self, ctx, name, args, descr):
        proto = "{}.{}{}".format(ctx, self.name, self.args)
        self.heading(3, "`" + proto + "`")
        self.para(descr)

    def method(self, ctx, name, args, descr):

            

Reported by Pylint.

Attribute 'lines' defined outside __init__
Error

Line: 133 Column: 9

                      pass

    def start(self):
        self.lines = []

    def end(self):
        return "\n".join(self.lines)

    def _convert(self, text):

            

Reported by Pylint.

Unused argument 'ctx'
Error

Line: 171 Column: 24

                      self.lines.append("   :synopsis: {}".format(short_descr))
        self.para(descr)

    def function(self, ctx, name, args, descr):
        args = self._convert(args)
        self.lines.append(".. function:: " + name + args)
        self.para(descr, indent="   ")

    def method(self, ctx, name, args, descr):

            

Reported by Pylint.

Unused argument 'ctx'
Error

Line: 186 Column: 24

                          self.lines.append(".. method:: " + ctx + "." + name + args)
        self.para(descr, indent="   ")

    def constant(self, ctx, name, descr):
        self.lines.append(".. data:: " + name)
        self.para(descr, indent="   ")


class DocValidateError(Exception):

            

Reported by Pylint.

tests/perf_bench/bm_hexiom.py
116 issues
Redefining built-in 'id'
Error

Line: 160 Column: 29

              

class Node(object):
    def __init__(self, pos, id, links):
        self.pos = pos
        self.id = id
        self.links = links



            

Reported by Pylint.

Redefining built-in 'id'
Error

Line: 175 Column: 9

                      self.count = 3 * size * (size - 1) + 1
        self.nodes_by_id = self.count * [None]
        self.nodes_by_pos = {}
        id = 0
        for y in range(size):
            for x in range(size + y):
                pos = (x, y)
                node = Node(pos, id, [])
                self.nodes_by_pos[pos] = node

            

Reported by Pylint.

Redefining built-in 'dir'
Error

Line: 195 Column: 17

                  def link_nodes(self):
        for node in self.nodes_by_id:
            (x, y) = node.pos
            for dir in DIRS:
                nx = x + dir.x
                ny = y + dir.y
                if self.contains_pos((nx, ny)):
                    node.links.append(self.nodes_by_pos[(nx, ny)].id)


            

Reported by Pylint.

Redefining built-in 'id'
Error

Line: 207 Column: 25

                  def get_by_pos(self, pos):
        return self.nodes_by_pos[pos]

    def get_by_id(self, id):
        return self.nodes_by_id[id]


##################################
class Pos(object):

            

Reported by Pylint.

Redefining built-in 'hex'
Error

Line: 213 Column: 24

              
##################################
class Pos(object):
    def __init__(self, hex, tiles, done=None):
        self.hex = hex
        self.tiles = tiles
        self.done = Done(hex.count) if done is None else done

    def clone(self):

            

Reported by Pylint.

Redefining built-in 'hex'
Error

Line: 330 Column: 5

              

def print_pos(pos, output):
    hex = pos.hex
    done = pos.done
    size = hex.size
    for y in range(size):
        print(" " * (size - y - 1), end="", file=output)
        for x in range(size + y):

            

Reported by Pylint.

Redefining built-in 'id'
Error

Line: 337 Column: 13

                      print(" " * (size - y - 1), end="", file=output)
        for x in range(size + y):
            pos2 = (x, y)
            id = hex.get_by_pos(pos2).id
            if done.already_done(id):
                c = done[id][0] if done[id][0] != EMPTY else "."
            else:
                c = "?"
            print("%s " % c, end="", file=output)

            

Reported by Pylint.

Unused argument 'verbose'
Error

Line: 363 Column: 25

              IMPOSSIBLE = -1


def solved(pos, output, verbose=False):
    hex = pos.hex
    tiles = pos.tiles[:]
    done = pos.done
    exact = True
    all_done = True

            

Reported by Pylint.

Redefining built-in 'hex'
Error

Line: 364 Column: 5

              

def solved(pos, output, verbose=False):
    hex = pos.hex
    tiles = pos.tiles[:]
    done = pos.done
    exact = True
    all_done = True
    for i in range(hex.count):

            

Reported by Pylint.

Redefining built-in 'hex'
Error

Line: 434 Column: 5

              

def check_valid(pos):
    hex = pos.hex
    tiles = pos.tiles
    # fill missing entries in tiles
    tot = 0
    for i in range(8):
        if tiles[i] > 0:

            

Reported by Pylint.

tests/basics/try_except_break.py
116 issues
Unreachable code
Error

Line: 28 Column: 24

                                    try:
                       print(2)
                       break
                       print(3)
                      except:
                       pass
                     except:
                      pass
                    except:

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 29 Column: 23

                                     print(2)
                       break
                       print(3)
                      except:
                       pass
                     except:
                      pass
                    except:
                     pass

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 31 Column: 22

                                     print(3)
                      except:
                       pass
                     except:
                      pass
                    except:
                     pass
                   except:
                    pass

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 33 Column: 21

                                     pass
                     except:
                      pass
                    except:
                     pass
                   except:
                    pass
                  except:
                   pass

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 35 Column: 20

                                    pass
                    except:
                     pass
                   except:
                    pass
                  except:
                   pass
                 except:
                  pass

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 37 Column: 19

                                   pass
                   except:
                    pass
                  except:
                   pass
                 except:
                  pass
                except:
                 pass

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 39 Column: 18

                                  pass
                  except:
                   pass
                 except:
                  pass
                except:
                 pass
               except:
                pass

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 41 Column: 17

                                 pass
                 except:
                  pass
                except:
                 pass
               except:
                pass
              except:
               pass

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 43 Column: 16

                                pass
                except:
                 pass
               except:
                pass
              except:
               pass
             except:
              pass

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 45 Column: 15

                               pass
               except:
                pass
              except:
               pass
             except:
              pass
            except:
             pass

            

Reported by Pylint.

examples/asmled.py
108 issues
Undefined variable 'micropython'
Error

Line: 3 Column: 2

              # flash LED #1 using inline assembler
# this version is overly verbose and uses word stores
@micropython.asm_thumb
def flash_led(r0):
    movw(r1, (stm.GPIOA + stm.GPIO_BSRRL) & 0xFFFF)
    movt(r1, ((stm.GPIOA + stm.GPIO_BSRRL) >> 16) & 0x7FFF)
    movw(r2, 1 << 13)
    movt(r2, 0)
    movw(r3, 0)

            

Reported by Pylint.

Undefined variable 'stm'
Error

Line: 5 Column: 15

              # this version is overly verbose and uses word stores
@micropython.asm_thumb
def flash_led(r0):
    movw(r1, (stm.GPIOA + stm.GPIO_BSRRL) & 0xFFFF)
    movt(r1, ((stm.GPIOA + stm.GPIO_BSRRL) >> 16) & 0x7FFF)
    movw(r2, 1 << 13)
    movt(r2, 0)
    movw(r3, 0)
    movt(r3, 1 << 13)

            

Reported by Pylint.

Undefined variable 'r1'
Error

Line: 5 Column: 10

              # this version is overly verbose and uses word stores
@micropython.asm_thumb
def flash_led(r0):
    movw(r1, (stm.GPIOA + stm.GPIO_BSRRL) & 0xFFFF)
    movt(r1, ((stm.GPIOA + stm.GPIO_BSRRL) >> 16) & 0x7FFF)
    movw(r2, 1 << 13)
    movt(r2, 0)
    movw(r3, 0)
    movt(r3, 1 << 13)

            

Reported by Pylint.

Undefined variable 'stm'
Error

Line: 5 Column: 27

              # this version is overly verbose and uses word stores
@micropython.asm_thumb
def flash_led(r0):
    movw(r1, (stm.GPIOA + stm.GPIO_BSRRL) & 0xFFFF)
    movt(r1, ((stm.GPIOA + stm.GPIO_BSRRL) >> 16) & 0x7FFF)
    movw(r2, 1 << 13)
    movt(r2, 0)
    movw(r3, 0)
    movt(r3, 1 << 13)

            

Reported by Pylint.

Undefined variable 'movw'
Error

Line: 5 Column: 5

              # this version is overly verbose and uses word stores
@micropython.asm_thumb
def flash_led(r0):
    movw(r1, (stm.GPIOA + stm.GPIO_BSRRL) & 0xFFFF)
    movt(r1, ((stm.GPIOA + stm.GPIO_BSRRL) >> 16) & 0x7FFF)
    movw(r2, 1 << 13)
    movt(r2, 0)
    movw(r3, 0)
    movt(r3, 1 << 13)

            

Reported by Pylint.

Undefined variable 'stm'
Error

Line: 6 Column: 28

              @micropython.asm_thumb
def flash_led(r0):
    movw(r1, (stm.GPIOA + stm.GPIO_BSRRL) & 0xFFFF)
    movt(r1, ((stm.GPIOA + stm.GPIO_BSRRL) >> 16) & 0x7FFF)
    movw(r2, 1 << 13)
    movt(r2, 0)
    movw(r3, 0)
    movt(r3, 1 << 13)


            

Reported by Pylint.

Undefined variable 'r1'
Error

Line: 6 Column: 10

              @micropython.asm_thumb
def flash_led(r0):
    movw(r1, (stm.GPIOA + stm.GPIO_BSRRL) & 0xFFFF)
    movt(r1, ((stm.GPIOA + stm.GPIO_BSRRL) >> 16) & 0x7FFF)
    movw(r2, 1 << 13)
    movt(r2, 0)
    movw(r3, 0)
    movt(r3, 1 << 13)


            

Reported by Pylint.

Undefined variable 'stm'
Error

Line: 6 Column: 16

              @micropython.asm_thumb
def flash_led(r0):
    movw(r1, (stm.GPIOA + stm.GPIO_BSRRL) & 0xFFFF)
    movt(r1, ((stm.GPIOA + stm.GPIO_BSRRL) >> 16) & 0x7FFF)
    movw(r2, 1 << 13)
    movt(r2, 0)
    movw(r3, 0)
    movt(r3, 1 << 13)


            

Reported by Pylint.

Undefined variable 'movt'
Error

Line: 6 Column: 5

              @micropython.asm_thumb
def flash_led(r0):
    movw(r1, (stm.GPIOA + stm.GPIO_BSRRL) & 0xFFFF)
    movt(r1, ((stm.GPIOA + stm.GPIO_BSRRL) >> 16) & 0x7FFF)
    movw(r2, 1 << 13)
    movt(r2, 0)
    movw(r3, 0)
    movt(r3, 1 << 13)


            

Reported by Pylint.

Undefined variable 'r2'
Error

Line: 7 Column: 10

              def flash_led(r0):
    movw(r1, (stm.GPIOA + stm.GPIO_BSRRL) & 0xFFFF)
    movt(r1, ((stm.GPIOA + stm.GPIO_BSRRL) >> 16) & 0x7FFF)
    movw(r2, 1 << 13)
    movt(r2, 0)
    movw(r3, 0)
    movt(r3, 1 << 13)

    b(loop_entry)

            

Reported by Pylint.