The following issues were found
tests/basics/builtin_enumerate.py
2 issues
Line: 5
Column: 5
enumerate
except:
print("SKIP")
raise SystemExit
print(list(enumerate([])))
print(list(enumerate([1, 2, 3])))
print(list(enumerate([1, 2, 3], 5)))
print(list(enumerate([1, 2, 3], -5)))
Reported by Pylint.
Line: 1
Column: 1
try:
enumerate
except:
print("SKIP")
raise SystemExit
print(list(enumerate([])))
print(list(enumerate([1, 2, 3])))
print(list(enumerate([1, 2, 3], 5)))
Reported by Pylint.
tests/basics/builtin_filter.py
2 issues
Line: 5
Column: 5
filter
except:
print("SKIP")
raise SystemExit
print(list(filter(lambda x: x & 1, range(-3, 4))))
print(list(filter(None, range(-3, 4))))
Reported by Pylint.
Line: 1
Column: 1
try:
filter
except:
print("SKIP")
raise SystemExit
print(list(filter(lambda x: x & 1, range(-3, 4))))
print(list(filter(None, range(-3, 4))))
Reported by Pylint.
tests/basics/fun_error2.py
2 issues
Line: 6
Column: 5
enumerate
except:
print("SKIP")
raise SystemExit
# function with keyword args not given a specific keyword arg
try:
enumerate()
except TypeError:
Reported by Pylint.
Line: 1
Column: 1
# test errors from bad function calls
try:
enumerate
except:
print("SKIP")
raise SystemExit
# function with keyword args not given a specific keyword arg
try:
Reported by Pylint.
tests/basics/builtin_hash_gen.py
2 issues
Line: 1
Column: 1
# test builtin hash function, on generators
def gen():
yield
print(type(hash(gen)))
print(type(hash(gen())))
Reported by Pylint.
Line: 3
Column: 1
# test builtin hash function, on generators
def gen():
yield
print(type(hash(gen)))
print(type(hash(gen())))
Reported by Pylint.
docs/readthedocs/settings/local_settings.py
2 issues
Line: 1
Column: 1
import os
# Directory that the project lives in, aka ../..
SITE_ROOT = '/'.join(os.path.dirname(__file__).split('/')[0:-2])
TEMPLATE_DIRS = (
"%s/templates/" % SITE_ROOT, # Your custom template directory, before the RTD one to override it.
"%s/readthedocs/templates/" % SITE_ROOT, # Default RTD template dir
)
Reported by Pylint.
Line: 7
Column: 1
SITE_ROOT = '/'.join(os.path.dirname(__file__).split('/')[0:-2])
TEMPLATE_DIRS = (
"%s/templates/" % SITE_ROOT, # Your custom template directory, before the RTD one to override it.
"%s/readthedocs/templates/" % SITE_ROOT, # Default RTD template dir
)
Reported by Pylint.
tests/basics/bytes_gen.py
2 issues
Line: 1
Column: 1
# construct a bytes object from a generator
def gen():
for i in range(4):
yield i
print(bytes(gen()))
Reported by Pylint.
Line: 2
Column: 1
# construct a bytes object from a generator
def gen():
for i in range(4):
yield i
print(bytes(gen()))
Reported by Pylint.
tests/basics/frozenset_set.py
2 issues
Line: 5
Column: 5
frozenset
except NameError:
print("SKIP")
raise SystemExit
# Examples from https://docs.python.org/3/library/stdtypes.html#set
# "Instances of set are compared to instances of frozenset based on their
# members. For example:"
print(set('abc') == frozenset('abc'))
Reported by Pylint.
Line: 1
Column: 1
try:
frozenset
except NameError:
print("SKIP")
raise SystemExit
# Examples from https://docs.python.org/3/library/stdtypes.html#set
# "Instances of set are compared to instances of frozenset based on their
# members. For example:"
Reported by Pylint.
tests/basics/frozenset_difference.py
2 issues
Line: 5
Column: 5
frozenset
except NameError:
print("SKIP")
raise SystemExit
l = [1, 2, 3, 4]
s = frozenset(l)
outs = [s.difference(),
s.difference(frozenset({1})),
Reported by Pylint.
Line: 1
Column: 1
try:
frozenset
except NameError:
print("SKIP")
raise SystemExit
l = [1, 2, 3, 4]
s = frozenset(l)
outs = [s.difference(),
Reported by Pylint.
lib/libm_dbl/log1p.c
2 issues
Line: 113
CWE codes:
908
u.i = (uint64_t)hu<<32 | (u.i&0xffffffff);
f = u.f - 1;
}
hfsq = 0.5*f*f;
s = f/(2.0+f);
z = s*s;
w = z*z;
t1 = w*(Lg2+w*(Lg4+w*Lg6));
t2 = z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7)));
Reported by Cppcheck.
Line: 121
CWE codes:
908
t2 = z*(Lg1+w*(Lg3+w*(Lg5+w*Lg7)));
R = t2 + t1;
dk = k;
return s*(hfsq+R) + (dk*ln2_lo+c) - hfsq + f + dk*ln2_hi;
}
Reported by Cppcheck.
lib/libm/log1pf.c
2 issues
Line: 74
CWE codes:
908
u.i = iu;
f = u.f - 1;
}
s = f/(2.0f + f);
z = s*s;
w = z*z;
t1= w*(Lg2+w*Lg4);
t2= z*(Lg1+w*Lg3);
R = t2 + t1;
Reported by Cppcheck.
Line: 82
CWE codes:
908
R = t2 + t1;
hfsq = 0.5f*f*f;
dk = k;
return s*(hfsq+R) + (dk*ln2_lo+c) - hfsq + f + dk*ln2_hi;
}
Reported by Cppcheck.