The following issues were found

src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/packaging/ipk.py
28 issues
Unused argument 'DESCRIPTION'
Error

Line: 37 Column: 62

              
from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot

def package(env, target, source, PACKAGEROOT, NAME, VERSION, DESCRIPTION,
            SUMMARY, X_IPK_PRIORITY, X_IPK_SECTION, SOURCE_URL,
            X_IPK_MAINTAINER, X_IPK_DEPENDS, **kw):
    """ This function prepares the packageroot directory for packaging with the
    ipkg builder.
    """

            

Reported by Pylint.

Unused argument 'X_IPK_PRIORITY'
Error

Line: 38 Column: 22

              from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot

def package(env, target, source, PACKAGEROOT, NAME, VERSION, DESCRIPTION,
            SUMMARY, X_IPK_PRIORITY, X_IPK_SECTION, SOURCE_URL,
            X_IPK_MAINTAINER, X_IPK_DEPENDS, **kw):
    """ This function prepares the packageroot directory for packaging with the
    ipkg builder.
    """
    SCons.Tool.Tool('ipkg').generate(env)

            

Reported by Pylint.

Unused argument 'X_IPK_SECTION'
Error

Line: 38 Column: 38

              from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot

def package(env, target, source, PACKAGEROOT, NAME, VERSION, DESCRIPTION,
            SUMMARY, X_IPK_PRIORITY, X_IPK_SECTION, SOURCE_URL,
            X_IPK_MAINTAINER, X_IPK_DEPENDS, **kw):
    """ This function prepares the packageroot directory for packaging with the
    ipkg builder.
    """
    SCons.Tool.Tool('ipkg').generate(env)

            

Reported by Pylint.

Unused argument 'SOURCE_URL'
Error

Line: 38 Column: 53

              from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot

def package(env, target, source, PACKAGEROOT, NAME, VERSION, DESCRIPTION,
            SUMMARY, X_IPK_PRIORITY, X_IPK_SECTION, SOURCE_URL,
            X_IPK_MAINTAINER, X_IPK_DEPENDS, **kw):
    """ This function prepares the packageroot directory for packaging with the
    ipkg builder.
    """
    SCons.Tool.Tool('ipkg').generate(env)

            

Reported by Pylint.

Unused argument 'SUMMARY'
Error

Line: 38 Column: 13

              from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot

def package(env, target, source, PACKAGEROOT, NAME, VERSION, DESCRIPTION,
            SUMMARY, X_IPK_PRIORITY, X_IPK_SECTION, SOURCE_URL,
            X_IPK_MAINTAINER, X_IPK_DEPENDS, **kw):
    """ This function prepares the packageroot directory for packaging with the
    ipkg builder.
    """
    SCons.Tool.Tool('ipkg').generate(env)

            

Reported by Pylint.

Unused argument 'X_IPK_DEPENDS'
Error

Line: 39 Column: 31

              
def package(env, target, source, PACKAGEROOT, NAME, VERSION, DESCRIPTION,
            SUMMARY, X_IPK_PRIORITY, X_IPK_SECTION, SOURCE_URL,
            X_IPK_MAINTAINER, X_IPK_DEPENDS, **kw):
    """ This function prepares the packageroot directory for packaging with the
    ipkg builder.
    """
    SCons.Tool.Tool('ipkg').generate(env)


            

Reported by Pylint.

Unused argument 'X_IPK_MAINTAINER'
Error

Line: 39 Column: 13

              
def package(env, target, source, PACKAGEROOT, NAME, VERSION, DESCRIPTION,
            SUMMARY, X_IPK_PRIORITY, X_IPK_SECTION, SOURCE_URL,
            X_IPK_MAINTAINER, X_IPK_DEPENDS, **kw):
    """ This function prepares the packageroot directory for packaging with the
    ipkg builder.
    """
    SCons.Tool.Tool('ipkg').generate(env)


            

Reported by Pylint.

Redefining built-in 'str'
Error

Line: 168 Column: 9

                      config.write(f.PACKAGING_INSTALL_LOCATION)
        config.write('\n')

    for str in 'POSTRM PRERM POSTINST PREINST'.split():
        name="PACKAGING_X_IPK_%s"%str
        for f in [x for x in source if name in dir(x)]:
            file = open_file(name)
            file.write(env[str])


            

Reported by Pylint.

Line too long (124/100)
Error

Line: 27 Column: 1

              # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#

__revision__ = "src/engine/SCons/Tool/packaging/ipk.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

import os

import SCons.Builder
import SCons.Node.FS

            

Reported by Pylint.

Too many local variables (19/15)
Error

Line: 37 Column: 1

              
from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot

def package(env, target, source, PACKAGEROOT, NAME, VERSION, DESCRIPTION,
            SUMMARY, X_IPK_PRIORITY, X_IPK_SECTION, SOURCE_URL,
            X_IPK_MAINTAINER, X_IPK_DEPENDS, **kw):
    """ This function prepares the packageroot directory for packaging with the
    ipkg builder.
    """

            

