The following issues were found
tests/io/file_seek.py
1 issues
Line: 1
Column: 1
f = open("io/data/file1", "rb")
print(f.seek(6))
print(f.read(5))
print(f.tell())
print(f.seek(0, 1))
print(f.read(4))
print(f.tell())
Reported by Pylint.
tests/io/file_stdio.py
1 issues
Line: 1
Column: 1
try:
import usys as sys
except ImportError:
import sys
print(sys.stdin.fileno())
print(sys.stdout.fileno())
Reported by Pylint.
tests/io/open_append.py
1 issues
Line: 1
Column: 1
try:
import uos as os
except ImportError:
import os
if not hasattr(os, "remove"):
print("SKIP")
raise SystemExit
Reported by Pylint.
tests/basics/module1.py
1 issues
Line: 1
Column: 1
# test behaviour of module objects
# this module should always exist
import __main__
# print module
print(repr(__main__).startswith("<module '__main__'"))
# store new attribute
Reported by Pylint.
tests/basics/bytes_add.py
1 issues
Line: 1
Column: 1
# test bytes + other
print(b"123" + b"456")
print(b"123" + b"") # RHS is empty, can be optimised
print(b"" + b"123") # LHS is empty, can be optimised
Reported by Pylint.
py/objexcept.c
1 issues
Line: 299
// List of all exceptions, arranged as in the table at:
// http://docs.python.org/3/library/exceptions.html
MP_DEFINE_EXCEPTION(SystemExit, BaseException)
MP_DEFINE_EXCEPTION(KeyboardInterrupt, BaseException)
MP_DEFINE_EXCEPTION(GeneratorExit, BaseException)
MP_DEFINE_EXCEPTION(Exception, BaseException)
#if MICROPY_PY_ASYNC_AWAIT
MP_DEFINE_EXCEPTION(StopAsyncIteration, Exception)
Reported by Cppcheck.
ports/powerpc/frozentest.py
1 issues
Line: 1
Column: 1
print("uPy")
print("a long string that is not interned")
print("a string that has unicode αβγ chars")
print(b"bytes 1234\x01")
print(123456789)
for i in range(4):
print(i)
Reported by Pylint.
tests/basics/bytearray_intbig.py
1 issues
Line: 1
Column: 1
print(bytearray(2**65 - (2**65 - 1)))
Reported by Pylint.
drivers/cyw43/cyw43_ctrl.c
1 issues
Line: 159
int ret = cyw43_ll_bus_init(&self->cyw43_ll, mac);
if (ret != 0) {
CYW_EXIT
return ret;
}
// Enable async events from low-level driver
cyw43_sleep = CYW43_SLEEP_MAX;
Reported by Cppcheck.
tests/basics/memoryerror.py
1 issues
Line: 1
Column: 1
# test out-of-memory with malloc
l = list(range(1000))
try:
1000000000 * l
except MemoryError:
print('MemoryError')
print(len(l), l[0], l[-1])
# test out-of-memory with realloc
Reported by Pylint.