The following issues were found
src/third_party/wiredtiger/src/docs/tools/doxypy.py
285 issues
Line: 47
Column: 1
import sys
import re
from optparse import OptionParser, OptionGroup
class FSM(object):
"""Implements a finite state machine.
Transitions are given as 4-tuples, consisting of an origin state, a target
Reported by Pylint.
Line: 47
Column: 1
import sys
import re
from optparse import OptionParser, OptionGroup
class FSM(object):
"""Implements a finite state machine.
Transitions are given as 4-tuples, consisting of an origin state, a target
Reported by Pylint.
Line: 58
Column: 2
to be called upon the execution of the given transition.
"""
"""
@var transitions holds the transitions
@var current_state holds the current state
@var current_input holds the current input
@var current_transition hold the currently active transition
"""
Reported by Pylint.
Line: 65
Column: 2
@var current_transition hold the currently active transition
"""
def __init__(self, start_state=None, transitions=[]):
self.transitions = transitions
self.current_state = start_state
self.current_input = None
self.current_transition = None
Reported by Pylint.
Line: 77
Column: 27
def addTransition(self, from_state, to_state, condition, callback):
self.transitions.append([from_state, to_state, condition, callback])
def makeTransition(self, input):
"""Makes a transition based on the given input.
@param input input to parse by the FSM
"""
for transition in self.transitions:
Reported by Pylint.
Line: 99
Column: 47
def __init__(self):
string_prefixes = "[uU]?[rR]?"
self.start_single_comment_re = re.compile("^\s*%s(''')" % string_prefixes)
self.end_single_comment_re = re.compile("(''')\s*$")
self.start_double_comment_re = re.compile("^\s*%s(\"\"\")" % string_prefixes)
self.end_double_comment_re = re.compile("(\"\"\")\s*$")
Reported by Pylint.
Line: 100
Column: 49
string_prefixes = "[uU]?[rR]?"
self.start_single_comment_re = re.compile("^\s*%s(''')" % string_prefixes)
self.end_single_comment_re = re.compile("(''')\s*$")
self.start_double_comment_re = re.compile("^\s*%s(\"\"\")" % string_prefixes)
self.end_double_comment_re = re.compile("(\"\"\")\s*$")
self.single_comment_re = re.compile("^\s*%s(''').*(''')\s*$" % string_prefixes)
Reported by Pylint.
Line: 102
Column: 47
self.start_single_comment_re = re.compile("^\s*%s(''')" % string_prefixes)
self.end_single_comment_re = re.compile("(''')\s*$")
self.start_double_comment_re = re.compile("^\s*%s(\"\"\")" % string_prefixes)
self.end_double_comment_re = re.compile("(\"\"\")\s*$")
self.single_comment_re = re.compile("^\s*%s(''').*(''')\s*$" % string_prefixes)
self.double_comment_re = re.compile("^\s*%s(\"\"\").*(\"\"\")\s*$" % string_prefixes)
Reported by Pylint.
Line: 103
Column: 52
self.end_single_comment_re = re.compile("(''')\s*$")
self.start_double_comment_re = re.compile("^\s*%s(\"\"\")" % string_prefixes)
self.end_double_comment_re = re.compile("(\"\"\")\s*$")
self.single_comment_re = re.compile("^\s*%s(''').*(''')\s*$" % string_prefixes)
self.double_comment_re = re.compile("^\s*%s(\"\"\").*(\"\"\")\s*$" % string_prefixes)
self.defclass_re = re.compile("^(\s*)(def .+:|class .+:)")
Reported by Pylint.
Line: 105
Column: 58
self.start_double_comment_re = re.compile("^\s*%s(\"\"\")" % string_prefixes)
self.end_double_comment_re = re.compile("(\"\"\")\s*$")
self.single_comment_re = re.compile("^\s*%s(''').*(''')\s*$" % string_prefixes)
self.double_comment_re = re.compile("^\s*%s(\"\"\").*(\"\"\")\s*$" % string_prefixes)
self.defclass_re = re.compile("^(\s*)(def .+:|class .+:)")
self.empty_re = re.compile("^\s*$")
self.hashline_re = re.compile("^\s*#.*$")
Reported by Pylint.
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Util.py
269 issues
Line: 1005
Suggestion:
https://bandit.readthedocs.io/en/latest/plugins/b605_start_process_with_a_shell.html
def get_native_path(path):
"""Transforms an absolute path into a native path for the system. In
Cygwin, this converts from a Cygwin path to a Windows one."""
with os.popen('cygpath -w ' + path) as p:
npath = p.read().replace('\n', '')
return npath
else:
def get_native_path(path):
"""Transforms an absolute path into a native path for the system.
Reported by Bandit.
Line: 716
Column: 5
def RegGetValue(root, key):
raise WinError
def RegOpenKeyEx(root, key):
raise WinError
if sys.platform == 'win32':
def WhereIs(file, path=None, pathext=None, reject=[]):
Reported by Pylint.
Line: 34
Column: 1
import copy
import re
import types
import codecs
import pprint
import hashlib
PY3 = sys.version_info[0] == 3
Reported by Pylint.
Line: 48
Column: 5
from UserString import UserString
try:
from collections.abc import Iterable, MappingView
except ImportError:
from collections import Iterable
from collections import OrderedDict
Reported by Pylint.
Line: 70
Column: 1
else:
UnicodeType = unicode
def dictify(keys, values, result={}):
for k, v in zip(keys, values):
result[k] = v
return result
_altsep = os.altsep
Reported by Pylint.
Line: 88
Column: 17
# First two from the Python Cookbook, just for completeness.
# (Yeah, yeah, YAGNI...)
def containsAny(str, set):
"""Check whether sequence str contains ANY of the items in set."""
for c in set:
if c in str: return 1
return 0
Reported by Pylint.
Line: 88
Column: 22
# First two from the Python Cookbook, just for completeness.
# (Yeah, yeah, YAGNI...)
def containsAny(str, set):
"""Check whether sequence str contains ANY of the items in set."""
for c in set:
if c in str: return 1
return 0
Reported by Pylint.
Line: 94
Column: 22
if c in str: return 1
return 0
def containsAll(str, set):
"""Check whether sequence str contains ALL of the items in set."""
for c in set:
if c not in str: return 0
return 1
Reported by Pylint.
Line: 94
Column: 17
if c in str: return 1
return 0
def containsAll(str, set):
"""Check whether sequence str contains ALL of the items in set."""
for c in set:
if c not in str: return 0
return 1
Reported by Pylint.
Line: 100
Column: 23
if c not in str: return 0
return 1
def containsOnly(str, set):
"""Check whether sequence str contains ONLY items in set."""
for c in str:
if c not in set: return 0
return 1
Reported by Pylint.
src/third_party/wiredtiger/test/3rdparty/python-subunit-0.0.16/python/subunit/tests/test_test_protocol.py
261 issues
Line: 21
Column: 1
import unittest
import os
from testtools import PlaceHolder, skipIf, TestCase, TestResult
from testtools.compat import _b, _u, BytesIO
from testtools.content import Content, TracebackContent, text_content
from testtools.content_type import ContentType
try:
from testtools.testresult.doubles import (
Reported by Pylint.
Line: 22
Column: 1
import os
from testtools import PlaceHolder, skipIf, TestCase, TestResult
from testtools.compat import _b, _u, BytesIO
from testtools.content import Content, TracebackContent, text_content
from testtools.content_type import ContentType
try:
from testtools.testresult.doubles import (
Python26TestResult,
Reported by Pylint.
Line: 23
Column: 1
from testtools import PlaceHolder, skipIf, TestCase, TestResult
from testtools.compat import _b, _u, BytesIO
from testtools.content import Content, TracebackContent, text_content
from testtools.content_type import ContentType
try:
from testtools.testresult.doubles import (
Python26TestResult,
Python27TestResult,
Reported by Pylint.
Line: 24
Column: 1
from testtools import PlaceHolder, skipIf, TestCase, TestResult
from testtools.compat import _b, _u, BytesIO
from testtools.content import Content, TracebackContent, text_content
from testtools.content_type import ContentType
try:
from testtools.testresult.doubles import (
Python26TestResult,
Python27TestResult,
ExtendedTestResult,
Reported by Pylint.
Line: 37
Column: 1
Python27TestResult,
ExtendedTestResult,
)
from testtools.matchers import Contains
import subunit
from subunit.tests import (
_remote_exception_repr,
_remote_exception_str,
Reported by Pylint.
Line: 406
Column: 9
def test__outcome_sets_details_parser(self):
self.protocol._reading_success_details.details_parser = None
self.protocol._state._outcome(0, _b("mcdonalds farm [ multipart\n"),
None, self.protocol._reading_success_details)
parser = self.protocol._reading_success_details.details_parser
self.assertNotEqual(None, parser)
self.assertTrue(isinstance(parser,
subunit.details.MultipartDetailsParser))
Reported by Pylint.
Line: 527
Column: 9
"""
def capture_expected_failure(self, test, err):
self._events.append((test, err))
def setup_python26(self):
"""Setup a test object ready to be xfailed and thunk to success."""
self.client = Python26TestResult()
self.setup_protocol()
Reported by Pylint.
Line: 49
Column: 12
def details_to_str(details):
return TestResult()._err_details_to_string(None, details=details)
class TestTestImports(unittest.TestCase):
def test_imports(self):
Reported by Pylint.
Line: 55
Column: 9
class TestTestImports(unittest.TestCase):
def test_imports(self):
from subunit import DiscardStream
from subunit import TestProtocolServer
from subunit import RemotedTestCase
from subunit import RemoteError
from subunit import ExecTestCase
from subunit import IsolatedTestCase
Reported by Pylint.
Line: 56
Column: 9
def test_imports(self):
from subunit import DiscardStream
from subunit import TestProtocolServer
from subunit import RemotedTestCase
from subunit import RemoteError
from subunit import ExecTestCase
from subunit import IsolatedTestCase
from subunit import TestProtocolClient
Reported by Pylint.
src/third_party/wiredtiger/test/3rdparty/testtools-0.9.34/testtools/testresult/real.py
258 issues
Line: 30
Column: 1
import sys
import unittest
from extras import safe_hasattr, try_import, try_imports
parse_mime_type = try_import('mimeparse.parse_mime_type')
Queue = try_imports(['Queue.Queue', 'queue.Queue'])
from testtools.compat import all, str_is_unicode, _u, _b
from testtools.content import (
Reported by Pylint.
Line: 1381
Column: 5
self.__now = None
self._started = True
def stopTest(self, test):
self._tags = self._tags.parent
@property
def current_tags(self):
"""The currently set tags."""
Reported by Pylint.
Line: 1704
Column: 36
if not str_is_unicode:
def __init__(self, string):
if type(string) is not unicode:
raise TypeError("_StringException expects unicode, got %r" %
(string,))
Exception.__init__(self, string)
def __str__(self):
Reported by Pylint.
Line: 1709
Column: 9
(string,))
Exception.__init__(self, string)
def __str__(self):
return self.args[0].encode("utf-8")
def __unicode__(self):
return self.args[0]
# For 3.0 and above the default __str__ is fine, so we don't define one.
Reported by Pylint.
Line: 34
Column: 1
parse_mime_type = try_import('mimeparse.parse_mime_type')
Queue = try_imports(['Queue.Queue', 'queue.Queue'])
from testtools.compat import all, str_is_unicode, _u, _b
from testtools.content import (
Content,
text_content,
TracebackContent,
)
Reported by Pylint.
Line: 83
Column: 5
:ivar skip_reasons: A dict of skip-reasons -> list of tests. See addSkip.
"""
def __init__(self, failfast=False):
# startTestRun resets all attributes, and older clients don't know to
# call startTestRun, so it is called once here.
# Because subclasses may reasonably not expect this, we call the
# specific version we want to run.
self.failfast = failfast
Reported by Pylint.
Line: 91
Column: 5
self.failfast = failfast
TestResult.startTestRun(self)
def addExpectedFailure(self, test, err=None, details=None):
"""Called when a test has failed in an expected manner.
Like with addSuccess and addError, testStopped should still be called.
:param test: The test that has been skipped.
Reported by Pylint.
Line: 104
Column: 5
self.expectedFailures.append(
(test, self._err_details_to_string(test, err, details)))
def addError(self, test, err=None, details=None):
"""Called when an error has occurred. 'err' is a tuple of values as
returned by sys.exc_info().
:param details: Alternative way to supply details about the outcome.
see the class docstring for more information.
Reported by Pylint.
Line: 116
Column: 5
if self.failfast:
self.stop()
def addFailure(self, test, err=None, details=None):
"""Called when an error has occurred. 'err' is a tuple of values as
returned by sys.exc_info().
:param details: Alternative way to supply details about the outcome.
see the class docstring for more information.
Reported by Pylint.
Line: 128
Column: 5
if self.failfast:
self.stop()
def addSkip(self, test, reason=None, details=None):
"""Called when a test has been skipped rather than running.
Like with addSuccess and addError, testStopped should still be called.
This must be called by the TestCase. 'addError' and 'addFailure' will
Reported by Pylint.
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/SConf.py
236 issues
Line: 254
Column: 13
exc_type = self.exc_info()[0]
if issubclass(exc_type, SConfError):
# TODO pylint E0704: bare raise not inside except
raise
elif issubclass(exc_type, SCons.Errors.BuildError):
# we ignore Build Errors (occurs, when a test doesn't pass)
# Clear the exception to prevent the contained traceback
# to build a reference cycle.
self.exc_clear()
Reported by Pylint.
Line: 69
Column: 18
build_type = None
build_types = ['clean', 'help']
def SetBuildType(type):
global build_type
build_type = type
# to be set, if we are in dry-run mode
dryrun = 0
Reported by Pylint.
Line: 70
Column: 5
build_types = ['clean', 'help']
def SetBuildType(type):
global build_type
build_type = type
# to be set, if we are in dry-run mode
dryrun = 0
Reported by Pylint.
Line: 84
Column: 5
def SetCacheMode(mode):
"""Set the Configure cache mode. mode must be one of "auto", "force",
or "cache"."""
global cache_mode
if mode == "auto":
cache_mode = AUTO
elif mode == "force":
cache_mode = FORCE
elif mode == "cache":
Reported by Pylint.
Line: 97
Column: 5
progress_display = SCons.Util.display # will be overwritten by SCons.Script
def SetProgressDisplay(display):
"""Set the progress display to use (called from SCons.Script)"""
global progress_display
progress_display = display
SConfFS = None
_ac_build_counter = defaultdict(int)
Reported by Pylint.
Line: 107
Column: 36
_ac_config_hs = {} # all config.h files created in this build
sconf_global = None # current sconf object
def _createConfigH(target, source, env):
t = open(str(target[0]), "w")
defname = re.sub('[^A-Za-z0-9_]', '_', str(target[0]).upper())
t.write("""#ifndef %(DEFNAME)s_SEEN
#define %(DEFNAME)s_SEEN
Reported by Pylint.
Line: 120
Column: 28
""" % {'DEFNAME' : defname})
t.close()
def _stringConfigH(target, source, env):
return "scons: Configure: creating " + str(target[0])
def NeedConfigHBuilder():
if len(_ac_config_hs) == 0:
Reported by Pylint.
Line: 120
Column: 36
""" % {'DEFNAME' : defname})
t.close()
def _stringConfigH(target, source, env):
return "scons: Configure: creating " + str(target[0])
def NeedConfigHBuilder():
if len(_ac_config_hs) == 0:
Reported by Pylint.
Line: 167
Column: 35
# define actions for building text files
def _createSource(target, source, env):
fd = open(str(target[0]), "w")
fd.write(source[0].get_contents().decode())
fd.close()
Reported by Pylint.
Line: 173
Column: 36
fd.close()
def _stringSource( target, source, env ):
return (str(target[0]) + ' <-\n |' +
source[0].get_contents().decode().replace( '\n', "\n |" ) )
class SConfBuildInfo(SCons.Node.FS.FileBuildInfo):
"""
Reported by Pylint.
src/third_party/wiredtiger/dist/stat_data.py
235 issues
Line: 32
Column: 16
self.flags = flags
def __cmp__(self, other):
return cmp(self.desc.lower(), other.desc.lower())
class BlockStat(Stat):
prefix = 'block-manager'
def __init__(self, name, desc, flags=''):
Stat.__init__(self, name, BlockStat.prefix, desc, flags)
Reported by Pylint.
Line: 23
Column: 1
# are maintained over time are normally not scaled per second).
from operator import attrgetter
import sys
class Stat:
def __init__(self, name, tag, desc, flags=''):
self.name = name
self.desc = tag + ': ' + desc
Reported by Pylint.
Line: 1
Column: 1
# Auto-generate statistics #defines, with initialization, clear and aggregate
# functions.
#
# NOTE: Statistics reports show individual objects as operations per second.
# All objects where that does not make sense should have the word 'currently'
# or the phrase 'in the cache' in their text description, for example, 'files
# currently open'.
# NOTE: All statistics descriptions must have a prefix string followed by ':'.
#
Reported by Pylint.
Line: 25
Column: 1
from operator import attrgetter
import sys
class Stat:
def __init__(self, name, tag, desc, flags=''):
self.name = name
self.desc = tag + ': ' + desc
self.flags = flags
Reported by Pylint.
Line: 25
Column: 1
from operator import attrgetter
import sys
class Stat:
def __init__(self, name, tag, desc, flags=''):
self.name = name
self.desc = tag + ': ' + desc
self.flags = flags
Reported by Pylint.
Line: 34
Column: 1
def __cmp__(self, other):
return cmp(self.desc.lower(), other.desc.lower())
class BlockStat(Stat):
prefix = 'block-manager'
def __init__(self, name, desc, flags=''):
Stat.__init__(self, name, BlockStat.prefix, desc, flags)
class BtreeStat(Stat):
prefix = 'btree'
Reported by Pylint.
Line: 34
Column: 1
def __cmp__(self, other):
return cmp(self.desc.lower(), other.desc.lower())
class BlockStat(Stat):
prefix = 'block-manager'
def __init__(self, name, desc, flags=''):
Stat.__init__(self, name, BlockStat.prefix, desc, flags)
class BtreeStat(Stat):
prefix = 'btree'
Reported by Pylint.
Line: 38
Column: 1
prefix = 'block-manager'
def __init__(self, name, desc, flags=''):
Stat.__init__(self, name, BlockStat.prefix, desc, flags)
class BtreeStat(Stat):
prefix = 'btree'
def __init__(self, name, desc, flags=''):
Stat.__init__(self, name, BtreeStat.prefix, desc, flags)
class CacheStat(Stat):
prefix = 'cache'
Reported by Pylint.
Line: 38
Column: 1
prefix = 'block-manager'
def __init__(self, name, desc, flags=''):
Stat.__init__(self, name, BlockStat.prefix, desc, flags)
class BtreeStat(Stat):
prefix = 'btree'
def __init__(self, name, desc, flags=''):
Stat.__init__(self, name, BtreeStat.prefix, desc, flags)
class CacheStat(Stat):
prefix = 'cache'
Reported by Pylint.
Line: 42
Column: 1
prefix = 'btree'
def __init__(self, name, desc, flags=''):
Stat.__init__(self, name, BtreeStat.prefix, desc, flags)
class CacheStat(Stat):
prefix = 'cache'
def __init__(self, name, desc, flags=''):
Stat.__init__(self, name, CacheStat.prefix, desc, flags)
class CacheWalkStat(Stat):
prefix = 'cache_walk'
Reported by Pylint.
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Action.py
232 issues
Line: 534
Column: 18
return str(self)
def get_contents(self, target, source, env):
result = self.get_presig(target, source, env)
if not isinstance(result,(bytes, bytearray)):
result = bytearray(result, 'utf-8')
else:
# Make a copy and put in bytearray, without this the contents returned by get_presig
Reported by Pylint.
Line: 585
Column: 16
return lines
def get_varlist(self, target, source, env, executor=None):
return self.varlist
def get_targets(self, env, executor):
"""
Returns the type of targets ($TARGETS, $CHANGED_TARGETS) used
by this action.
Reported by Pylint.
Line: 592
Column: 16
Returns the type of targets ($TARGETS, $CHANGED_TARGETS) used
by this action.
"""
return self.targets
class _ActionAction(ActionBase):
"""Base class for actions that create output objects."""
def __init__(self, cmdstr=_null, strfunction=_null, varlist=(),
Reported by Pylint.
Line: 708
Column: 24
if chdir:
os.chdir(chdir)
try:
stat = self.execute(target, source, env, executor=executor)
if isinstance(stat, SCons.Errors.BuildError):
s = exitstatfunc(stat.status)
if s:
stat.status = s
else:
Reported by Pylint.
Line: 882
Column: 5
pass
return result, ignore, silent
def strfunction(self, target, source, env, executor=None):
if self.cmdstr is None:
return None
if self.cmdstr is not _null:
from SCons.Subst import SUBST_RAW
if executor:
Reported by Pylint.
Line: 1159
Column: 5
except AttributeError:
return "unknown_python_function"
def strfunction(self, target, source, env, executor=None):
if self.cmdstr is None:
return None
if self.cmdstr is not _null:
from SCons.Subst import SUBST_RAW
if executor:
Reported by Pylint.
Line: 108
Column: 1
import re
import sys
import subprocess
import itertools
import inspect
from collections import OrderedDict
import SCons.Debug
from SCons.Debug import logInstanceCreation
Reported by Pylint.
Line: 132
Column: 3
# otherwise python3 and python2 will yield different pickles
# for the same object.
# This is due to default being 1 for python 2.7, and 3 for 3.x
# TODO: We can roll this forward to 2 (if it has value), but not
# before a deprecation cycle as the sconsigns will change
ACTION_SIGNATURE_PICKLE_PROTOCOL = 1
def rfile(n):
Reported by Pylint.
Line: 197
Column: 17
# Test if obj is a function object.
return _function_contents(obj)
except AttributeError as ae:
# Should be a pickle-able Python object.
try:
return _object_instance_content(obj)
# pickling an Action instance or object doesn't yield a stable
# content as instance property may be dumped in different orders
Reported by Pylint.
Line: 204
Column: 21
# pickling an Action instance or object doesn't yield a stable
# content as instance property may be dumped in different orders
# return pickle.dumps(obj, ACTION_SIGNATURE_PICKLE_PROTOCOL)
except (pickle.PicklingError, TypeError, AttributeError) as ex:
# This is weird, but it seems that nested classes
# are unpickable. The Python docs say it should
# always be a PicklingError, but some Python
# versions seem to return TypeError. Just do
# the best we can.
Reported by Pylint.
src/third_party/wiredtiger/tools/optrack/wt_optrack_decode.py
231 issues
Line: 157
Column: 9
if (len(bytesRead) < MIN_HEADER_SIZE):
print(color.BOLD + color.RED +
"unexpected sized input file" + color.END);
raise;
version, threadType, tsc_nsec = struct.unpack('=III', bytesRead);
print("VERSION IS " + str(version));
# If the version number is 2, the header contains three fields:
Reported by Pylint.
Line: 191
Column: 16
elif (threadType == 1):
return "internal";
else:
return unknown;
def parseFile(fileName):
done = False;
Reported by Pylint.
Line: 241
Column: 40
outputFile = open(outputFileName, "w");
except:
print(color.BOLD + color.RED +
"Could not open file " + outputfileName + ".txt for writing." +
color.END);
return;
print(color.BOLD + color.PURPLE +
"Writing to output file " + outputFileName + "." + color.END);
Reported by Pylint.
Line: 30
Column: 1
# OTHER DEALINGS IN THE SOFTWARE.
import argparse
import colorsys
from multiprocessing import Process
import multiprocessing
import os
import os.path
import struct
Reported by Pylint.
Line: 37
Column: 1
import os.path
import struct
import sys
import subprocess
import time
import traceback
#
# This log version must be the same as that defined in ../src/include/optrack.h
Reported by Pylint.
Line: 44
Column: 1
#
# This log version must be the same as that defined in ../src/include/optrack.h
#
currentLogVersion = 2;
class color:
PURPLE = '\033[95m'
CYAN = '\033[96m'
DARKCYAN = '\033[36m'
Reported by Pylint.
Line: 58
Column: 1
UNDERLINE = '\033[4m'
END = '\033[0m'
functionMap = {};
def buildTranslationMap(mapFileName):
mapFile = None;
Reported by Pylint.
Line: 62
Column: 1
def buildTranslationMap(mapFileName):
mapFile = None;
if not os.path.exists(mapFileName):
return False;
try:
Reported by Pylint.
Line: 65
Column: 1
mapFile = None;
if not os.path.exists(mapFileName):
return False;
try:
mapFile = open(mapFileName, "r");
except:
print(color.BOLD + color.RED);
Reported by Pylint.
Line: 68
Column: 1
return False;
try:
mapFile = open(mapFileName, "r");
except:
print(color.BOLD + color.RED);
print("Could not open " + mapFileName + " for reading");
print(color.END);
raise;
Reported by Pylint.
src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Node/__init__.py
224 issues
Line: 1074
Column: 13
# Here's where we implement --implicit-cache.
if implicit_cache and not implicit_deps_changed:
implicit = self.get_stored_implicit()
if implicit is not None:
# We now add the implicit dependencies returned from the
# stored .sconsign entry to have already been converted
# to Nodes for us. (We used to run them through a
# source_factory function here.)
Reported by Pylint.
Line: 1620
Column: 9
if self.always_build:
return "rebuilding `%s' because AlwaysBuild() is specified\n" % self
old = self.get_stored_info()
if old is None:
return None
old = old.binfo
old.prepare_dependencies()
Reported by Pylint.
Line: 1647
Column: 29
# so we only print them after running them through this lambda
# to turn them into the right relative Node and then return
# its string.
def stringify( s, E=self.dir.Entry):
if hasattr( s, 'dir' ) :
return str(E(s))
return str(s)
lines = []
Reported by Pylint.
Line: 111
Column: 21
# A variable that can be set to an interface-specific function be called
# to annotate a Node with information about its creation.
def do_nothing_node(node): pass
Annotate = do_nothing_node
# Gets set to 'True' if we're running in interactive mode. Is
# currently used to release parts of a target's info during
Reported by Pylint.
Line: 135
Column: 19
def exists_none(node):
raise NotImplementedError
def exists_always(node):
return 1
def exists_base(node):
return node.stat() is not None
Reported by Pylint.
Line: 146
Column: 24
what we should turn into first. Assume a file if there's no
directory."""
node.disambiguate()
return _exists_map[node._func_exists](node)
def exists_file(node):
# Duplicate from source path if we are set up to do this.
if node.duplicate and not node.is_derived() and not node.linked:
Reported by Pylint.
Line: 209
Column: 34
# or catch the exception.
return ''
else:
return _get_contents_map[node._func_get_contents](node)
def get_contents_dir(node):
"""Return content signatures and names of all our children
separated by new-lines. Ensure that the nodes are sorted."""
contents = []
Reported by Pylint.
Line: 280
Column: 42
raise NotImplementedError
def changed_since_last_build_alias(node, target, prev_ni, repo_node=None):
cur_csig = node.get_csig()
try:
return cur_csig != prev_ni.csig
except AttributeError:
return 1
Reported by Pylint.
Line: 280
Column: 59
raise NotImplementedError
def changed_since_last_build_alias(node, target, prev_ni, repo_node=None):
cur_csig = node.get_csig()
try:
return cur_csig != prev_ni.csig
except AttributeError:
return 1
Reported by Pylint.
Line: 293
Column: 67
return _decider_map[node.changed_since_last_build](node, target, prev_ni, repo_node)
def changed_since_last_build_state_changed(node, target, prev_ni, repo_node=None):
return node.state != SCons.Node.up_to_date
def decide_source(node, target, prev_ni, repo_node=None):
return target.get_build_env().decide_source(node, target, prev_ni, repo_node)
Reported by Pylint.
src/third_party/wiredtiger/test/3rdparty/python-subunit-0.0.16/python/subunit/test_results.py
216 issues
Line: 22
Column: 1
import csv
import datetime
import testtools
from testtools.compat import all
from testtools.content import (
text_content,
TracebackContent,
)
Reported by Pylint.
Line: 23
Column: 1
import datetime
import testtools
from testtools.compat import all
from testtools.content import (
text_content,
TracebackContent,
)
from testtools import StreamResult
Reported by Pylint.
Line: 24
Column: 1
import testtools
from testtools.compat import all
from testtools.content import (
text_content,
TracebackContent,
)
from testtools import StreamResult
Reported by Pylint.
Line: 28
Column: 1
text_content,
TracebackContent,
)
from testtools import StreamResult
from subunit import iso8601
import subunit
Reported by Pylint.
Line: 122
Column: 9
self.super.__init__(decorated)
def startTest(self, test):
self._before_event()
return self.super.startTest(test)
def startTestRun(self):
self._before_event()
return self.super.startTestRun()
Reported by Pylint.
Line: 126
Column: 9
return self.super.startTest(test)
def startTestRun(self):
self._before_event()
return self.super.startTestRun()
def stopTest(self, test):
self._before_event()
return self.super.stopTest(test)
Reported by Pylint.
Line: 130
Column: 9
return self.super.startTestRun()
def stopTest(self, test):
self._before_event()
return self.super.stopTest(test)
def stopTestRun(self):
self._before_event()
return self.super.stopTestRun()
Reported by Pylint.
Line: 134
Column: 9
return self.super.stopTest(test)
def stopTestRun(self):
self._before_event()
return self.super.stopTestRun()
def addError(self, test, err=None, details=None):
self._before_event()
return self.super.addError(test, err, details=details)
Reported by Pylint.
Line: 138
Column: 9
return self.super.stopTestRun()
def addError(self, test, err=None, details=None):
self._before_event()
return self.super.addError(test, err, details=details)
def addFailure(self, test, err=None, details=None):
self._before_event()
return self.super.addFailure(test, err, details=details)
Reported by Pylint.
Line: 142
Column: 9
return self.super.addError(test, err, details=details)
def addFailure(self, test, err=None, details=None):
self._before_event()
return self.super.addFailure(test, err, details=details)
def addSuccess(self, test, details=None):
self._before_event()
return self.super.addSuccess(test, details=details)
Reported by Pylint.