Reported by Pylint.

src/third_party/wiredtiger/test/suite/test_compact02.py
27 issues
Unable to import 'wiredtiger'
Error

Line: 33 Column: 1

              #   Test that compact reduces the file size.
#

import time, wiredtiger, wttest
from wiredtiger import stat
from wtscenario import make_scenarios

# Test basic compression
class test_compact02(wttest.WiredTigerTestCase):

            

Reported by Pylint.

Unable to import 'wiredtiger'
Error

Line: 34 Column: 1

              #

import time, wiredtiger, wttest
from wiredtiger import stat
from wtscenario import make_scenarios

# Test basic compression
class test_compact02(wttest.WiredTigerTestCase):


            

Reported by Pylint.

Unused argument 'dir'
Error

Line: 95 Column: 35

              
    # This test varies the cache size and so needs to set up its own connection.
    # Override the standard methods.
    def setUpConnectionOpen(self, dir):
        return None
    def setUpSessionOpen(self, conn):
        return None
    def ConnectionOpen(self, cacheSize):
        self.home = '.'

            

Reported by Pylint.

Redefining built-in 'dir'
Error

Line: 95 Column: 35

              
    # This test varies the cache size and so needs to set up its own connection.
    # Override the standard methods.
    def setUpConnectionOpen(self, dir):
        return None
    def setUpSessionOpen(self, conn):
        return None
    def ConnectionOpen(self, cacheSize):
        self.home = '.'

            

Reported by Pylint.

Parameters differ from overridden 'setUpConnectionOpen' method
Error

Line: 95 Column: 5

              
    # This test varies the cache size and so needs to set up its own connection.
    # Override the standard methods.
    def setUpConnectionOpen(self, dir):
        return None
    def setUpSessionOpen(self, conn):
        return None
    def ConnectionOpen(self, cacheSize):
        self.home = '.'

            

Reported by Pylint.

Attribute 'home' defined outside __init__
Error

Line: 100 Column: 9

                  def setUpSessionOpen(self, conn):
        return None
    def ConnectionOpen(self, cacheSize):
        self.home = '.'
        conn_params = 'create,' + \
            cacheSize + ',error_prefix="%s",' % self.shortid() + \
            'statistics=(all),' + \
            'eviction_dirty_target=99,eviction_dirty_trigger=99'
        try:

            

Reported by Pylint.

Unused variable 'e'
Error

Line: 107 Column: 9

                          'eviction_dirty_target=99,eviction_dirty_trigger=99'
        try:
            self.conn = wiredtiger.wiredtiger_open(self.home, conn_params)
        except wiredtiger.WiredTigerError as e:
            print("Failed conn at '%s' with config '%s'" % (dir, conn_params))
        self.session = self.conn.open_session(None)

    # Create a table, add keys with both big and small values.
    def test_compact02(self):

            

Reported by Pylint.

FIXME-WT-7187
Error

Line: 113 Column: 3

              
    # Create a table, add keys with both big and small values.
    def test_compact02(self):
        # FIXME-WT-7187
        # This test is temporarily disabled for OS/X, it fails, but not consistently.
        import platform
        if platform.system() == 'Darwin':
            self.skipTest('Compaction tests skipped, as they fail on OS/X')


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled

            

Reported by Pylint.

Multiple imports on one line (time, wiredtiger, wttest)
Error

Line: 33 Column: 1

              #   Test that compact reduces the file size.
#

import time, wiredtiger, wttest
from wiredtiger import stat
from wtscenario import make_scenarios

# Test basic compression
class test_compact02(wttest.WiredTigerTestCase):

            

Reported by Pylint.

src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Platform/posix.py
27 issues
Unused import errno
Error

Line: 35 Column: 1

              
__revision__ = "src/engine/SCons/Platform/posix.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

import errno
import os
import os.path
import subprocess
import sys
import select

            

Reported by Pylint.

Unused import os
Error

Line: 36 Column: 1

              __revision__ = "src/engine/SCons/Platform/posix.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

import errno
import os
import os.path
import subprocess
import sys
import select


            

Reported by Pylint.

Unused import os.path
Error

Line: 37 Column: 1

              
import errno
import os
import os.path
import subprocess
import sys
import select

import SCons.Util

            

Reported by Pylint.

Unused import sys
Error

Line: 39 Column: 1

              import os
import os.path
import subprocess
import sys
import select

import SCons.Util
from SCons.Platform import TempFileMunge
from SCons.Platform.virtualenv import ImportVirtualenv

            

Reported by Pylint.

Unused import select
Error

Line: 40 Column: 1

              import os.path
import subprocess
import sys
import select

