The following issues were found
Lib/lib2to3/fixes/fix_reduce.py
1 issues
Line: 15
Column: 1
class FixReduce(fixer_base.BaseFix):
BM_compatible = True
order = "pre"
PATTERN = """
Reported by Pylint.
Include/pyport.h
1 issues
Line: 198
Column: 19
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
/* Py_MEMCPY is kept for backwards compatibility,
* see https://bugs.python.org/issue28126 */
#define Py_MEMCPY memcpy
#include <stdlib.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h> /* needed for 'finite' declaration on some platforms */
Reported by FlawFinder.
Lib/idlelib/__init__.py
1 issues
Line: 10
Column: 1
The other files are private implementations. Their details are subject to
change. See PEP 434 for more. Import them at your own risk.
"""
testing = False # Set True by test.test_idle.
Reported by Pylint.
Lib/ensurepip/_uninstall.py
1 issues
Line: 27
Column: 12
args = parser.parse_args(argv)
return ensurepip._uninstall_helper(verbosity=args.verbosity)
if __name__ == "__main__":
sys.exit(_main())
Reported by Pylint.
Doc/includes/test.py
1 issues
Line: 198
Column: 5
sys.path.append(src)
if __name__ == "__main__":
import doctest, __main__
doctest.testmod(__main__)
Reported by Pylint.
Lib/__phello__.foo.py
1 issues
Line: 1
Column: 1
# This file exists as a helper for the test.test_frozen module.
Reported by Pylint.
Lib/importlib/_itertools.py
1 issues
Line: 1
Column: 1
from itertools import filterfalse
def unique_everseen(iterable, key=None):
"List unique elements, preserving order. Remember all elements ever seen."
# unique_everseen('AAAABBBCCDAABBB') --> A B C D
# unique_everseen('ABBCcAD', str.lower) --> A B C D
seen = set()
seen_add = seen.add
Reported by Pylint.
Lib/email/errors.py
1 issues
Line: 58
Column: 3
class MissingHeaderBodySeparatorDefect(MessageDefect):
"""Found line with no leading whitespace and no colon before blank line."""
# XXX: backward compatibility, just in case (it was never emitted).
MalformedHeaderDefect = MissingHeaderBodySeparatorDefect
class MultipartInvariantViolationDefect(MessageDefect):
"""A message claimed to be a multipart but no subparts were found."""
Reported by Pylint.
Doc/includes/run-func.c
1 issues
Line: 30
Column: 42
CWE codes:
190
Suggestion:
If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended)
if (pFunc && PyCallable_Check(pFunc)) {
pArgs = PyTuple_New(argc - 3);
for (i = 0; i < argc - 3; ++i) {
pValue = PyLong_FromLong(atoi(argv[i + 3]));
if (!pValue) {
Py_DECREF(pArgs);
Py_DECREF(pModule);
fprintf(stderr, "Cannot convert argument\n");
return 1;
Reported by FlawFinder.
Lib/asyncio/exceptions.py
1 issues
Line: 13
Column: 1
"""The Future or Task was cancelled."""
class TimeoutError(Exception):
"""The operation exceeded the given deadline."""
class InvalidStateError(Exception):
"""The operation is not allowed in this state."""
Reported by Pylint.