The following issues were found

Lib/test/future_test2.py
8 issues
Unused import site
Error

Line: 3 Column: 39

              """This is a test"""

from __future__ import nested_scopes; import site

def f(x):
    def g(y):
        return x + y
    return g


            

Reported by Pylint.

More than one statement on a single line
Error

Line: 3 Column: 39

              """This is a test"""

from __future__ import nested_scopes; import site

def f(x):
    def g(y):
        return x + y
    return g


            

Reported by Pylint.

Argument name "x" doesn't conform to snake_case naming style
Error

Line: 5 Column: 1

              
from __future__ import nested_scopes; import site

def f(x):
    def g(y):
        return x + y
    return g

result = f(2)(4)

            

Reported by Pylint.

Function name "f" doesn't conform to snake_case naming style
Error

Line: 5 Column: 1

              
from __future__ import nested_scopes; import site

def f(x):
    def g(y):
        return x + y
    return g

result = f(2)(4)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 5 Column: 1

              
from __future__ import nested_scopes; import site

def f(x):
    def g(y):
        return x + y
    return g

result = f(2)(4)

            

Reported by Pylint.

Function name "g" doesn't conform to snake_case naming style
Error

Line: 6 Column: 5

              from __future__ import nested_scopes; import site

def f(x):
    def g(y):
        return x + y
    return g

result = f(2)(4)

            

Reported by Pylint.

Argument name "y" doesn't conform to snake_case naming style
Error

Line: 6 Column: 5

              from __future__ import nested_scopes; import site

def f(x):
    def g(y):
        return x + y
    return g

result = f(2)(4)

            

Reported by Pylint.

Constant name "result" doesn't conform to UPPER_CASE naming style
Error

Line: 10 Column: 1

                      return x + y
    return g

result = f(2)(4)

            

Reported by Pylint.

Lib/lib2to3/pygram.py
8 issues
Attempted relative import beyond top-level package
Error

Line: 10 Column: 1

              import os

# Local imports
from .pgen2 import token
from .pgen2 import driver
from . import pytree

# The grammar file
_GRAMMAR_FILE = os.path.join(os.path.dirname(__file__), "Grammar.txt")

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 11 Column: 1

              
# Local imports
from .pgen2 import token
from .pgen2 import driver
from . import pytree

# The grammar file
_GRAMMAR_FILE = os.path.join(os.path.dirname(__file__), "Grammar.txt")
_PATTERN_GRAMMAR_FILE = os.path.join(os.path.dirname(__file__),

            

Reported by Pylint.

Attempted relative import beyond top-level package
Error

Line: 12 Column: 1

              # Local imports
from .pgen2 import token
from .pgen2 import driver
from . import pytree

# The grammar file
_GRAMMAR_FILE = os.path.join(os.path.dirname(__file__), "Grammar.txt")
_PATTERN_GRAMMAR_FILE = os.path.join(os.path.dirname(__file__),
                                     "PatternGrammar.txt")

            

Reported by Pylint.

Unused token imported from pgen2
Error

Line: 10 Column: 1

              import os

# Local imports
from .pgen2 import token
from .pgen2 import driver
from . import pytree

# The grammar file
_GRAMMAR_FILE = os.path.join(os.path.dirname(__file__), "Grammar.txt")

            

Reported by Pylint.

Unused import pytree
Error

Line: 12 Column: 1

              # Local imports
from .pgen2 import token
from .pgen2 import driver
from . import pytree

# The grammar file
_GRAMMAR_FILE = os.path.join(os.path.dirname(__file__), "Grammar.txt")
_PATTERN_GRAMMAR_FILE = os.path.join(os.path.dirname(__file__),
                                     "PatternGrammar.txt")

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 20 Column: 1

                                                   "PatternGrammar.txt")


class Symbols(object):

    def __init__(self, grammar):
        """Initializer.

        Creates an attribute for each grammar symbol (nonterminal),

            

Reported by Pylint.

Missing class docstring
Error

Line: 20 Column: 1

                                                   "PatternGrammar.txt")


class Symbols(object):

    def __init__(self, grammar):
        """Initializer.

        Creates an attribute for each grammar symbol (nonterminal),

            

Reported by Pylint.

Class 'Symbols' inherits from object, can be safely removed from bases in python3
Error

Line: 20 Column: 1

                                                   "PatternGrammar.txt")


