The following issues were found

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

Line: 8 Column: 9

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

print(json.dumps(1.2))
print(json.dumps({1.5: "hi"}))

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              try:
    import ujson as json
except ImportError:
    try:
        import json
    except ImportError:
        print("SKIP")
        raise SystemExit


            

Reported by Pylint.

tests/basics/int_big_error.py
2 issues
Value 'i' doesn't support membership test
Error

Line: 16 Column: 10

                  print("TypeError")

try:
    1 in i
except TypeError:
    print("TypeError")

# overflow because arg of bytearray is being converted to machine int
try:

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # test errors operating on bignum

i = 1 << 65

try:
    i << -1
except ValueError:
    print("ValueError")


            

Reported by Pylint.

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

Line: 10 Column: 9

                      from collections import OrderedDict
    except ImportError:
        print("SKIP")
        raise SystemExit

print(json.dumps(OrderedDict(((1, 2), (3, 4)))))

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              try:
    import ujson as json
    from ucollections import OrderedDict
except ImportError:
    try:
        import json
        from collections import OrderedDict
    except ImportError:
        print("SKIP")

            

Reported by Pylint.

ports/esp32/modules/flashbdev.py
2 issues
Unable to import 'esp32'
Error

Line: 1 Column: 1

              from esp32 import Partition

bdev = Partition.find(Partition.TYPE_DATA, label="vfs")
bdev = bdev[0] if bdev else None

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from esp32 import Partition

bdev = Partition.find(Partition.TYPE_DATA, label="vfs")
bdev = bdev[0] if bdev else None

            

Reported by Pylint.

ports/unix/modjni.c
2 issues
Possible null pointer dereference: name
Error

Line: 483 CWE codes: 476

                          ret_type = strprev(meth_name, ' ') - 1;
            ret_type = strprev(ret_type, ' ') + 1;

            int name_len = strlen(name);
            if (strncmp(name, meth_name, name_len /*arg_types - meth_name - 1*/) || meth_name[name_len] != '(' /*(*/) {
                goto next_method;
            }
        }
//        printf("method[%d]=%p %s\n", i, meth, decl);

            

Reported by Cppcheck.

Possible null pointer dereference: name
Error

Line: 484 CWE codes: 476

                          ret_type = strprev(ret_type, ' ') + 1;

            int name_len = strlen(name);
            if (strncmp(name, meth_name, name_len /*arg_types - meth_name - 1*/) || meth_name[name_len] != '(' /*(*/) {
                goto next_method;
            }
        }
//        printf("method[%d]=%p %s\n", i, meth, decl);
//        printf("!!!%s\n", arg_types);

            

Reported by Cppcheck.

ports/esp32/modules/_boot.py
2 issues
Unable to import 'uos'
Error

Line: 2 Column: 1

              import gc
import uos
from flashbdev import bdev

try:
    if bdev:
        uos.mount(bdev, "/")
except OSError:
    import inisetup

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import gc
import uos
from flashbdev import bdev

try:
    if bdev:
        uos.mount(bdev, "/")
except OSError:
    import inisetup

            

Reported by Pylint.

tests/basics/bytes_compare_array.py
2 issues
Consider explicitly re-raising using the 'from' keyword
Error

Line: 8 Column: 9

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

print(array.array('b', [1, 2]) in b'\x01\x02\x03')
# CPython gives False here
#print(b"\x01\x02\x03" == array.array("B", [1, 2, 3]))

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              try:
    import uarray as array
except ImportError:
    try:
        import array
    except ImportError:
        print("SKIP")
        raise SystemExit


            

Reported by Pylint.

tests/import/pkg6/__init__.py
2 issues
Unable to import '__init__.x'
Error

Line: 1 Column: 1

              from .x import *

print("init")

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from .x import *

print("init")

            

Reported by Pylint.

ports/esp32/boards/UM_TINYPICO/modules/dotstar.py
2 issues
Missing module docstring
Error

Line: 1 Column: 1

              # DotStar strip driver for MicroPython
#
# The MIT License (MIT)
#
# Copyright (c) 2016 Damien P. George (original Neopixel object)
# Copyright (c) 2017 Ladyada
# Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
# Copyright (c) 2019 Matt Trentini (porting back to MicroPython)
#

            

Reported by Pylint.

Too many instance attributes (9/7)
Error

Line: 40 Column: 1

              BGR = (2, 1, 0)


class DotStar:
    """
    A sequence of dotstars.

    :param SPI spi: The SPI object to write output to.
    :param int n: The number of dotstars in the chain

            

Reported by Pylint.

tests/import/pkg6/x/__init__.py
2 issues
Unable to import '__init__.y'
Error

Line: 1 Column: 1

              from .y import *

print("x")

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from .y import *

print("x")

            

Reported by Pylint.