The following issues were found

ports/esp32/boards/UM_TINYS2/modules/tinys2.py
13 issues
Unable to import 'micropython'
Error

Line: 10 Column: 1

              # 2021-Apr-10 - v0.1 - Initial implementation

# Import required libraries
from micropython import const
from machine import Pin, SPI, ADC
import machine, time

# TinyS2 Hardware Pin Assignments


            

Reported by Pylint.

Unable to import 'machine'
Error

Line: 11 Column: 1

              
# Import required libraries
from micropython import const
from machine import Pin, SPI, ADC
import machine, time

# TinyS2 Hardware Pin Assignments

# Sense Pins

            

Reported by Pylint.

Unable to import 'machine'
Error

Line: 12 Column: 1

              # Import required libraries
from micropython import const
from machine import Pin, SPI, ADC
import machine, time

# TinyS2 Hardware Pin Assignments

# Sense Pins
VBUS_SENSE = const(21)

            

Reported by Pylint.

Unused SPI imported from machine
Error

Line: 11 Column: 1

              
# Import required libraries
from micropython import const
from machine import Pin, SPI, ADC
import machine, time

# TinyS2 Hardware Pin Assignments

# Sense Pins

            

Reported by Pylint.

Unused import time
Error

Line: 12 Column: 1

              # Import required libraries
from micropython import const
from machine import Pin, SPI, ADC
import machine, time

# TinyS2 Hardware Pin Assignments

# Sense Pins
VBUS_SENSE = const(21)

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # TinyS2 MicroPython Helper Library
# 2021 Seon Rozenblum - Unexpected Maker
#
# Project home:
#   https://tinys2.io
#
# 2021-Apr-10 - v0.1 - Initial implementation

# Import required libraries

            

Reported by Pylint.

Multiple imports on one line (machine, time)
Error

Line: 12 Column: 1

              # Import required libraries
from micropython import const
from machine import Pin, SPI, ADC
import machine, time

# TinyS2 Hardware Pin Assignments

# Sense Pins
VBUS_SENSE = const(21)

            

Reported by Pylint.

standard import "import machine, time" should be placed before "from micropython import const"
Error

Line: 12 Column: 1

              # Import required libraries
from micropython import const
from machine import Pin, SPI, ADC
import machine, time

# TinyS2 Hardware Pin Assignments

# Sense Pins
VBUS_SENSE = const(21)

            

Reported by Pylint.

Line too long (115/100)
Error

Line: 41 Column: 1

              
# Helper functions
def set_pixel_power(state):
    """Enable or Disable power to the onboard NeoPixel to either show colour, or to reduce power for deep sleep."""
    Pin(RGB_PWR, Pin.OUT).value(state)