class Symbols(object):

    def __init__(self, grammar):
        """Initializer.

        Creates an attribute for each grammar symbol (nonterminal),

            

Reported by Pylint.

Lib/test/leakers/test_ctypes.py
8 issues
Unused variable 'RECT'
Error

Line: 10 Column: 5

              def leak_inner():
    class POINT(Structure):
        _fields_ = [("x", c_int)]
    class RECT(Structure):
        _fields_ = [("a", POINTER(POINT))]

def leak():
    leak_inner()
    gc.collect()

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              
# Taken from Lib/ctypes/test/test_keeprefs.py, PointerToStructure.test().

from ctypes import Structure, c_int, POINTER
import gc

def leak_inner():
    class POINT(Structure):
        _fields_ = [("x", c_int)]

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 7 Column: 1

              from ctypes import Structure, c_int, POINTER
import gc

def leak_inner():
    class POINT(Structure):
        _fields_ = [("x", c_int)]
    class RECT(Structure):
        _fields_ = [("a", POINTER(POINT))]


            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 8 Column: 5

              import gc

def leak_inner():
    class POINT(Structure):
        _fields_ = [("x", c_int)]
    class RECT(Structure):
        _fields_ = [("a", POINTER(POINT))]

def leak():

            

Reported by Pylint.

Missing class docstring
Error

Line: 8 Column: 5

              import gc

def leak_inner():
    class POINT(Structure):
        _fields_ = [("x", c_int)]
    class RECT(Structure):
        _fields_ = [("a", POINTER(POINT))]

def leak():

            

Reported by Pylint.

Missing class docstring
Error

Line: 10 Column: 5

              def leak_inner():
    class POINT(Structure):
        _fields_ = [("x", c_int)]
    class RECT(Structure):
        _fields_ = [("a", POINTER(POINT))]

def leak():
    leak_inner()
    gc.collect()

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 10 Column: 5

              def leak_inner():
    class POINT(Structure):
        _fields_ = [("x", c_int)]
    class RECT(Structure):
        _fields_ = [("a", POINTER(POINT))]

def leak():
    leak_inner()
    gc.collect()

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 13 Column: 1

                  class RECT(Structure):
        _fields_ = [("a", POINTER(POINT))]

def leak():
    leak_inner()
    gc.collect()

            

Reported by Pylint.

Lib/test/test_json/__init__.py
8 issues
Missing module docstring
Error

Line: 1 Column: 1

              import os
import json
import doctest
import unittest

from test import support
from test.support import import_helper



            

Reported by Pylint.

Missing class docstring
Error

Line: 17 Column: 1

              cjson.JSONDecodeError = cjson.decoder.JSONDecodeError = json.JSONDecodeError

# create two base classes that will be used by the other tests
class PyTest(unittest.TestCase):
    json = pyjson
    loads = staticmethod(pyjson.loads)
    dumps = staticmethod(pyjson.dumps)
    JSONDecodeError = staticmethod(pyjson.JSONDecodeError)


            

Reported by Pylint.

Missing class docstring
Error

Line: 24 Column: 1

                  JSONDecodeError = staticmethod(pyjson.JSONDecodeError)

@unittest.skipUnless(cjson, 'requires _json')
class CTest(unittest.TestCase):
    if cjson is not None:
        json = cjson
        loads = staticmethod(cjson.loads)
        dumps = staticmethod(cjson.dumps)
        JSONDecodeError = staticmethod(cjson.JSONDecodeError)

            

Reported by Pylint.

Missing class docstring
Error

Line: 32 Column: 1

                      JSONDecodeError = staticmethod(cjson.JSONDecodeError)

# test PyTest and CTest checking if the functions come from the right module
class TestPyTest(PyTest):
    def test_pyjson(self):
        self.assertEqual(self.json.scanner.make_scanner.__module__,
                         'json.scanner')
        self.assertEqual(self.json.decoder.scanstring.__module__,
                         'json.decoder')

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 33 Column: 5

              
# test PyTest and CTest checking if the functions come from the right module
class TestPyTest(PyTest):
    def test_pyjson(self):
        self.assertEqual(self.json.scanner.make_scanner.__module__,
                         'json.scanner')
        self.assertEqual(self.json.decoder.scanstring.__module__,
                         'json.decoder')
        self.assertEqual(self.json.encoder.encode_basestring_ascii.__module__,

            

Reported by Pylint.

Missing class docstring
Error

Line: 41 Column: 1

                      self.assertEqual(self.json.encoder.encode_basestring_ascii.__module__,
                         'json.encoder')

class TestCTest(CTest):
    def test_cjson(self):
        self.assertEqual(self.json.scanner.make_scanner.__module__, '_json')
        self.assertEqual(self.json.decoder.scanstring.__module__, '_json')
        self.assertEqual(self.json.encoder.c_make_encoder.__module__, '_json')
        self.assertEqual(self.json.encoder.encode_basestring_ascii.__module__,

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 42 Column: 5

                                       'json.encoder')

class TestCTest(CTest):
    def test_cjson(self):
        self.assertEqual(self.json.scanner.make_scanner.__module__, '_json')
        self.assertEqual(self.json.decoder.scanstring.__module__, '_json')
        self.assertEqual(self.json.encoder.c_make_encoder.__module__, '_json')
        self.assertEqual(self.json.encoder.encode_basestring_ascii.__module__,
                         '_json')

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 50 Column: 1

                                       '_json')


def load_tests(loader, _, pattern):
    suite = unittest.TestSuite()
    for mod in (json, json.encoder, json.decoder):
        suite.addTest(doctest.DocTestSuite(mod))
    suite.addTest(TestPyTest('test_pyjson'))
    suite.addTest(TestCTest('test_cjson'))

            

Reported by Pylint.

Lib/test/test_abstract_numbers.py
7 issues
XXX: This is not ideal, but see the comment in math_trunc().
Error

Line: 34 Column: 3

                      self.assertTrue(issubclass(complex, Complex))

        c1, c2 = complex(3, 2), complex(4,1)
        # XXX: This is not ideal, but see the comment in math_trunc().
        self.assertRaises(TypeError, math.trunc, c1)
        self.assertRaises(TypeError, operator.mod, c1, c2)
        self.assertRaises(TypeError, divmod, c1, c2)
        self.assertRaises(TypeError, operator.floordiv, c1, c2)
        self.assertRaises(TypeError, float, c1)

            

Reported by Pylint.

Missing class docstring
Error

Line: 8 Column: 1

              import unittest
from numbers import Complex, Real, Rational, Integral

class TestNumbers(unittest.TestCase):
    def test_int(self):
        self.assertTrue(issubclass(int, Integral))
        self.assertTrue(issubclass(int, Complex))

        self.assertEqual(7, int(7).real)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 9 Column: 5

              from numbers import Complex, Real, Rational, Integral

class TestNumbers(unittest.TestCase):
    def test_int(self):
        self.assertTrue(issubclass(int, Integral))
        self.assertTrue(issubclass(int, Complex))

        self.assertEqual(7, int(7).real)
        self.assertEqual(0, int(7).imag)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 20 Column: 5

                      self.assertEqual(7, int(7).numerator)
        self.assertEqual(1, int(7).denominator)

    def test_float(self):
        self.assertFalse(issubclass(float, Rational))
        self.assertTrue(issubclass(float, Real))

        self.assertEqual(7.3, float(7.3).real)
        self.assertEqual(0, float(7.3).imag)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 29 Column: 5

                      self.assertEqual(7.3, float(7.3).conjugate())
        self.assertEqual(-7.3, float(-7.3).conjugate())

    def test_complex(self):
        self.assertFalse(issubclass(complex, Real))
        self.assertTrue(issubclass(complex, Complex))

        c1, c2 = complex(3, 2), complex(4,1)
        # XXX: This is not ideal, but see the comment in math_trunc().

            

Reported by Pylint.

Variable name "c2" doesn't conform to snake_case naming style
Error

Line: 33 Column: 13

                      self.assertFalse(issubclass(complex, Real))
        self.assertTrue(issubclass(complex, Complex))

        c1, c2 = complex(3, 2), complex(4,1)
        # XXX: This is not ideal, but see the comment in math_trunc().
        self.assertRaises(TypeError, math.trunc, c1)
        self.assertRaises(TypeError, operator.mod, c1, c2)
        self.assertRaises(TypeError, divmod, c1, c2)
        self.assertRaises(TypeError, operator.floordiv, c1, c2)

            

Reported by Pylint.

Variable name "c1" doesn't conform to snake_case naming style
Error

Line: 33 Column: 9

                      self.assertFalse(issubclass(complex, Real))
        self.assertTrue(issubclass(complex, Complex))

        c1, c2 = complex(3, 2), complex(4,1)
        # XXX: This is not ideal, but see the comment in math_trunc().
        self.assertRaises(TypeError, math.trunc, c1)
        self.assertRaises(TypeError, operator.mod, c1, c2)
        self.assertRaises(TypeError, divmod, c1, c2)
        self.assertRaises(TypeError, operator.floordiv, c1, c2)

            

Reported by Pylint.

Lib/linecache.py
7 issues
Unused variable 'lines'
Error

Line: 68 Column: 22

                      if len(entry) == 1:
            # lazy cache entry, leave it lazy.
            continue
        size, mtime, lines, fullname = entry
        if mtime is None:
            continue   # no-op for files loaded via a __loader__
        try:
            stat = os.stat(fullname)
        except OSError:

            

Reported by Pylint.

Redefining argument with the local name 'filename'
Error

Line: 63 Column: 9

                  else:
        return

    for filename in filenames:
        entry = cache[filename]
        if len(entry) == 1:
            # lazy cache entry, leave it lazy.
            continue
        size, mtime, lines, fullname = entry

            

Reported by Pylint.

Too many branches (15/12)
Error

Line: 80 Column: 1

                          cache.pop(filename, None)


def updatecache(filename, module_globals=None):
    """Update a cache entry and return its list of lines.
    If something's wrong, print a message, discard the cache entry,
    and return an empty list."""

    if filename in cache:

            

Reported by Pylint.

Too many return statements (7/6)
Error

Line: 80 Column: 1

                          cache.pop(filename, None)


def updatecache(filename, module_globals=None):
    """Update a cache entry and return its list of lines.
    If something's wrong, print a message, discard the cache entry,
    and return an empty list."""

    if filename in cache:

            

Reported by Pylint.

Variable name "fp" doesn't conform to snake_case naming style
Error

Line: 136 Column: 41

                      else:
            return []
    try:
        with tokenize.open(fullname) as fp:
            lines = fp.readlines()
    except OSError:
        return []
    if lines and not lines[-1].endswith('\n'):
        lines[-1] += '\n'

            

Reported by Pylint.

Unnecessary "else" after "return"
Error

Line: 161 Column: 9

                      filename, and the filename must not be already cached.
    """
    if filename in cache:
        if len(cache[filename]) == 1:
            return True
        else:
            return False
    if not filename or (filename.startswith('<') and filename.endswith('>')):
        return False

            

