The following issues were found
tests/float/builtin_float_round.py
2 issues
Line: 1
Column: 1
# test round() with floats
# check basic cases
tests = [
[0.0],
[1.0],
[0.1],
[-0.1],
[123.4],
Reported by Pylint.
Line: 33
Column: 5
for val in (float("inf"), float("nan")):
try:
round(val)
except (ValueError, OverflowError) as e:
print(type(e))
Reported by Pylint.
tests/thread/thread_lock5.py
2 issues
Line: 1
Column: 1
# test _thread lock objects where a lock is acquired/released by a different thread
import _thread
def thread_entry():
print("thread about to release lock")
lock.release()
Reported by Pylint.
Line: 6
Column: 1
import _thread
def thread_entry():
print("thread about to release lock")
lock.release()
lock = _thread.allocate_lock()
Reported by Pylint.
drivers/neopixel/manifest.py
2 issues
Line: 1
Column: 1
freeze(
".",
"neopixel.py",
opt=3,
)
Reported by Pylint.
Line: 1
Column: 1
freeze(
".",
"neopixel.py",
opt=3,
)
Reported by Pylint.
tests/float/bytearray_construct_endian.py
2 issues
Line: 10
Column: 9
from array import array
except ImportError:
print("SKIP")
raise SystemExit
print(bytearray(array("f", [1, 2.5])))
Reported by Pylint.
Line: 1
Column: 1
# test construction of bytearray from array with float type
try:
from uarray import array
except ImportError:
try:
from array import array
except ImportError:
print("SKIP")
Reported by Pylint.
tests/basics/bytes_strip.py
2 issues
Line: 1
Column: 1
print(b"".strip())
print(b" \t\n\r\v\f".strip())
print(b" T E S T".strip())
print(b"abcabc".strip(b"ce"))
print(b"aaa".strip(b"b"))
print(b"abc efg ".strip(b"g a"))
print(b' spacious '.lstrip())
print(b'www.example.com'.lstrip(b'cmowz.'))
Reported by Pylint.
Line: 15
Column: 1
print(b'mississippi'.rstrip(b'ipz'))
# Test that stripping unstrippable string returns original object
s = b"abc"
print(id(s.strip()) == id(s))
Reported by Pylint.
tests/float/bytes_construct_endian.py
2 issues
Line: 10
Column: 9
from array import array
except ImportError:
print("SKIP")
raise SystemExit
print(bytes(array("f", [1, 2.5])))
Reported by Pylint.
Line: 1
Column: 1
# test construction of bytes from array with float type
try:
from uarray import array
except ImportError:
try:
from array import array
except ImportError:
print("SKIP")
Reported by Pylint.
tests/basics/array_construct.py
2 issues
Line: 10
Column: 9
from array import array
except ImportError:
print("SKIP")
raise SystemExit
# tuple, list
print(array('b', (1, 2)))
print(array('h', [1, 2]))
Reported by Pylint.
Line: 1
Column: 1
# test construction of array.array from different objects
try:
from uarray import array
except ImportError:
try:
from array import array
except ImportError:
print("SKIP")
Reported by Pylint.
tests/basics/set_comprehension.py
2 issues
Line: 1
Column: 1
print({a for a in range(5)})
Reported by Pylint.
Line: 1
Column: 1
print({a for a in range(5)})
Reported by Pylint.
tests/cpydiff/types_exception_subclassinit.py
2 issues
Line: 13
Column: 1
"""
class A(Exception):
def __init__(self):
Exception.__init__(self)
a = A()
Reported by Pylint.
Line: 13
Column: 1
"""
class A(Exception):
def __init__(self):
Exception.__init__(self)
a = A()
Reported by Pylint.
tests/unicode/unicode_subscr.py
2 issues
Line: 1
Column: 1
a = "¢пр"
print(a[0], a[0:1])
print(a[1], a[1:2])
print(a[2], a[2:3])
try:
print(a[3])
except IndexError:
print("IndexError")
Reported by Pylint.
Line: 1
Column: 1
a = "¢пр"
print(a[0], a[0:1])
print(a[1], a[1:2])
print(a[2], a[2:3])
try:
print(a[3])
except IndexError:
print("IndexError")
Reported by Pylint.