import SCons.Util
from SCons.Platform import TempFileMunge
from SCons.Platform.virtualenv import ImportVirtualenv
from SCons.Platform.virtualenv import ignore_virtualenv, enable_virtualenv

            

Reported by Pylint.

Unused import SCons.Util
Error

Line: 42 Column: 1

              import sys
import select

import SCons.Util
from SCons.Platform import TempFileMunge
from SCons.Platform.virtualenv import ImportVirtualenv
from SCons.Platform.virtualenv import ignore_virtualenv, enable_virtualenv

exitvalmap = {

            

Reported by Pylint.

Redefining name 'escape' from outer scope (line 52)
Error

Line: 69 Column: 26

                  proc = subprocess.Popen(l, env = env, close_fds = True)
    return proc.wait()

def subprocess_spawn(sh, escape, cmd, args, env):
    return exec_subprocess([sh, '-c', ' '.join(args)], env)

def exec_popen3(l, env, stdout, stderr):
    proc = subprocess.Popen(l, env = env, close_fds = True,
                            stdout = stdout,

            

Reported by Pylint.

Unused argument 'cmd'
Error

Line: 69 Column: 34

                  proc = subprocess.Popen(l, env = env, close_fds = True)
    return proc.wait()

def subprocess_spawn(sh, escape, cmd, args, env):
    return exec_subprocess([sh, '-c', ' '.join(args)], env)

def exec_popen3(l, env, stdout, stderr):
    proc = subprocess.Popen(l, env = env, close_fds = True,
                            stdout = stdout,

            

Reported by Pylint.

Unused argument 'escape'
Error

Line: 69 Column: 26

                  proc = subprocess.Popen(l, env = env, close_fds = True)
    return proc.wait()

def subprocess_spawn(sh, escape, cmd, args, env):
    return exec_subprocess([sh, '-c', ' '.join(args)], env)

def exec_popen3(l, env, stdout, stderr):
    proc = subprocess.Popen(l, env = env, close_fds = True,
                            stdout = stdout,

            

Reported by Pylint.

Unused argument 'cmd'
Error

Line: 78 Column: 33

                                          stderr = stderr)
    return proc.wait()

def piped_env_spawn(sh, escape, cmd, args, env, stdout, stderr):
    # spawn using Popen3 combined with the env command
    # the command name and the command's stdout is written to stdout
    # the command's stderr is written to stderr
    return exec_popen3([sh, '-c', ' '.join(args)],
                       env, stdout, stderr)

            

Reported by Pylint.

src/third_party/scons-3.1.2/scons-local-3.1.2/SCons/Tool/msvc.py
27 issues
Attempted relative import beyond top-level package
Error

Line: 51 Column: 1

              import SCons.Warnings
import SCons.Scanner.RC

from .MSCommon import msvc_exists, msvc_setup_env_once, msvc_version_to_maj_min

CSuffixes = ['.c', '.C']
CXXSuffixes = ['.cc', '.cpp', '.cxx', '.c++', '.C++']

def validate_vars(env):

            

Reported by Pylint.

Unused import re
Error

Line: 38 Column: 1

              
import os.path
import os
import re
import sys

import SCons.Action
import SCons.Builder
import SCons.Errors

            

Reported by Pylint.

Unused import sys
Error

Line: 39 Column: 1

              import os.path
import os
import re
import sys

import SCons.Action
import SCons.Builder
import SCons.Errors
import SCons.Platform.win32

            

Reported by Pylint.

Redefining built-in 'min'
Error

Line: 69 Column: 14

                  Set appropriate PCHPDBFLAGS for the MSVC version being used.
    """
    if env.get('MSVC_VERSION',False):
        maj, min = msvc_version_to_maj_min(env['MSVC_VERSION'])
        if maj < 8:
            env['PCHPDBFLAGS'] = SCons.Util.CLVar(['${(PDB and "/Yd") or ""}'])
        else:
            env['PCHPDBFLAGS'] = ''
    else:

            

Reported by Pylint.

Unused variable 'min'
Error

Line: 69 Column: 14

                  Set appropriate PCHPDBFLAGS for the MSVC version being used.
    """
    if env.get('MSVC_VERSION',False):
        maj, min = msvc_version_to_maj_min(env['MSVC_VERSION'])
        if maj < 8:
            env['PCHPDBFLAGS'] = SCons.Util.CLVar(['${(PDB and "/Yd") or ""}'])
        else:
            env['PCHPDBFLAGS'] = ''
    else:

            

Reported by Pylint.

Unused argument 'for_signature'
Error

Line: 176 Column: 43

                      return None
    return (id(action), id(env), t.dir, s.dir)

def msvc_output_flag(target, source, env, for_signature):
    """
    Returns the correct /Fo flag for batching.

    If batching is disabled or there's only one source file, then we
    return an /Fo string that specifies the target explicitly.  Otherwise,

            

Reported by Pylint.

Unused argument 'target'
Error

Line: 176 Column: 22

                      return None
    return (id(action), id(env), t.dir, s.dir)

def msvc_output_flag(target, source, env, for_signature):
    """
    Returns the correct /Fo flag for batching.

    If batching is disabled or there's only one source file, then we
    return an /Fo string that specifies the target explicitly.  Otherwise,

            

Reported by Pylint.

Unused argument 'source'
Error

Line: 176 Column: 30

                      return None
    return (id(action), id(env), t.dir, s.dir)

def msvc_output_flag(target, source, env, for_signature):
    """
    Returns the correct /Fo flag for batching.

    If batching is disabled or there's only one source file, then we
    return an /Fo string that specifies the target explicitly.  Otherwise,

            

Reported by Pylint.

TODO(batch): shouldn't reach in to cmdgen this way; necessary
Error

Line: 221 Column: 3

                  """Add Builders and construction variables for MSVC++ to an Environment."""
    static_obj, shared_obj = SCons.Tool.createObjBuilders(env)

    # TODO(batch):  shouldn't reach in to cmdgen this way; necessary
    # for now to bypass the checks in Builder.DictCmdGenerator.__call__()
    # and allow .cc and .cpp to be compiled in the same command line.
    static_obj.cmdgen.source_ext_match = False
    shared_obj.cmdgen.source_ext_match = False


            

Reported by Pylint.

Line too long (115/100)
Error

Line: 34 Column: 1

              # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#

__revision__ = "src/engine/SCons/Tool/msvc.py bee7caf9defd6e108fc2998a2520ddb36a967691 2019-12-17 02:07:09 bdeegan"

import os.path
import os
import re
import sys

            

Reported by Pylint.

src/third_party/wiredtiger/test/suite/test_txn05.py
27 issues
An attribute defined in wttest line 401 hides this method
Error

Line: 68 Column: 5

              
    scenarios = make_scenarios(types, op1s, txn1s)

    def conn_config(self):
        # Cycle through the different transaction_sync values in a
        # deterministic manner.
        txn_sync = self.sync_list[
            self.scenario_number % len(self.sync_list)]
        # Set archive false on the home directory.

            

Reported by Pylint.

Unused import shutil
Error

Line: 33 Column: 1

              # Transactions: commits and rollbacks
#

import fnmatch, os, shutil, time
from suite_subprocess import suite_subprocess
from wtscenario import make_scenarios
import wttest

class test_txn05(wttest.WiredTigerTestCase, suite_subprocess):

            

Reported by Pylint.

Attribute 'archive' defined outside __init__
Error

Line: 126 Column: 9

                      #
        # Cycle through the different archive values in a
        # deterministic manner.
        self.archive = self.archive_list[
            self.scenario_number % len(self.archive_list)]
        backup_conn_params = \
            'log=(enabled,file_max=%s,archive=%s)' % (self.logmax, self.archive)
        orig_logs = fnmatch.filter(os.listdir(self.backup_dir), "*gerLog*")
        endcount = 2

            

Reported by Pylint.

Attribute 'backup_dir' defined outside __init__
Error

Line: 170 Column: 9

                      self.runWt(['-h', self.backup_dir, 'printlog'], outfilename='printlog.out')

    def test_ops(self):
        self.backup_dir = os.path.join(self.home, "WT_BACKUP")
        self.session2 = self.conn.open_session()
        # print "Creating %s with config '%s'" % (self.uri, self.create_params)
        self.session.create(self.uri, self.create_params)
        # Set up the table with entries for 1-5.
        # We then truncate starting or ending in various places.

            

Reported by Pylint.

Attribute 'session2' defined outside __init__
Error

Line: 171 Column: 9

              
    def test_ops(self):
        self.backup_dir = os.path.join(self.home, "WT_BACKUP")
        self.session2 = self.conn.open_session()
        # print "Creating %s with config '%s'" % (self.uri, self.create_params)
        self.session.create(self.uri, self.create_params)
        # Set up the table with entries for 1-5.
        # We then truncate starting or ending in various places.
        c = self.session.open_cursor(self.uri, None)

            

Reported by Pylint.

Unused variable 'i'
Error

Line: 184 Column: 13

              
        ops = (self.op1, )
        txns = (self.txn1, )
        for i, ot in enumerate(zip(ops, txns)):
            self.session.begin_transaction()
            ok, txn = ot
            # print '%d: %s(%d)[%s]' % (i, ok[0], ok[1], txn)
            op, k = ok


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled

            

Reported by Pylint.

Multiple imports on one line (fnmatch, os, shutil, time)
Error

Line: 33 Column: 1

              # Transactions: commits and rollbacks
#

import fnmatch, os, shutil, time
from suite_subprocess import suite_subprocess
from wtscenario import make_scenarios
import wttest

class test_txn05(wttest.WiredTigerTestCase, suite_subprocess):

            

Reported by Pylint.

Class name "test_txn05" doesn't conform to PascalCase naming style
Error

Line: 38 Column: 1

              from wtscenario import make_scenarios
import wttest

class test_txn05(wttest.WiredTigerTestCase, suite_subprocess):
    logmax = "100K"
    tablename = 'test_txn05'
    uri = 'table:' + tablename
    archive_list = ['true', 'false']
    sync_list = [

            

Reported by Pylint.

Missing class docstring
Error

Line: 38 Column: 1

              from wtscenario import make_scenarios
import wttest

class test_txn05(wttest.WiredTigerTestCase, suite_subprocess):
    logmax = "100K"
    tablename = 'test_txn05'
    uri = 'table:' + tablename
    archive_list = ['true', 'false']
    sync_list = [

            

Reported by Pylint.

src/third_party/wiredtiger/test/suite/test_tiered02.py
27 issues
Unable to import 'wiredtiger'
Error

Line: 29 Column: 1

              # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

import os, wiredtiger, wtscenario, wttest
from wtdataset import SimpleDataSet

# test_tiered02.py
#    Test tiered tree
class test_tiered02(wttest.WiredTigerTestCase):

            

Reported by Pylint.

An attribute defined in wttest line 401 hides this method
Error

Line: 42 Column: 5

                  bucket_prefix = "pfx_"
    extension_name = "local_store"

    def conn_config(self):
        if not os.path.exists(self.bucket):
            os.mkdir(self.bucket)
        return \
          'tiered_storage=(auth_token=%s,' % self.auth_token + \
          'bucket=%s,' % self.bucket + \

            

Reported by Pylint.

Unused import wtscenario
Error

Line: 29 Column: 1

              # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

import os, wiredtiger, wtscenario, wttest
from wtdataset import SimpleDataSet

# test_tiered02.py
#    Test tiered tree
class test_tiered02(wttest.WiredTigerTestCase):

            

Reported by Pylint.

Unused import wiredtiger
Error

Line: 29 Column: 1

              # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

import os, wiredtiger, wtscenario, wttest
from wtdataset import SimpleDataSet

# test_tiered02.py
#    Test tiered tree
class test_tiered02(wttest.WiredTigerTestCase):

            

Reported by Pylint.

Attribute 'flushed_objects' defined outside __init__
Error

Line: 84 Column: 9

                          self.assertGreater(len(got), self.flushed_objects)
        else:
            self.assertEqual(len(got), self.flushed_objects)
        self.flushed_objects = len(got)

    # Test tiered storage with the old prototype way of signaling flushing to the shared
    # tier via checkpoints.  When flush_tier is working, the checkpoint calls can be
    # replaced with flush_tier.
    def test_tiered(self):

            

Reported by Pylint.

Attribute 'flushed_objects' defined outside __init__
Error

Line: 90 Column: 9

                  # tier via checkpoints.  When flush_tier is working, the checkpoint calls can be
    # replaced with flush_tier.
    def test_tiered(self):
        self.flushed_objects = 0
        args = 'key_format=S'

        intl_page = 'internal_page_max=16K'
        base_create = 'key_format=S,value_format=S,' + intl_page
        self.pr("create sys")

            

Reported by Pylint.

Unused variable 'base_create'
Error

Line: 94 Column: 9

                      args = 'key_format=S'

        intl_page = 'internal_page_max=16K'
        base_create = 'key_format=S,value_format=S,' + intl_page
        self.pr("create sys")
        #self.session.create(self.uri + 'xxx', base_create)

        self.progress('Create simple data set (10)')
        ds = SimpleDataSet(self, self.uri, 10, config=args)

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled

            

Reported by Pylint.

Multiple imports on one line (os, wiredtiger, wtscenario, wttest)
Error

Line: 29 Column: 1

              # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

import os, wiredtiger, wtscenario, wttest
from wtdataset import SimpleDataSet

# test_tiered02.py
#    Test tiered tree
class test_tiered02(wttest.WiredTigerTestCase):

            

Reported by Pylint.

Class name "test_tiered02" doesn't conform to PascalCase naming style
Error

Line: 34 Column: 1

              
# test_tiered02.py
#    Test tiered tree
class test_tiered02(wttest.WiredTigerTestCase):
    uri = "table:test_tiered02"

    auth_token = "test_token"
    bucket = "mybucket"
    bucket_prefix = "pfx_"

            

Reported by Pylint.

src/third_party/wiredtiger/test/3rdparty/testtools-0.9.34/testtools/tests/helpers.py
27 issues
Unable to import 'extras'
Error

Line: 11 Column: 1

              
import sys

from extras import safe_hasattr

from testtools import TestResult
from testtools.content import StackLinesContent
from testtools import runtest


            

Reported by Pylint.

Statement seems to have no effect
Error

Line: 19 Column: 1

              

# Importing to preserve compatibility.
safe_hasattr

# GZ 2010-08-12: Don't do this, pointlessly creates an exc_info cycle
try:
    raise Exception
except Exception:

            

Reported by Pylint.

Catching too general exception Exception
Error

Line: 24 Column: 8

              # GZ 2010-08-12: Don't do this, pointlessly creates an exc_info cycle
try:
    raise Exception
except Exception:
    an_exc_info = sys.exc_info()

# Deprecated: This classes attributes are somewhat non deterministic which
# leads to hard to predict tests (because Python upstream are changing things.
class LoggingResult(TestResult):

            

Reported by Pylint.

Parameters differ from overridden 'addFailure' method
Error

Line: 48 Column: 5

                      self._events.append(('stopTest', test))
        super(LoggingResult, self).stopTest(test)

    def addFailure(self, test, error):
        self._events.append(('addFailure', test, error))
        super(LoggingResult, self).addFailure(test, error)

    def addError(self, test, error):
        self._events.append(('addError', test, error))

            

Reported by Pylint.

Parameters differ from overridden 'addError' method
Error

Line: 52 Column: 5

                      self._events.append(('addFailure', test, error))
        super(LoggingResult, self).addFailure(test, error)

    def addError(self, test, error):
        self._events.append(('addError', test, error))
        super(LoggingResult, self).addError(test, error)

    def addSkip(self, test, reason):
        self._events.append(('addSkip', test, reason))

            

Reported by Pylint.

Parameters differ from overridden 'addSkip' method
Error

Line: 56 Column: 5

                      self._events.append(('addError', test, error))
        super(LoggingResult, self).addError(test, error)

    def addSkip(self, test, reason):
        self._events.append(('addSkip', test, reason))
        super(LoggingResult, self).addSkip(test, reason)

    def addSuccess(self, test):
        self._events.append(('addSuccess', test))

            

Reported by Pylint.

Parameters differ from overridden 'addSuccess' method
Error

Line: 60 Column: 5

                      self._events.append(('addSkip', test, reason))
        super(LoggingResult, self).addSkip(test, reason)

    def addSuccess(self, test):
        self._events.append(('addSuccess', test))
        super(LoggingResult, self).addSuccess(test)

    def startTestRun(self):
        self._events.append('startTestRun')

            

Reported by Pylint.

Consider using Python 3 style super() without arguments
Error

Line: 34 Column: 9

              
    def __init__(self, log):
        self._events = log
        super(LoggingResult, self).__init__()

    def startTest(self, test):
        self._events.append(('startTest', test))
        super(LoggingResult, self).startTest(test)


            

Reported by Pylint.

Consider using Python 3 style super() without arguments
Error

Line: 38 Column: 9

              
    def startTest(self, test):
        self._events.append(('startTest', test))
        super(LoggingResult, self).startTest(test)

    def stop(self):
        self._events.append('stop')
        super(LoggingResult, self).stop()


            

Reported by Pylint.

Consider using Python 3 style super() without arguments
Error

Line: 42 Column: 9

              
    def stop(self):
        self._events.append('stop')
        super(LoggingResult, self).stop()

    def stopTest(self, test):
        self._events.append(('stopTest', test))
        super(LoggingResult, self).stopTest(test)


            

Reported by Pylint.

src/third_party/wiredtiger/test/suite/test_hs26.py
27 issues
Unable to import 'wiredtiger'
Error

Line: 29 Column: 1

              # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

import wiredtiger, wttest
from wtdataset import SimpleDataSet
from wtscenario import make_scenarios

# test_hs26.py
# Test that changes overlapping variable-length column store RLE groups don't lose or corrupt data.

            

Reported by Pylint.

Unused import wiredtiger
Error

Line: 29 Column: 1

              # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

import wiredtiger, wttest
from wtdataset import SimpleDataSet
from wtscenario import make_scenarios

# test_hs26.py
# Test that changes overlapping variable-length column store RLE groups don't lose or corrupt data.

            

Reported by Pylint.

Redundant use of assertTrue with constant value False
Error

Line: 124 Column: 13

                              return self.make_value(key, self.value_2, self.value_modulus_2)
        else:
            self.prout("expected_value: Unexpected readtime {}".format(readtime))
            self.assertTrue(False)
            return None

    # Return the number of keys we expect, based on the read time.
    # - If the read time is timestamp_1, we should see nrows_1.
    # - If the read time is timestamp_2, we should see max(nrows_1, nrows_2).

            

Reported by Pylint.

Redundant use of assertTrue with constant value False
Error

Line: 137 Column: 13

                          return max(self.nrows_1, self.nrows_2)
        else:
            self.prout("expected_numvalues: Unexpected readtime {}".format(readtime))
            self.assertTrue(False)
            return None

    # Check that we got the values we expected. In particular, also make sure that
    # we get the expected number of values back. Expect the values that should be
    # there at readtime; if explicit_read_ts is set, open a transaction at that

            

Reported by Pylint.

Unused variable 'k'
Error

Line: 149 Column: 13

                          session.begin_transaction('read_timestamp=' + self.timestamp_str(explicit_read_ts))
        cursor = session.open_cursor(uri)
        count = 0
        for k, v in cursor:
            # Count is key - 1, so pass count + 1 as key.
            self.assertEqual(v, self.expected_value(count + 1, readtime))
            count += 1
        if explicit_read_ts != -1:
            session.rollback_transaction()

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled

            

Reported by Pylint.

Multiple imports on one line (wiredtiger, wttest)
Error

Line: 29 Column: 1

              # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

import wiredtiger, wttest
from wtdataset import SimpleDataSet
from wtscenario import make_scenarios

# test_hs26.py
# Test that changes overlapping variable-length column store RLE groups don't lose or corrupt data.

            

Reported by Pylint.

Class name "test_hs26" doesn't conform to PascalCase naming style
Error

Line: 46 Column: 1

              # whether they read back correctly after forcing eviction, which will RLE-encode the duplicates
# and read them back. There are many opportunities for the interaction betwee RLE groups and
# history store accesses to go off the rails.
class test_hs26(wttest.WiredTigerTestCase):
    conn_config = ''
    session_config = 'isolation=snapshot'

    # We control the duplication of values by appending a number computed from the key.
    # Because the keys are 1..N (not 0..N-1), to get aligned RLE groups the suffix is

            

Reported by Pylint.

Missing class docstring
Error

Line: 46 Column: 1

              # whether they read back correctly after forcing eviction, which will RLE-encode the duplicates
# and read them back. There are many opportunities for the interaction betwee RLE groups and
# history store accesses to go off the rails.
class test_hs26(wttest.WiredTigerTestCase):
    conn_config = ''
    session_config = 'isolation=snapshot'

    # We control the duplication of values by appending a number computed from the key.
    # Because the keys are 1..N (not 0..N-1), to get aligned RLE groups the suffix is

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 97 Column: 5

                  timestamp_2 = 100

    # Generate the value for a key.
    def make_value(self, key, base_value, value_modulus):
        return base_value + str((key - 1) // value_modulus)

    # Write nrows records, using value as the base value string.
    def make_updates(self, uri, ds, value, value_modulus, nrows, commit_ts):
        session = self.session

            

Reported by Pylint.

src/third_party/wiredtiger/test/suite/test_config06.py
27 issues
Unable to import 'wiredtiger'
Error

Line: 29 Column: 1

              # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

import wiredtiger, wttest

# test_config06.py
#    Test session.create configurations.
class test_config06(wttest.WiredTigerTestCase):
    uri = 'table:test_config06'

            

Reported by Pylint.

Redefining built-in 'len'
Error

Line: 54 Column: 34

              
    # Smoke-test the string formats with length specifiers; both formats should
    # ignore trailing bytes, verify that.
    def format_string(self, fmt, len):
        k = self.key
        v = self.value
        self.session.create(self.uri, \
            "key_format=" + str(len) + fmt + ",value_format=" + str(len) + fmt)
        cursor = self.session.open_cursor(self.uri, None)

            

Reported by Pylint.

Using deprecated method assertEquals()
Error

Line: 61 Column: 9

                          "key_format=" + str(len) + fmt + ",value_format=" + str(len) + fmt)
        cursor = self.session.open_cursor(self.uri, None)
        cursor[k] = v
        self.assertEquals(cursor[k[:len]], v[:len])
    def test_format_string_S_1(self):
        self.format_string('S', 1)
    def test_format_string_S_4(self):
        self.format_string('S', 4)
    def test_format_string_S_10(self):

            

Reported by Pylint.

Using deprecated method assertEquals()
Error

Line: 81 Column: 9

                      self.session.create(self.uri, "key_format=S,value_format=S")
        cursor = self.session.open_cursor(self.uri, None)
        cursor[k] = v
        self.assertEquals(cursor[k], v)

    def test_format_string_s_default(self):
        k = self.key
        v = self.value
        self.session.create(self.uri, "key_format=s,value_format=s")

            

Reported by Pylint.

Using deprecated method assertEquals()
Error

Line: 89 Column: 9

                      self.session.create(self.uri, "key_format=s,value_format=s")
        cursor = self.session.open_cursor(self.uri, None)
        cursor[k] = v
        self.assertEquals(cursor[k[:1]], v[:1])

if __name__ == '__main__':
    wttest.run()

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled

            

Reported by Pylint.

Multiple imports on one line (wiredtiger, wttest)
Error

Line: 29 Column: 1

              # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.

import wiredtiger, wttest

# test_config06.py
#    Test session.create configurations.
class test_config06(wttest.WiredTigerTestCase):
    uri = 'table:test_config06'

            

Reported by Pylint.

Class name "test_config06" doesn't conform to PascalCase naming style
Error

Line: 33 Column: 1

              
# test_config06.py
#    Test session.create configurations.
class test_config06(wttest.WiredTigerTestCase):
    uri = 'table:test_config06'
    key = 'keyABCDEFGHIJKLMNOPQRSTUVWXYZ'
    value = 'valueABCDEFGHIJKLMNOPQRSTUVWXYZ'

    def bad_session_config(self, config):

            

Reported by Pylint.

Missing class docstring
Error

Line: 33 Column: 1

              
# test_config06.py
#    Test session.create configurations.
class test_config06(wttest.WiredTigerTestCase):
    uri = 'table:test_config06'
    key = 'keyABCDEFGHIJKLMNOPQRSTUVWXYZ'
    value = 'valueABCDEFGHIJKLMNOPQRSTUVWXYZ'

    def bad_session_config(self, config):

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 38 Column: 5

                  key = 'keyABCDEFGHIJKLMNOPQRSTUVWXYZ'
    value = 'valueABCDEFGHIJKLMNOPQRSTUVWXYZ'

    def bad_session_config(self, config):
        msg = '/Invalid argument/'
        self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
            lambda: self.session.create(self.uri, config), msg)

    # Edge cases for key/value formats.

            

Reported by Pylint.

src/third_party/wiredtiger/test/suite/test_hs01.py
27 issues
Unable to import 'wiredtiger'
Error

Line: 30 Column: 1

              # OTHER DEALINGS IN THE SOFTWARE.

from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wiredtiger import stat
from wtdataset import SimpleDataSet
from wtscenario import make_scenarios

# test_hs01.py

            

Reported by Pylint.

Unable to import 'wiredtiger'
Error

Line: 31 Column: 1

              
from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wiredtiger import stat
from wtdataset import SimpleDataSet
from wtscenario import make_scenarios

# test_hs01.py
# Test that update and modify operations are durable across crash and recovery.

            

Reported by Pylint.

Redefining name 'stat' from outer scope (line 31)
Error

Line: 48 Column: 24

                  ]
    scenarios = make_scenarios(key_format_values)

    def get_stat(self, stat):
        stat_cursor = self.session.open_cursor('statistics:')
        val = stat_cursor[stat][2]
        stat_cursor.close()
        return val


            

Reported by Pylint.

Unused argument 'ds'
Error

Line: 84 Column: 47

                              session.commit_transaction()
        cursor.close()

    def durable_check(self, check_value, uri, ds):
        # Simulating recovery.
        newdir = "BACKUP"
        copy_wiredtiger_home(self, '.', newdir, True)
        conn = self.setUpConnectionOpen(newdir)
        session = self.setUpSessionOpen(conn)

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              #!/usr/bin/env python
#
# Public Domain 2014-present MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled

            

Reported by Pylint.

third party import "import wiredtiger, wttest" should be placed before "from helper import copy_wiredtiger_home"
Error

Line: 30 Column: 1

              # OTHER DEALINGS IN THE SOFTWARE.

from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wiredtiger import stat
from wtdataset import SimpleDataSet
from wtscenario import make_scenarios

# test_hs01.py

            

Reported by Pylint.

Multiple imports on one line (wiredtiger, wttest)
Error

Line: 30 Column: 1

              # OTHER DEALINGS IN THE SOFTWARE.

from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wiredtiger import stat
from wtdataset import SimpleDataSet
from wtscenario import make_scenarios

# test_hs01.py

            

Reported by Pylint.

third party import "from wiredtiger import stat" should be placed before "from helper import copy_wiredtiger_home"
Error

Line: 31 Column: 1

              
from helper import copy_wiredtiger_home
import wiredtiger, wttest
from wiredtiger import stat
from wtdataset import SimpleDataSet
from wtscenario import make_scenarios

# test_hs01.py
# Test that update and modify operations are durable across crash and recovery.

            

Reported by Pylint.

Class name "test_hs01" doesn't conform to PascalCase naming style
Error

Line: 38 Column: 1

              # test_hs01.py
# Test that update and modify operations are durable across crash and recovery.
# Additionally test that checkpoint inserts content into the history store.
class test_hs01(wttest.WiredTigerTestCase):
    conn_config = 'cache_size=200MB,statistics=(all)'
    session_config = 'isolation=snapshot'
    key_format_values = [
        ('column', dict(key_format='r')),
        ('row_integer', dict(key_format='i')),

            

Reported by Pylint.

Missing class docstring
Error

Line: 38 Column: 1

              # test_hs01.py
# Test that update and modify operations are durable across crash and recovery.
# Additionally test that checkpoint inserts content into the history store.
class test_hs01(wttest.WiredTigerTestCase):
    conn_config = 'cache_size=200MB,statistics=(all)'
    session_config = 'isolation=snapshot'
    key_format_values = [
        ('column', dict(key_format='r')),
        ('row_integer', dict(key_format='i')),

            

Reported by Pylint.