def get_battery_voltage():
    """

            

Reported by Pylint.

Line too long (109/100)
Error

Line: 47 Column: 1

              
def get_battery_voltage():
    """
    Returns the current battery voltage. If no battery is connected, returns 4.2V which is the charge voltage
    This is an approximation only, but useful to detect if the charge state of the battery is getting low.
    """
    adc = ADC(Pin(VBAT_SENSE))  # Assign the ADC pin to read
    measuredvbat = adc.read()  # Read the value
    measuredvbat /= 8192  # divide by 8192 as we are using the default ADC voltage range of 0-1V

            

Reported by Pylint.

tests/basics/decorator.py
13 issues
Redefining name 'f' from outer scope (line 13)
Error

Line: 3 Column: 9

              # test decorators

def dec(f):
    print('dec')
    return f

def dec_arg(x):
    print(x)
    return lambda f:f

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # test decorators

def dec(f):
    print('dec')
    return f

def dec_arg(x):
    print(x)
    return lambda f:f

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 3 Column: 1

              # test decorators

def dec(f):
    print('dec')
    return f

def dec_arg(x):
    print(x)
    return lambda f:f

            

Reported by Pylint.

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

Line: 3 Column: 1

              # test decorators

def dec(f):
    print('dec')
    return f

def dec_arg(x):
    print(x)
    return lambda f:f

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 7 Column: 1

                  print('dec')
    return f

def dec_arg(x):
    print(x)
    return lambda f:f

# plain decorator
@dec

            

Reported by Pylint.

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

Line: 7 Column: 1

                  print('dec')
    return f

def dec_arg(x):
    print(x)
    return lambda f:f

# plain decorator
@dec

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 13 Column: 1

              
# plain decorator
@dec
def f():
    pass

# decorator with arg
@dec_arg('dec_arg')
def g():

            

Reported by Pylint.

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

Line: 13 Column: 1

              
# plain decorator
@dec
def f():
    pass

# decorator with arg
@dec_arg('dec_arg')
def g():

            

Reported by Pylint.

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

Line: 18 Column: 1

              
# decorator with arg
@dec_arg('dec_arg')
def g():
    pass

# decorator of class
@dec
class A:

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 18 Column: 1

              
# decorator with arg
@dec_arg('dec_arg')
def g():
    pass

# decorator of class
@dec
class A:

            

Reported by Pylint.

tests/basics/subclass_native1.py
13 issues
Attribute 'attr' defined outside __init__
Error

Line: 6 Column: 1

              
a = mylist([1, 2, 5])
# Test setting instance attr
a.attr = "something"
# Test base type __str__
print(a)
# Test getting instance attr
print(a.attr)
# Test base type ->subscr

            

Reported by Pylint.

TODO: Faults
Error

Line: 21 Column: 3

              # Test binary op of base type, with 2nd arg being raw base type
print(a + [20, 30, 40])
# Test binary op of base type, with 2nd arg being same class as 1st arg
# TODO: Faults
#print(a + a)

def foo():
    print("hello from foo")


            

Reported by Pylint.

Statement seems to have no effect
Error

Line: 36 Column: 9

              # multiple bases with layout conflict
try:
    class A(type, tuple):
        None
except TypeError:
    print('TypeError')

            

Reported by Pylint.

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

Line: 1 Column: 1

              class mylist(list):
    pass

a = mylist([1, 2, 5])
# Test setting instance attr
a.attr = "something"
# Test base type __str__
print(a)
# Test getting instance attr

            

Reported by Pylint.

Missing class docstring
Error

Line: 1 Column: 1

              class mylist(list):
    pass

a = mylist([1, 2, 5])
# Test setting instance attr
a.attr = "something"
# Test base type __str__
print(a)
# Test getting instance attr

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              class mylist(list):
    pass

a = mylist([1, 2, 5])
# Test setting instance attr
a.attr = "something"
# Test base type __str__
print(a)
# Test getting instance attr

            

Reported by Pylint.

Black listed name "foo"
Error

Line: 24 Column: 1

              # TODO: Faults
#print(a + a)

def foo():
    print("hello from foo")

try:
    class myfunc(type(foo)):
        pass

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 24 Column: 1

              # TODO: Faults
#print(a + a)

def foo():
    print("hello from foo")

try:
    class myfunc(type(foo)):
        pass

            

Reported by Pylint.

Too few public methods (0/2)
Error

Line: 28 Column: 5

                  print("hello from foo")

try:
    class myfunc(type(foo)):
        pass
except TypeError:
    print("TypeError")

# multiple bases with layout conflict

            

Reported by Pylint.

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

Line: 28 Column: 5

                  print("hello from foo")

try:
    class myfunc(type(foo)):
        pass
except TypeError:
    print("TypeError")

# multiple bases with layout conflict

            

Reported by Pylint.

tests/basics/with1.py
13 issues
Redefining name 'a' from outer scope (line 11)
Error

Line: 7 Column: 24

                      print("__enter__")
        return self

    def __exit__(self, a, b, c):
        print("__exit__", repr(a), repr(b))


with CtxMgr() as a:
    print(isinstance(a, CtxMgr))

            

Reported by Pylint.

Redefining name 'a' from outer scope (line 11)
Error

Line: 27 Column: 24

                      print("__enter__")
        return self

    def __exit__(self, a, b, c):
        print("__exit__", repr(a), repr(b))
        return True

try:
    with CtxMgr2() as a:

            

Reported by Pylint.

Unreachable code
Error

Line: 50 Column: 13

                  try:
        try:
            raise ValueError
            print("No ValueError3")
        finally:
            print("finally1")
    finally:
        print("finally2")


            

Reported by Pylint.

Unreachable code
Error

Line: 63 Column: 21

                          try:
                try:
                    raise ValueError
                    print("No ValueError3")
                finally:
                    print("finally1")
            finally:
                print("finally2")
    finally:

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              class CtxMgr:

    def __enter__(self):
        print("__enter__")
        return self

    def __exit__(self, a, b, c):
        print("__exit__", repr(a), repr(b))


            

Reported by Pylint.

Missing class docstring
Error

Line: 1 Column: 1

              class CtxMgr:

    def __enter__(self):
        print("__enter__")
        return self

    def __exit__(self, a, b, c):
        print("__exit__", repr(a), repr(b))


            

Reported by Pylint.

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

Line: 7 Column: 5

                      print("__enter__")
        return self

    def __exit__(self, a, b, c):
        print("__exit__", repr(a), repr(b))


with CtxMgr() as a:
    print(isinstance(a, CtxMgr))

            

Reported by Pylint.

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

Line: 7 Column: 5

                      print("__enter__")
        return self

    def __exit__(self, a, b, c):
        print("__exit__", repr(a), repr(b))


with CtxMgr() as a:
    print(isinstance(a, CtxMgr))

            

Reported by Pylint.

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

Line: 7 Column: 5

                      print("__enter__")
        return self

    def __exit__(self, a, b, c):
        print("__exit__", repr(a), repr(b))


with CtxMgr() as a:
    print(isinstance(a, CtxMgr))

            

Reported by Pylint.

Missing class docstring
Error

Line: 21 Column: 1

                  print("ValueError")


class CtxMgr2:

    def __enter__(self):
        print("__enter__")
        return self


            

Reported by Pylint.

examples/mandel.py
13 issues
Unable to import 'lcd'
Error

Line: 27 Column: 1

              

# PC testing
import lcd

lcd = lcd.LCD(128, 32)
mandelbrot()

            

Reported by Pylint.

Unused import micropython
Error

Line: 2 Column: 5

              try:
    import micropython
except:
    pass


def mandelbrot():
    # returns True if c, complex, is in the Mandelbrot set
    # @micropython.native

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 3 Column: 1

              try:
    import micropython
except:
    pass


def mandelbrot():
    # returns True if c, complex, is in the Mandelbrot set
    # @micropython.native

            

Reported by Pylint.

Unused variable 'i'
Error

Line: 12 Column: 13

                  # @micropython.native
    def in_set(c):
        z = 0
        for i in range(40):
            z = z * z + c
            if abs(z) > 60:
                return False
        return True


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              try:
    import micropython
except:
    pass


def mandelbrot():
    # returns True if c, complex, is in the Mandelbrot set
    # @micropython.native

            

Reported by Pylint.

Try, Except, Pass detected.
Security

Line: 3
Suggestion: https://bandit.readthedocs.io/en/latest/plugins/b110_try_except_pass.html

              try:
    import micropython
except:
    pass


def mandelbrot():
    # returns True if c, complex, is in the Mandelbrot set
    # @micropython.native

            

Reported by Bandit.

Missing function or method docstring
Error

Line: 7 Column: 1

                  pass


def mandelbrot():
    # returns True if c, complex, is in the Mandelbrot set
    # @micropython.native
    def in_set(c):
        z = 0
        for i in range(40):

            

Reported by Pylint.

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

Line: 10 Column: 5

              def mandelbrot():
    # returns True if c, complex, is in the Mandelbrot set
    # @micropython.native
    def in_set(c):
        z = 0
        for i in range(40):
            z = z * z + c
            if abs(z) > 60:
                return False

            

Reported by Pylint.

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

Line: 11 Column: 9

                  # returns True if c, complex, is in the Mandelbrot set
    # @micropython.native
    def in_set(c):
        z = 0
        for i in range(40):
            z = z * z + c
            if abs(z) > 60:
                return False
        return True

            

Reported by Pylint.

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

Line: 13 Column: 13

                  def in_set(c):
        z = 0
        for i in range(40):
            z = z * z + c
            if abs(z) > 60:
                return False
        return True

    lcd.clear()

            

Reported by Pylint.

tests/extmod/uasyncio_event_fair.py
13 issues
Consider explicitly re-raising using the 'from' keyword
Error

Line: 11 Column: 9

                      import asyncio
    except ImportError:
        print("SKIP")
        raise SystemExit


async def task1(id):
    for i in range(4):
        print("sleep", id)

            

Reported by Pylint.

Redefining built-in 'id'
Error

Line: 14 Column: 17

                      raise SystemExit


async def task1(id):
    for i in range(4):
        print("sleep", id)
        await asyncio.sleep(0)



            

Reported by Pylint.

Unused variable 'i'
Error

Line: 15 Column: 9

              

async def task1(id):
    for i in range(4):
        print("sleep", id)
        await asyncio.sleep(0)


async def task2(id, ev):

            

Reported by Pylint.

Redefining built-in 'id'
Error

Line: 20 Column: 17

                      await asyncio.sleep(0)


async def task2(id, ev):
    for i in range(4):
        ev.set()
        ev.clear()
        print("wait", id)
        await ev.wait()

            

Reported by Pylint.

Unused variable 'i'
Error

Line: 21 Column: 9

              

async def task2(id, ev):
    for i in range(4):
        ev.set()
        ev.clear()
        print("wait", id)
        await ev.wait()


            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Test fairness of Event.set()
# That tasks which continuously wait on events don't take over the scheduler

try:
    import uasyncio as asyncio
except ImportError:
    try:
        import asyncio
    except ImportError:

            

Reported by Pylint.

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

Line: 14 Column: 1

                      raise SystemExit


async def task1(id):
    for i in range(4):
        print("sleep", id)
        await asyncio.sleep(0)



            

Reported by Pylint.

Missing function or method docstring
Error

Line: 14 Column: 1

                      raise SystemExit


async def task1(id):
    for i in range(4):
        print("sleep", id)
        await asyncio.sleep(0)



            

Reported by Pylint.

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

Line: 20 Column: 1

                      await asyncio.sleep(0)


async def task2(id, ev):
    for i in range(4):
        ev.set()
        ev.clear()
        print("wait", id)
        await ev.wait()

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 20 Column: 1

                      await asyncio.sleep(0)


async def task2(id, ev):
    for i in range(4):
        ev.set()
        ev.clear()
        print("wait", id)
        await ev.wait()

            

Reported by Pylint.

tests/inlineasm/asmdiv.py
13 issues
Undefined variable 'micropython'
Error

Line: 1 Column: 2

              @micropython.asm_thumb
def sdiv(r0, r1):
    sdiv(r0, r0, r1)


@micropython.asm_thumb
def udiv(r0, r1):
    udiv(r0, r0, r1)


            

Reported by Pylint.

Too many positional arguments for function call
Error

Line: 3 Column: 5

              @micropython.asm_thumb
def sdiv(r0, r1):
    sdiv(r0, r0, r1)


@micropython.asm_thumb
def udiv(r0, r1):
    udiv(r0, r0, r1)


            

Reported by Pylint.

Undefined variable 'micropython'
Error

Line: 6 Column: 2

                  sdiv(r0, r0, r1)


@micropython.asm_thumb
def udiv(r0, r1):
    udiv(r0, r0, r1)


print(sdiv(1234, 3))

            

Reported by Pylint.

Too many positional arguments for function call
Error

Line: 8 Column: 5

              
@micropython.asm_thumb
def udiv(r0, r1):
    udiv(r0, r0, r1)


print(sdiv(1234, 3))
print(sdiv(-1234, 3))
print(sdiv(1234, -3))

            

Reported by Pylint.

Positional arguments appear to be out of order
Error

Line: 3 Column: 5

              @micropython.asm_thumb
def sdiv(r0, r1):
    sdiv(r0, r0, r1)


@micropython.asm_thumb
def udiv(r0, r1):
    udiv(r0, r0, r1)


            

Reported by Pylint.

Positional arguments appear to be out of order
Error

Line: 8 Column: 5

              
@micropython.asm_thumb
def udiv(r0, r1):
    udiv(r0, r0, r1)


print(sdiv(1234, 3))
print(sdiv(-1234, 3))
print(sdiv(1234, -3))

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              @micropython.asm_thumb
def sdiv(r0, r1):
    sdiv(r0, r0, r1)


@micropython.asm_thumb
def udiv(r0, r1):
    udiv(r0, r0, r1)


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 2 Column: 1

              @micropython.asm_thumb
def sdiv(r0, r1):
    sdiv(r0, r0, r1)


@micropython.asm_thumb
def udiv(r0, r1):
    udiv(r0, r0, r1)


            

Reported by Pylint.

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

Line: 2 Column: 1

              @micropython.asm_thumb
def sdiv(r0, r1):
    sdiv(r0, r0, r1)


@micropython.asm_thumb
def udiv(r0, r1):
    udiv(r0, r0, r1)


            

Reported by Pylint.

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

Line: 2 Column: 1

              @micropython.asm_thumb
def sdiv(r0, r1):
    sdiv(r0, r0, r1)


@micropython.asm_thumb
def udiv(r0, r1):
    udiv(r0, r0, r1)


            

Reported by Pylint.

tests/net_inet/tls_text_errors.py
13 issues
Unused import sys
Error

Line: 4 Column: 5

              # test that modtls produces a text error message

try:
    import usocket as socket, ussl as ssl, sys
except:
    import socket, ssl, sys


def test(addr):

            

Reported by Pylint.

No exception type(s) specified
Error

Line: 5 Column: 1

              
try:
    import usocket as socket, ussl as ssl, sys
except:
    import socket, ssl, sys


def test(addr):
    s = socket.socket()

            

Reported by Pylint.

Redefining name 'addr' from outer scope (line 32)
Error

Line: 9 Column: 10

                  import socket, ssl, sys


def test(addr):
    s = socket.socket()
    s.connect(addr)
    try:
        s = ssl.wrap_socket(s)
        print("wrap: no exception")

            

Reported by Pylint.

Using deprecated method wrap_socket()
Error

Line: 13 Column: 13

                  s = socket.socket()
    s.connect(addr)
    try:
        s = ssl.wrap_socket(s)
        print("wrap: no exception")
    except OSError as e:
        # mbedtls produces "mbedtls -0x7200: SSL - An invalid SSL record was received"
        # axtls produces "RECORD_OVERFLOW" but also prints "TLS buffer overflow,..."
        # CPython produces "[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1108)"

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # test that modtls produces a text error message

try:
    import usocket as socket, ussl as ssl, sys
except:
    import socket, ssl, sys


def test(addr):

            

Reported by Pylint.

Multiple imports on one line (usocket, ussl, sys)
Error

Line: 4 Column: 5

              # test that modtls produces a text error message

try:
    import usocket as socket, ussl as ssl, sys
except:
    import socket, ssl, sys


def test(addr):

            

Reported by Pylint.

Multiple imports on one line (socket, ssl, sys)
Error

Line: 6 Column: 5

              try:
    import usocket as socket, ussl as ssl, sys
except:
    import socket, ssl, sys


def test(addr):
    s = socket.socket()
    s.connect(addr)

            

Reported by Pylint.

Imports from package sys are not grouped
Error

Line: 6 Column: 5

              try:
    import usocket as socket, ussl as ssl, sys
except:
    import socket, ssl, sys


def test(addr):
    s = socket.socket()
    s.connect(addr)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 9 Column: 1

                  import socket, ssl, sys


def test(addr):
    s = socket.socket()
    s.connect(addr)
    try:
        s = ssl.wrap_socket(s)
        print("wrap: no exception")

            

Reported by Pylint.

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

Line: 10 Column: 5

              

def test(addr):
    s = socket.socket()
    s.connect(addr)
    try:
        s = ssl.wrap_socket(s)
        print("wrap: no exception")
    except OSError as e:

            

Reported by Pylint.

tests/float/string_format2.py
13 issues
Undefined variable 'int_nums2'
Error

Line: 155 Column: 36

                                      for prec in ("1", "2", "3"):
                            for num in f_nums:
                                test_fmt("", fill, alignment, sign, "", width, prec, type, num)
                        for num in int_nums2:
                            test_fmt("", fill, alignment, sign, "", width, "", type, num)

pct_nums1 = (0.1, 0.58, 0.99, -0.1, -0.58, -0.99)
pct_nums2 = (True, False, 1, 0, -1)


            

Reported by Pylint.

Redefining name 'type' from outer scope (line 102)
Error

Line: 11 Column: 69

                  print("{:8s}".format(fmt) + ">" + fmt.format(*args) + "<")


def test_fmt(conv, fill, alignment, sign, prefix, width, precision, type, arg):
    fmt = "{"
    if conv:
        fmt += "!"
        fmt += conv
    fmt += ":"

            

Reported by Pylint.

Redefining name 'fill' from outer scope (line 105)
Error

Line: 11 Column: 20

                  print("{:8s}".format(fmt) + ">" + fmt.format(*args) + "<")


def test_fmt(conv, fill, alignment, sign, prefix, width, precision, type, arg):
    fmt = "{"
    if conv:
        fmt += "!"
        fmt += conv
    fmt += ":"

            

Reported by Pylint.

Redefining name 'sign' from outer scope (line 106)
Error

Line: 11 Column: 37

                  print("{:8s}".format(fmt) + ">" + fmt.format(*args) + "<")


def test_fmt(conv, fill, alignment, sign, prefix, width, precision, type, arg):
    fmt = "{"
    if conv:
        fmt += "!"
        fmt += conv
    fmt += ":"

            

Reported by Pylint.

Redefining name 'alignment' from outer scope (line 104)
Error

Line: 11 Column: 26

                  print("{:8s}".format(fmt) + ">" + fmt.format(*args) + "<")


def test_fmt(conv, fill, alignment, sign, prefix, width, precision, type, arg):
    fmt = "{"
    if conv:
        fmt += "!"
        fmt += conv
    fmt += ":"

            

Reported by Pylint.

Redefining name 'width' from outer scope (line 103)
Error

Line: 11 Column: 51

                  print("{:8s}".format(fmt) + ">" + fmt.format(*args) + "<")


def test_fmt(conv, fill, alignment, sign, prefix, width, precision, type, arg):
    fmt = "{"
    if conv:
        fmt += "!"
        fmt += conv
    fmt += ":"

            

Reported by Pylint.

Redefining built-in 'type'
Error

Line: 102 Column: 9

              )

if full_tests:
    for type in ("e", "E", "g", "G", "n"):
        for width in ("", "4", "6", "8", "10"):
            for alignment in ("", "<", ">", "=", "^"):
                for fill in ("", "@", "0", " "):
                    for sign in ("", "+", "-", " "):
                        for prec in ("", "1", "3", "6"):

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              # Change the following to True to get a much more comprehensive set of tests
# to run, albeit, which take considerably longer.

full_tests = False


def test(fmt, *args):
    print("{:8s}".format(fmt) + ">" + fmt.format(*args) + "<")


            

Reported by Pylint.

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

Line: 4 Column: 1

              # Change the following to True to get a much more comprehensive set of tests
# to run, albeit, which take considerably longer.

full_tests = False


def test(fmt, *args):
    print("{:8s}".format(fmt) + ">" + fmt.format(*args) + "<")


            

Reported by Pylint.

Missing function or method docstring
Error

Line: 7 Column: 1

              full_tests = False


def test(fmt, *args):
    print("{:8s}".format(fmt) + ">" + fmt.format(*args) + "<")


def test_fmt(conv, fill, alignment, sign, prefix, width, precision, type, arg):
    fmt = "{"

            

Reported by Pylint.

tests/basics/class_inherit1.py
13 issues
Instance of 'A' has no 'y' member; maybe 'x'?
Error

Line: 7 Column: 23

                      self.x = x

    def f(self):
        print(self.x, self.y)

class B(A):
    def __init__(self, x, y):
        A.__init__(self, x)
        print('B init', x, y)

            

Reported by Pylint.

Missing class docstring
Error

Line: 1 Column: 1

              class A:
    def __init__(self, x):
        print('A init', x)
        self.x = x

    def f(self):
        print(self.x, self.y)

class B(A):

            

Reported by Pylint.

Too few public methods (1/2)
Error

Line: 1 Column: 1

              class A:
    def __init__(self, x):
        print('A init', x)
        self.x = x

    def f(self):
        print(self.x, self.y)

class B(A):

            

Reported by Pylint.

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

Line: 1 Column: 1

              class A:
    def __init__(self, x):
        print('A init', x)
        self.x = x

    def f(self):
        print(self.x, self.y)

class B(A):

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              class A:
    def __init__(self, x):
        print('A init', x)
        self.x = x

    def f(self):
        print(self.x, self.y)

class B(A):

            

Reported by Pylint.

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

Line: 4 Column: 9

              class A:
    def __init__(self, x):
        print('A init', x)
        self.x = x

    def f(self):
        print(self.x, self.y)

class B(A):

            

Reported by Pylint.

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

Line: 6 Column: 5

                      print('A init', x)
        self.x = x

    def f(self):
        print(self.x, self.y)

class B(A):
    def __init__(self, x, y):
        A.__init__(self, x)

            

Reported by Pylint.

Missing function or method docstring
Error

Line: 6 Column: 5

                      print('A init', x)
        self.x = x

    def f(self):
        print(self.x, self.y)

class B(A):
    def __init__(self, x, y):
        A.__init__(self, x)

            

Reported by Pylint.

Missing class docstring
Error

Line: 9 Column: 1

                  def f(self):
        print(self.x, self.y)

class B(A):
    def __init__(self, x, y):
        A.__init__(self, x)
        print('B init', x, y)
        self.y = y


            

Reported by Pylint.

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

Line: 9 Column: 1

                  def f(self):
        print(self.x, self.y)

class B(A):
    def __init__(self, x, y):
        A.__init__(self, x)
        print('B init', x, y)
        self.y = y


            

Reported by Pylint.