Reported by Pylint.

The if statement can be replaced with 'return bool(test)'
Error

Line: 161 Column: 9

                      filename, and the filename must not be already cached.
    """
    if filename in cache:
        if len(cache[filename]) == 1:
            return True
        else:
            return False
    if not filename or (filename.startswith('<') and filename.endswith('>')):
        return False

            

Reported by Pylint.

Lib/test/test_codecencodings_iso2022.py
7 issues
Missing module docstring
Error

Line: 1 Column: 1

              # Codec encoding tests for ISO 2022 encodings.

from test import multibytecodec_support
import unittest

COMMON_CODEC_TESTS = (
        # invalid bytes
        (b'ab\xFFcd', 'replace', 'ab\uFFFDcd'),
        (b'ab\x1Bdef', 'replace', 'ab\x1Bdef'),

            

Reported by Pylint.

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

Line: 13 Column: 1

                      (b'ab\x1B$def', 'replace', 'ab\uFFFD'),
    )

class Test_ISO2022_JP(multibytecodec_support.TestBase, unittest.TestCase):
    encoding = 'iso2022_jp'
    tstring = multibytecodec_support.load_teststring('iso2022_jp')
    codectests = COMMON_CODEC_TESTS + (
        (b'ab\x1BNdef', 'replace', 'ab\x1BNdef'),
    )

            

Reported by Pylint.

Missing class docstring
Error

Line: 13 Column: 1

                      (b'ab\x1B$def', 'replace', 'ab\uFFFD'),
    )

class Test_ISO2022_JP(multibytecodec_support.TestBase, unittest.TestCase):
    encoding = 'iso2022_jp'
    tstring = multibytecodec_support.load_teststring('iso2022_jp')
    codectests = COMMON_CODEC_TESTS + (
        (b'ab\x1BNdef', 'replace', 'ab\x1BNdef'),
    )

            

Reported by Pylint.

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

Line: 20 Column: 1

                      (b'ab\x1BNdef', 'replace', 'ab\x1BNdef'),
    )

class Test_ISO2022_JP2(multibytecodec_support.TestBase, unittest.TestCase):
    encoding = 'iso2022_jp_2'
    tstring = multibytecodec_support.load_teststring('iso2022_jp')
    codectests = COMMON_CODEC_TESTS + (
        (b'ab\x1BNdef', 'replace', 'abdef'),
    )

            

Reported by Pylint.

Missing class docstring
Error

Line: 20 Column: 1

                      (b'ab\x1BNdef', 'replace', 'ab\x1BNdef'),
    )

class Test_ISO2022_JP2(multibytecodec_support.TestBase, unittest.TestCase):
    encoding = 'iso2022_jp_2'
    tstring = multibytecodec_support.load_teststring('iso2022_jp')
    codectests = COMMON_CODEC_TESTS + (
        (b'ab\x1BNdef', 'replace', 'abdef'),
    )

            

Reported by Pylint.

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

Line: 27 Column: 1

                      (b'ab\x1BNdef', 'replace', 'abdef'),
    )

class Test_ISO2022_KR(multibytecodec_support.TestBase, unittest.TestCase):
    encoding = 'iso2022_kr'
    tstring = multibytecodec_support.load_teststring('iso2022_kr')
    codectests = COMMON_CODEC_TESTS + (
        (b'ab\x1BNdef', 'replace', 'ab\x1BNdef'),
    )

            

Reported by Pylint.

Missing class docstring
Error

Line: 27 Column: 1

                      (b'ab\x1BNdef', 'replace', 'abdef'),
    )

class Test_ISO2022_KR(multibytecodec_support.TestBase, unittest.TestCase):
    encoding = 'iso2022_kr'
    tstring = multibytecodec_support.load_teststring('iso2022_kr')
    codectests = COMMON_CODEC_TESTS + (
        (b'ab\x1BNdef', 'replace', 'ab\x1BNdef'),
    )

            

Reported by Pylint.

Lib/test/test_importlib/partial/pool_in_threads.py
7 issues
Catching too general exception Exception
Error

Line: 11 Column: 12

                  try:
        with multiprocessing.Pool(1):
            pass
    except Exception:
        traceback.print_exc()
        os._exit(1)


def main():

            

Reported by Pylint.

Access to a protected member _exit of a client class
Error

Line: 13 Column: 9

                          pass
    except Exception:
        traceback.print_exc()
        os._exit(1)


def main():
    threads = []
    for i in range(20):

            

Reported by Pylint.

Unused variable 'i'
Error

Line: 18 Column: 9

              
def main():
    threads = []
    for i in range(20):
        threads.append(threading.Thread(target=t))
    for thread in threads:
        thread.start()
    for thread in threads:
        thread.join()

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              import multiprocessing
import os
import threading
import traceback


def t():
    try:
        with multiprocessing.Pool(1):

            

Reported by Pylint.

Function name "t" doesn't conform to snake_case naming style
Error

Line: 7 Column: 1

              import traceback


def t():
    try:
        with multiprocessing.Pool(1):
            pass
    except Exception:
        traceback.print_exc()

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 7 Column: 1

              import traceback


def t():
    try:
        with multiprocessing.Pool(1):
            pass
    except Exception:
        traceback.print_exc()

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 16 Column: 1

                      os._exit(1)


def main():
    threads = []
    for i in range(20):
        threads.append(threading.Thread(target=t))
    for thread in threads:
        thread.start()

            

Reported by Pylint.

Lib/test/test_codecencodings_kr.py
7 issues
Missing module docstring
Error

Line: 1 Column: 1

              #
# test_codecencodings_kr.py
#   Codec encoding tests for ROK encodings.
#

from test import multibytecodec_support
import unittest

class Test_CP949(multibytecodec_support.TestBase, unittest.TestCase):

            

Reported by Pylint.

Missing class docstring
Error

Line: 9 Column: 1

              from test import multibytecodec_support
import unittest

class Test_CP949(multibytecodec_support.TestBase, unittest.TestCase):
    encoding = 'cp949'
    tstring = multibytecodec_support.load_teststring('cp949')
    codectests = (
        # invalid bytes
        (b"abc\x80\x80\xc1\xc4", "strict",  None),

            

Reported by Pylint.

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

Line: 9 Column: 1

              from test import multibytecodec_support
import unittest

class Test_CP949(multibytecodec_support.TestBase, unittest.TestCase):
    encoding = 'cp949'
    tstring = multibytecodec_support.load_teststring('cp949')
    codectests = (
        # invalid bytes
        (b"abc\x80\x80\xc1\xc4", "strict",  None),

            

Reported by Pylint.

Missing class docstring
Error

Line: 21 Column: 1

                      (b"abc\x80\x80\xc1\xc4", "ignore",  "abc\uc894"),
    )

class Test_EUCKR(multibytecodec_support.TestBase, unittest.TestCase):
    encoding = 'euc_kr'
    tstring = multibytecodec_support.load_teststring('euc_kr')
    codectests = (
        # invalid bytes
        (b"abc\x80\x80\xc1\xc4", "strict",  None),

            

Reported by Pylint.

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

Line: 21 Column: 1

                      (b"abc\x80\x80\xc1\xc4", "ignore",  "abc\uc894"),
    )

class Test_EUCKR(multibytecodec_support.TestBase, unittest.TestCase):
    encoding = 'euc_kr'
    tstring = multibytecodec_support.load_teststring('euc_kr')
    codectests = (
        # invalid bytes
        (b"abc\x80\x80\xc1\xc4", "strict",  None),

            

Reported by Pylint.

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

Line: 52 Column: 1

                      (b"\xc1\xc4", "strict", "\uc894"),
    )

class Test_JOHAB(multibytecodec_support.TestBase, unittest.TestCase):
    encoding = 'johab'
    tstring = multibytecodec_support.load_teststring('johab')
    codectests = (
        # invalid bytes
        (b"abc\x80\x80\xc1\xc4", "strict",  None),

            

Reported by Pylint.

Missing class docstring
Error

Line: 52 Column: 1

                      (b"\xc1\xc4", "strict", "\uc894"),
    )

class Test_JOHAB(multibytecodec_support.TestBase, unittest.TestCase):
    encoding = 'johab'
    tstring = multibytecodec_support.load_teststring('johab')
    codectests = (
        # invalid bytes
        (b"abc\x80\x80\xc1\xc4", "strict",  None),

            

Reported by Pylint.

Lib/test/future_test1.py
7 issues
Reimport 'nested_scopes' (imported line 4)
Error

Line: 4 Column: 1

              """This is a test"""

# Import the name nested_scopes twice to trigger SF bug #407394 (regression).
from __future__ import nested_scopes, nested_scopes

def f(x):
    def g(y):
        return x + y
    return g

            

Reported by Pylint.

Function name "f" doesn't conform to snake_case naming style
Error

Line: 6 Column: 1

              # Import the name nested_scopes twice to trigger SF bug #407394 (regression).
from __future__ import nested_scopes, nested_scopes

def f(x):
    def g(y):
        return x + y
    return g

result = f(2)(4)

            

Reported by Pylint.

Argument name "x" doesn't conform to snake_case naming style
Error

Line: 6 Column: 1

              # Import the name nested_scopes twice to trigger SF bug #407394 (regression).
from __future__ import nested_scopes, nested_scopes

def f(x):
    def g(y):
        return x + y
    return g

result = f(2)(4)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 6 Column: 1

              # Import the name nested_scopes twice to trigger SF bug #407394 (regression).
from __future__ import nested_scopes, nested_scopes

def f(x):
    def g(y):
        return x + y
    return g

result = f(2)(4)

            

Reported by Pylint.

Argument name "y" doesn't conform to snake_case naming style
Error

Line: 7 Column: 5

              from __future__ import nested_scopes, nested_scopes

def f(x):
    def g(y):
        return x + y
    return g

result = f(2)(4)

            

Reported by Pylint.

Function name "g" doesn't conform to snake_case naming style
Error

Line: 7 Column: 5

              from __future__ import nested_scopes, nested_scopes

def f(x):
    def g(y):
        return x + y
    return g

result = f(2)(4)

            

Reported by Pylint.

Constant name "result" doesn't conform to UPPER_CASE naming style
Error

Line: 11 Column: 1

                      return x + y
    return g

result = f(2)(4)

            

Reported by Pylint.