The following issues were found

tests/thread/thread_heap_lock.py
4 issues
Unable to import 'micropython'
Error

Line: 3 Column: 1

              # test interaction of micropython.heap_lock with threads

import _thread, micropython

lock1 = _thread.allocate_lock()
lock2 = _thread.allocate_lock()


def thread_entry():

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # test interaction of micropython.heap_lock with threads

import _thread, micropython

lock1 = _thread.allocate_lock()
lock2 = _thread.allocate_lock()


def thread_entry():

            

Reported by Pylint.

Multiple imports on one line (_thread, micropython)
Error

Line: 3 Column: 1

              # test interaction of micropython.heap_lock with threads

import _thread, micropython

lock1 = _thread.allocate_lock()
lock2 = _thread.allocate_lock()


def thread_entry():

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 9 Column: 1

              lock2 = _thread.allocate_lock()


def thread_entry():
    lock1.acquire()
    print([1, 2, 3])
    lock2.release()



            

Reported by Pylint.

tests/unicode/file2.py
4 issues
Missing module docstring
Error

Line: 1 Column: 1

              # test reading a given number of characters


def do(mode):
    if mode == "rb":
        enc = None
    else:
        enc = "utf-8"
    f = open("unicode/data/utf-8_2.txt", mode=mode, encoding=enc)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 4 Column: 1

              # test reading a given number of characters


def do(mode):
    if mode == "rb":
        enc = None
    else:
        enc = "utf-8"
    f = open("unicode/data/utf-8_2.txt", mode=mode, encoding=enc)

            

Reported by Pylint.

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

Line: 4 Column: 1

              # test reading a given number of characters


def do(mode):
    if mode == "rb":
        enc = None
    else:
        enc = "utf-8"
    f = open("unicode/data/utf-8_2.txt", mode=mode, encoding=enc)

            

Reported by Pylint.

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

Line: 9 Column: 5

                      enc = None
    else:
        enc = "utf-8"
    f = open("unicode/data/utf-8_2.txt", mode=mode, encoding=enc)
    print(f.read(1))
    print(f.read(1))
    print(f.read(2))
    print(f.read(4))


            

Reported by Pylint.

examples/natmod/btree/btree_py.py
4 issues
Undefined variable '_open'
Error

Line: 3 Column: 12

              # Implemented in Python to support keyword arguments
def open(stream, *, flags=0, cachesize=0, pagesize=0, minkeypage=0):
    return _open(stream, flags, cachesize, pagesize, minkeypage)

            

Reported by Pylint.

Redefining built-in 'open'
Error

Line: 2 Column: 1

              # Implemented in Python to support keyword arguments
def open(stream, *, flags=0, cachesize=0, pagesize=0, minkeypage=0):
    return _open(stream, flags, cachesize, pagesize, minkeypage)

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Implemented in Python to support keyword arguments
def open(stream, *, flags=0, cachesize=0, pagesize=0, minkeypage=0):
    return _open(stream, flags, cachesize, pagesize, minkeypage)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 2 Column: 1

              # Implemented in Python to support keyword arguments
def open(stream, *, flags=0, cachesize=0, pagesize=0, minkeypage=0):
    return _open(stream, flags, cachesize, pagesize, minkeypage)

            

Reported by Pylint.

tests/wipy/reset/reset.py
4 issues
Unable to import 'machine'
Error

Line: 7 Column: 1

              with the default WLAN AP settings
"""

from machine import WDT
import time
import os

mch = os.uname().machine
if not "LaunchPad" in mch and not "WiPy" in mch:

            

Reported by Pylint.

Module 'time' has no 'sleep_ms' member
Error

Line: 17 Column: 1

              
wdt = WDT(timeout=1000)
print(wdt)
time.sleep_ms(900)

            

Reported by Pylint.

standard import "import time" should be placed before "from machine import WDT"
Error

Line: 8 Column: 1

              """

from machine import WDT
import time
import os

