The following issues were found
tests/internal_bench/bytealloc-1-bytes_n.py
4 issues
Line: 5
Column: 9
def test(num):
for i in iter(range(num // 1000)):
bytes(10000)
bench.run(test)
Reported by Pylint.
Line: 1
Column: 1
import bench
def test(num):
for i in iter(range(num // 1000)):
bytes(10000)
bench.run(test)
Reported by Pylint.
Line: 1
Column: 1
import bench
def test(num):
for i in iter(range(num // 1000)):
bytes(10000)
bench.run(test)
Reported by Pylint.
Line: 4
Column: 1
import bench
def test(num):
for i in iter(range(num // 1000)):
bytes(10000)
bench.run(test)
Reported by Pylint.
tests/internal_bench/func_builtin-1-enum_pos.py
4 issues
Line: 5
Column: 9
def test(num):
for i in iter(range(num // 20)):
enumerate([1, 2], 1)
bench.run(test)
Reported by Pylint.
Line: 1
Column: 1
import bench
def test(num):
for i in iter(range(num // 20)):
enumerate([1, 2], 1)
bench.run(test)
Reported by Pylint.
Line: 1
Column: 1
import bench
def test(num):
for i in iter(range(num // 20)):
enumerate([1, 2], 1)
bench.run(test)
Reported by Pylint.
Line: 4
Column: 1
import bench
def test(num):
for i in iter(range(num // 20)):
enumerate([1, 2], 1)
bench.run(test)
Reported by Pylint.
tests/internal_bench/func_builtin-2-enum_kw.py
4 issues
Line: 5
Column: 9
def test(num):
for i in iter(range(num // 20)):
enumerate(iterable=[1, 2], start=1)
bench.run(test)
Reported by Pylint.
Line: 1
Column: 1
import bench
def test(num):
for i in iter(range(num // 20)):
enumerate(iterable=[1, 2], start=1)
bench.run(test)
Reported by Pylint.
Line: 1
Column: 1
import bench
def test(num):
for i in iter(range(num // 20)):
enumerate(iterable=[1, 2], start=1)
bench.run(test)
Reported by Pylint.
Line: 4
Column: 1
import bench
def test(num):
for i in iter(range(num // 20)):
enumerate(iterable=[1, 2], start=1)
bench.run(test)
Reported by Pylint.
tests/internal_bench/loop_count-1-range.py
4 issues
Line: 5
Column: 9
def test(num):
for i in range(num):
pass
bench.run(test)
Reported by Pylint.
Line: 1
Column: 1
import bench
def test(num):
for i in range(num):
pass
bench.run(test)
Reported by Pylint.
Line: 1
Column: 1
import bench
def test(num):
for i in range(num):
pass
bench.run(test)
Reported by Pylint.
Line: 4
Column: 1
import bench
def test(num):
for i in range(num):
pass
bench.run(test)
Reported by Pylint.
tests/internal_bench/loop_count-2-range_iter.py
4 issues
Line: 5
Column: 9
def test(num):
for i in iter(range(num)):
pass
bench.run(test)
Reported by Pylint.
Line: 1
Column: 1
import bench
def test(num):
for i in iter(range(num)):
pass
bench.run(test)
Reported by Pylint.
Line: 1
Column: 1
import bench
def test(num):
for i in iter(range(num)):
pass
bench.run(test)
Reported by Pylint.
Line: 4
Column: 1
import bench
def test(num):
for i in iter(range(num)):
pass
bench.run(test)
Reported by Pylint.
tests/internal_bench/var-1-constant.py
4 issues
Line: 4
Column: 10
import bench
def test(num):
i = 0
while i < 20000000:
i += 1
Reported by Pylint.
Line: 1
Column: 1
import bench
def test(num):
i = 0
while i < 20000000:
i += 1
Reported by Pylint.
Line: 1
Column: 1
import bench
def test(num):
i = 0
while i < 20000000:
i += 1
Reported by Pylint.
Line: 4
Column: 1
import bench
def test(num):
i = 0
while i < 20000000:
i += 1
Reported by Pylint.
tests/internal_bench/var-2-global.py
4 issues
Line: 6
Column: 10
ITERS = 20000000
def test(num):
i = 0
while i < ITERS:
i += 1
Reported by Pylint.
Line: 1
Column: 1
import bench
ITERS = 20000000
def test(num):
i = 0
while i < ITERS:
i += 1
Reported by Pylint.
Line: 1
Column: 1
import bench
ITERS = 20000000
def test(num):
i = 0
while i < ITERS:
i += 1
Reported by Pylint.
Line: 6
Column: 1
ITERS = 20000000
def test(num):
i = 0
while i < ITERS:
i += 1
Reported by Pylint.
tests/io/resource_stream.py
4 issues
Line: 1
Column: 1
import uio
import usys
try:
uio.resource_stream
except AttributeError:
print("SKIP")
raise SystemExit
Reported by Pylint.
Line: 2
Column: 1
import uio
import usys
try:
uio.resource_stream
except AttributeError:
print("SKIP")
raise SystemExit
Reported by Pylint.
Line: 8
Column: 5
uio.resource_stream
except AttributeError:
print("SKIP")
raise SystemExit
buf = uio.resource_stream("data", "file2")
print(buf.read())
# resource_stream(None, ...) look ups from current dir, hence sys.path[0] hack
Reported by Pylint.
Line: 1
Column: 1
import uio
import usys
try:
uio.resource_stream
except AttributeError:
print("SKIP")
raise SystemExit
Reported by Pylint.
tests/micropython/decorator.py
4 issues
Line: 4
Column: 2
# test micropython-specific decorators
@micropython.bytecode
def f():
return "bytecode"
print(f())
Reported by Pylint.
Line: 1
Column: 1
# test micropython-specific decorators
@micropython.bytecode
def f():
return "bytecode"
print(f())
Reported by Pylint.
Line: 5
Column: 1
@micropython.bytecode
def f():
return "bytecode"
print(f())
Reported by Pylint.
Line: 5
Column: 1
@micropython.bytecode
def f():
return "bytecode"
print(f())
Reported by Pylint.
tests/micropython/decorator_error.py
4 issues
Line: 6
Suggestion:
https://bandit.readthedocs.io/en/latest/plugins/b102_exec_used.html
def test_syntax(code):
try:
exec(code)
except SyntaxError:
print("SyntaxError")
# invalid micropython decorators
Reported by Bandit.
Line: 6
Column: 9
def test_syntax(code):
try:
exec(code)
except SyntaxError:
print("SyntaxError")
# invalid micropython decorators
Reported by Pylint.
Line: 1
Column: 1
# test syntax errors for uPy-specific decorators
def test_syntax(code):
try:
exec(code)
except SyntaxError:
print("SyntaxError")
Reported by Pylint.
Line: 4
Column: 1
# test syntax errors for uPy-specific decorators
def test_syntax(code):
try:
exec(code)
except SyntaxError:
print("SyntaxError")
Reported by Pylint.