mch = os.uname().machine
if not "LaunchPad" in mch and not "WiPy" in mch:
    raise Exception("Board not supported!")

            

Reported by Pylint.

standard import "import os" should be placed before "from machine import WDT"
Error

Line: 9 Column: 1

              
from machine import WDT
import time
import os

mch = os.uname().machine
if not "LaunchPad" in mch and not "WiPy" in mch:
    raise Exception("Board not supported!")


            

Reported by Pylint.

tests/basics/builtin_minmax.py
4 issues
Statement seems to have no effect
Error

Line: 3 Column: 5

              # test builtin min and max functions
try:
    min
    max
except:
    print("SKIP")
    raise SystemExit

print(min(0,1))

            

Reported by Pylint.

Statement seems to have no effect
Error

Line: 4 Column: 5

              # test builtin min and max functions
try:
    min
    max
except:
    print("SKIP")
    raise SystemExit

print(min(0,1))

            

Reported by Pylint.

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

Line: 7 Column: 5

                  max
except:
    print("SKIP")
    raise SystemExit

print(min(0,1))
print(min(1,0))
print(min(0,-1))
print(min(-1,0))

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # test builtin min and max functions
try:
    min
    max
except:
    print("SKIP")
    raise SystemExit

print(min(0,1))

            

Reported by Pylint.

tests/import/import_pkg1.py
3 issues
Reimport 'pkg.mod' (imported line 1)
Error

Line: 14 Column: 1

              print(pkg_.mod is pkg.mod)

# import using "as"
import pkg.mod as mm

print(mm is pkg.mod)
print(mm.foo())

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import pkg.mod

print(pkg.__name__)
print(pkg.mod.__name__)
print(pkg.mod.foo())

# Import 2nd time, must be same module objects
pkg_ = __import__("pkg.mod")
print(pkg_ is not pkg.mod)

            

Reported by Pylint.

Import "import pkg.mod as mm" should be placed at the top of the module
Error

Line: 14 Column: 1

              print(pkg_.mod is pkg.mod)

# import using "as"
import pkg.mod as mm

print(mm is pkg.mod)
print(mm.foo())

            

Reported by Pylint.

tests/cpydiff/modules3/foo.py
3 issues
Missing module docstring
Error

Line: 1 Column: 1

              def hello():
    print("hello")

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 1 Column: 1

              def hello():
    print("hello")

            

Reported by Pylint.

Black listed name "foo"
Error

Line: 1 Column: 1

              def hello():
    print("hello")

            

Reported by Pylint.

tests/import/import2a.py
3 issues
Reimport 'var' (imported line 1)
Error

Line: 5 Column: 1

              
print(var)

from import1b import var as var2

print(var2)

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from import1b import var

print(var)

from import1b import var as var2

print(var2)

            

Reported by Pylint.

Import "from import1b import var as var2" should be placed at the top of the module
Error

Line: 5 Column: 1

              
print(var)

from import1b import var as var2

print(var2)

            

Reported by Pylint.

tests/import/import_pkg3.py
3 issues
Reimport 'pkg.mod' (imported line 1)
Error

Line: 5 Column: 1

              
print(mod.foo())

import pkg.mod

print(mod is pkg.mod)

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from pkg import mod

print(mod.foo())

import pkg.mod

print(mod is pkg.mod)

            

Reported by Pylint.

Import "import pkg.mod" should be placed at the top of the module
Error

Line: 5 Column: 1

              
print(mod.foo())

import pkg.mod

print(mod is pkg.mod)

            

Reported by Pylint.

tests/basics/fun1.py
3 issues
Missing module docstring
Error

Line: 1 Column: 1

              # calling a function

def f():
    print(1)
f()

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 3 Column: 1

              # calling a function

def f():
    print(1)
f()

            

Reported by Pylint.

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

Line: 3 Column: 1

              # calling a function

def f():
    print(1)
f()

            

Reported by Pylint.