jarvisteach/appJar

View on GitHub
appJar/lib/png.py

Summary

Maintainability
F
3 wks
Test Coverage

File png.py has 2025 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/usr/bin/env python

from __future__ import print_function

# png.py - PNG encoder/decoder in pure Python
Severity: Major
Found in appJar/lib/png.py - About 5 days to fix

    Function from_array has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
    Open

    def from_array(a, mode=None, info={}):
        """Create a PNG :class:`Image` object from a 2- or 3-dimensional
        array.  One application of this function is easy PIL-style saving:
        ``png.from_array(pixels, 'L').save('foo.png')``.
    
    
    Severity: Minor
    Found in appJar/lib/png.py - About 6 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Cyclomatic complexity is too high in method __init__. (36)
    Open

        def __init__(self, width=None, height=None,
                     size=None,
                     greyscale=False,
                     alpha=False,
                     bitdepth=8,
    Severity: Minor
    Found in appJar/lib/png.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function __init__ has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
    Open

        def __init__(self, width=None, height=None,
                     size=None,
                     greyscale=False,
                     alpha=False,
                     bitdepth=8,
    Severity: Minor
    Found in appJar/lib/png.py - About 6 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Cyclomatic complexity is too high in function from_array. (31)
    Open

    def from_array(a, mode=None, info={}):
        """Create a PNG :class:`Image` object from a 2- or 3-dimensional
        array.  One application of this function is easy PIL-style saving:
        ``png.from_array(pixels, 'L').save('foo.png')``.
    
    
    Severity: Minor
    Found in appJar/lib/png.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function filter_scanline has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
    Open

    def filter_scanline(type, line, fo, prev=None):
        """Apply a scanline filter to a scanline.  `type` specifies the
        filter type (0 to 4); `line` specifies the current (unfiltered)
        scanline as a sequence of bytes; `prev` specifies the previous
        (unfiltered) scanline as a sequence of bytes. `fo` specifies the
    Severity: Minor
    Found in appJar/lib/png.py - About 5 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function write_passes has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

        def write_passes(self, outfile, rows, packed=False):
            """
            Write a PNG image to the output file.
    
            Most users are expected to find the :meth:`write` or
    Severity: Minor
    Found in appJar/lib/png.py - About 4 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Cyclomatic complexity is too high in method write_passes. (24)
    Open

        def write_passes(self, outfile, rows, packed=False):
            """
            Write a PNG image to the output file.
    
            Most users are expected to find the :meth:`write` or
    Severity: Minor
    Found in appJar/lib/png.py by radon

    Cyclomatic Complexity

    Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

    Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

    Construct Effect on CC Reasoning
    if +1 An if statement is a single decision.
    elif +1 The elif statement adds another decision.
    else +0 The else statement does not cause a new decision. The decision is at the if.
    for +1 There is a decision at the start of the loop.
    while +1 There is a decision at the while statement.
    except +1 Each except branch adds a new conditional path of execution.
    finally +0 The finally block is unconditionally executed.
    with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
    assert +1 The assert statement internally roughly equals a conditional statement.
    Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
    Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

    Source: http://radon.readthedocs.org/en/latest/intro.html

    Function undo_filter has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
    Open

        def undo_filter(self, filter_type, scanline, previous):
            """Undo the filter for a scanline.  `scanline` is a sequence of
            bytes that does not include the initial filter type byte.
            `previous` is decoded previous scanline (for straightlaced
            images this is the previous pixel row, but for interlaced
    Severity: Minor
    Found in appJar/lib/png.py - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Reader has 29 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Reader:
        """
        PNG decoder in pure Python.
        """
    
    
    Severity: Minor
    Found in appJar/lib/png.py - About 3 hrs to fix

      Function read_pnm_header has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
      Open

      def read_pnm_header(infile, supported=(b'P5', b'P6')):
          """
          Read a PNM header, returning (format,width,height,depth,maxval).
          `width` and `height` are in pixels.  `depth` is the number of
          channels in the image; for PBM and PGM it is synthesized as 1, for
      Severity: Minor
      Found in appJar/lib/png.py - About 3 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Cyclomatic complexity is too high in function read_pnm_header. (15)
      Open

      def read_pnm_header(infile, supported=(b'P5', b'P6')):
          """
          Read a PNM header, returning (format,width,height,depth,maxval).
          `width` and `height` are in pixels.  `depth` is the number of
          channels in the image; for PBM and PGM it is synthesized as 1, for
      Severity: Minor
      Found in appJar/lib/png.py by radon

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      Function read has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
      Open

          def read(self, lenient=False):
              """
              Read the PNG file and decode it.  Returns (`width`, `height`,
              `pixels`, `metadata`).
      
      
      Severity: Minor
      Found in appJar/lib/png.py - About 3 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Cyclomatic complexity is too high in function read_pam_header. (13)
      Open

      def read_pam_header(infile):
          """
          Read (the rest of a) PAM header.  `infile` should be positioned
          immediately after the initial 'P7' line (at the beginning of the
          second line).  Returns are as for `read_pnm_header`.
      Severity: Minor
      Found in appJar/lib/png.py by radon

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      Cyclomatic complexity is too high in method __init__. (13)
      Open

          def __init__(self, _guess=None, **kw):
              """
              Create a PNG decoder object.
      
              The constructor expects exactly one keyword argument. If you
      Severity: Minor
      Found in appJar/lib/png.py by radon

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      Cyclomatic complexity is too high in function _main. (13)
      Open

      def _main(argv):
          """
          Run the PNG encoder with options from the command line.
          """
      
      
      Severity: Minor
      Found in appJar/lib/png.py by radon

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      Function asDirect has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
      Open

          def asDirect(self):
              """Returns the image data as a direct representation of an
              ``x * y * planes`` array.  This method is intended to remove the
              need for callers to deal with palettes and transparency
              themselves.  Images with a palette (colour type 3)
      Severity: Minor
      Found in appJar/lib/png.py - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function _main has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
      Open

      def _main(argv):
          """
          Run the PNG encoder with options from the command line.
          """
      
      
      Severity: Minor
      Found in appJar/lib/png.py - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Cyclomatic complexity is too high in function check_palette. (11)
      Open

      def check_palette(palette):
          """Check a palette argument (to the :class:`Writer` class)
          for validity.  Returns the palette as a list if okay; raises an
          exception otherwise.
          """
      Severity: Minor
      Found in appJar/lib/png.py by radon

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      Cyclomatic complexity is too high in method asDirect. (11)
      Open

          def asDirect(self):
              """Returns the image data as a direct representation of an
              ``x * y * planes`` array.  This method is intended to remove the
              need for callers to deal with palettes and transparency
              themselves.  Images with a palette (colour type 3)
      Severity: Minor
      Found in appJar/lib/png.py by radon

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      Function __init__ has 21 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def __init__(self, width=None, height=None,
      Severity: Major
      Found in appJar/lib/png.py - About 2 hrs to fix

        Cyclomatic complexity is too high in function check_color. (10)
        Open

        def check_color(c, greyscale, which):
            """Checks that a colour argument for transparent or
            background options is the right form.  Returns the colour
            (which, if it's a bar integer, is "corrected" to a 1-tuple).
            """
        Severity: Minor
        Found in appJar/lib/png.py by radon

        Cyclomatic Complexity

        Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

        Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

        Construct Effect on CC Reasoning
        if +1 An if statement is a single decision.
        elif +1 The elif statement adds another decision.
        else +0 The else statement does not cause a new decision. The decision is at the if.
        for +1 There is a decision at the start of the loop.
        while +1 There is a decision at the while statement.
        except +1 Each except branch adds a new conditional path of execution.
        finally +0 The finally block is unconditionally executed.
        with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
        assert +1 The assert statement internally roughly equals a conditional statement.
        Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
        Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

        Source: http://radon.readthedocs.org/en/latest/intro.html

        Cyclomatic complexity is too high in function filter_scanline. (10)
        Open

        def filter_scanline(type, line, fo, prev=None):
            """Apply a scanline filter to a scanline.  `type` specifies the
            filter type (0 to 4); `line` specifies the current (unfiltered)
            scanline as a sequence of bytes; `prev` specifies the previous
            (unfiltered) scanline as a sequence of bytes. `fo` specifies the
        Severity: Minor
        Found in appJar/lib/png.py by radon

        Cyclomatic Complexity

        Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

        Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

        Construct Effect on CC Reasoning
        if +1 An if statement is a single decision.
        elif +1 The elif statement adds another decision.
        else +0 The else statement does not cause a new decision. The decision is at the if.
        for +1 There is a decision at the start of the loop.
        while +1 There is a decision at the while statement.
        except +1 Each except branch adds a new conditional path of execution.
        finally +0 The finally block is unconditionally executed.
        with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
        assert +1 The assert statement internally roughly equals a conditional statement.
        Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
        Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

        Source: http://radon.readthedocs.org/en/latest/intro.html

        Cyclomatic complexity is too high in method chunk. (9)
        Open

            def chunk(self, seek=None, lenient=False):
                """
                Read the next PNG chunk from the input file; returns a
                (*type*, *data*) tuple.  *type* is the chunk's type as a
                byte string (all PNG chunk types are 4 bytes long).
        Severity: Minor
        Found in appJar/lib/png.py by radon

        Cyclomatic Complexity

        Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

        Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

        Construct Effect on CC Reasoning
        if +1 An if statement is a single decision.
        elif +1 The elif statement adds another decision.
        else +0 The else statement does not cause a new decision. The decision is at the if.
        for +1 There is a decision at the start of the loop.
        while +1 There is a decision at the while statement.
        except +1 Each except branch adds a new conditional path of execution.
        finally +0 The finally block is unconditionally executed.
        with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
        assert +1 The assert statement internally roughly equals a conditional statement.
        Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
        Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

        Source: http://radon.readthedocs.org/en/latest/intro.html

        Cyclomatic complexity is too high in method serialtoflat. (8)
        Open

            def serialtoflat(self, bytes, width=None):
                """Convert serial format (byte stream) pixel data to flat row
                flat pixel.
                """
        
        
        Severity: Minor
        Found in appJar/lib/png.py by radon

        Cyclomatic Complexity

        Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

        Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

        Construct Effect on CC Reasoning
        if +1 An if statement is a single decision.
        elif +1 The elif statement adds another decision.
        else +0 The else statement does not cause a new decision. The decision is at the if.
        for +1 There is a decision at the start of the loop.
        while +1 There is a decision at the while statement.
        except +1 Each except branch adds a new conditional path of execution.
        finally +0 The finally block is unconditionally executed.
        with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
        assert +1 The assert statement internally roughly equals a conditional statement.
        Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
        Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

        Source: http://radon.readthedocs.org/en/latest/intro.html

        Cyclomatic complexity is too high in class Writer. (8)
        Open

        class Writer:
            """
            PNG encoder in pure Python.
            """
        
        
        Severity: Minor
        Found in appJar/lib/png.py by radon

        Cyclomatic Complexity

        Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

        Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

        Construct Effect on CC Reasoning
        if +1 An if statement is a single decision.
        elif +1 The elif statement adds another decision.
        else +0 The else statement does not cause a new decision. The decision is at the if.
        for +1 There is a decision at the start of the loop.
        while +1 There is a decision at the while statement.
        except +1 Each except branch adds a new conditional path of execution.
        finally +0 The finally block is unconditionally executed.
        with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
        assert +1 The assert statement internally roughly equals a conditional statement.
        Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
        Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

        Source: http://radon.readthedocs.org/en/latest/intro.html

        Cyclomatic complexity is too high in function write_pnm. (8)
        Open

        def write_pnm(file, width, height, pixels, meta):
            """Write a Netpbm PNM/PAM file.
            """
        
            bitdepth = meta['bitdepth']
        Severity: Minor
        Found in appJar/lib/png.py by radon

        Cyclomatic Complexity

        Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

        Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

        Construct Effect on CC Reasoning
        if +1 An if statement is a single decision.
        elif +1 The elif statement adds another decision.
        else +0 The else statement does not cause a new decision. The decision is at the if.
        for +1 There is a decision at the start of the loop.
        while +1 There is a decision at the while statement.
        except +1 Each except branch adds a new conditional path of execution.
        finally +0 The finally block is unconditionally executed.
        with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
        assert +1 The assert statement internally roughly equals a conditional statement.
        Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
        Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

        Source: http://radon.readthedocs.org/en/latest/intro.html

        Function check_palette has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

        def check_palette(palette):
            """Check a palette argument (to the :class:`Writer` class)
            for validity.  Returns the palette as a list if okay; raises an
            exception otherwise.
            """
        Severity: Minor
        Found in appJar/lib/png.py - About 2 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function chunk has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

            def chunk(self, seek=None, lenient=False):
                """
                Read the next PNG chunk from the input file; returns a
                (*type*, *data*) tuple.  *type* is the chunk's type as a
                byte string (all PNG chunk types are 4 bytes long).
        Severity: Minor
        Found in appJar/lib/png.py - About 2 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Cyclomatic complexity is too high in method deinterlace. (7)
        Open

            def deinterlace(self, raw):
                """
                Read raw pixel data, undo filters, deinterlace, and flatten.
                Return in flat row flat pixel format.
                """
        Severity: Minor
        Found in appJar/lib/png.py by radon

        Cyclomatic Complexity

        Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

        Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

        Construct Effect on CC Reasoning
        if +1 An if statement is a single decision.
        elif +1 The elif statement adds another decision.
        else +0 The else statement does not cause a new decision. The decision is at the if.
        for +1 There is a decision at the start of the loop.
        while +1 There is a decision at the while statement.
        except +1 Each except branch adds a new conditional path of execution.
        finally +0 The finally block is unconditionally executed.
        with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
        assert +1 The assert statement internally roughly equals a conditional statement.
        Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
        Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

        Source: http://radon.readthedocs.org/en/latest/intro.html

        Cyclomatic complexity is too high in function check_sizes. (7)
        Open

        def check_sizes(size, width, height):
            """Check that these arguments, in supplied, are consistent.
            Return a (width, height) pair.
            """
        
        
        Severity: Minor
        Found in appJar/lib/png.py by radon

        Cyclomatic Complexity

        Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

        Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

        Construct Effect on CC Reasoning
        if +1 An if statement is a single decision.
        elif +1 The elif statement adds another decision.
        else +0 The else statement does not cause a new decision. The decision is at the if.
        for +1 There is a decision at the start of the loop.
        while +1 There is a decision at the while statement.
        except +1 Each except branch adds a new conditional path of execution.
        finally +0 The finally block is unconditionally executed.
        with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
        assert +1 The assert statement internally roughly equals a conditional statement.
        Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
        Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

        Source: http://radon.readthedocs.org/en/latest/intro.html

        Cyclomatic complexity is too high in function check_bitdepth_colortype. (7)
        Open

        def check_bitdepth_colortype(bitdepth, colortype):
            """Check that `bitdepth` and `colortype` are both valid,
            and specified in a valid combination. Returns if valid,
            raise an Exception if not valid.
            """
        Severity: Minor
        Found in appJar/lib/png.py by radon

        Cyclomatic Complexity

        Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

        Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

        Construct Effect on CC Reasoning
        if +1 An if statement is a single decision.
        elif +1 The elif statement adds another decision.
        else +0 The else statement does not cause a new decision. The decision is at the if.
        for +1 There is a decision at the start of the loop.
        while +1 There is a decision at the while statement.
        except +1 Each except branch adds a new conditional path of execution.
        finally +0 The finally block is unconditionally executed.
        with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
        assert +1 The assert statement internally roughly equals a conditional statement.
        Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
        Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

        Source: http://radon.readthedocs.org/en/latest/intro.html

        Cyclomatic complexity is too high in method asRGBA. (7)
        Open

            def asRGBA(self):
                """Return image as RGBA pixels.  Greyscales are expanded into
                RGB triplets; an alpha channel is synthesized if necessary.
                The return values are as for the :meth:`read` method
                except that the *metadata* reflect the returned pixels, not the
        Severity: Minor
        Found in appJar/lib/png.py by radon

        Cyclomatic Complexity

        Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

        Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

        Construct Effect on CC Reasoning
        if +1 An if statement is a single decision.
        elif +1 The elif statement adds another decision.
        else +0 The else statement does not cause a new decision. The decision is at the if.
        for +1 There is a decision at the start of the loop.
        while +1 There is a decision at the while statement.
        except +1 Each except branch adds a new conditional path of execution.
        finally +0 The finally block is unconditionally executed.
        with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
        assert +1 The assert statement internally roughly equals a conditional statement.
        Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
        Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

        Source: http://radon.readthedocs.org/en/latest/intro.html

        Cyclomatic complexity is too high in function color_triple. (7)
        Open

        def color_triple(color):
            """
            Convert a command line colour value to a RGB triple of integers.
            FIXME: Somewhere we need support for greyscale backgrounds etc.
            """
        Severity: Minor
        Found in appJar/lib/png.py by radon

        Cyclomatic Complexity

        Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

        Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

        Construct Effect on CC Reasoning
        if +1 An if statement is a single decision.
        elif +1 The elif statement adds another decision.
        else +0 The else statement does not cause a new decision. The decision is at the if.
        for +1 There is a decision at the start of the loop.
        while +1 There is a decision at the while statement.
        except +1 Each except branch adds a new conditional path of execution.
        finally +0 The finally block is unconditionally executed.
        with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
        assert +1 The assert statement internally roughly equals a conditional statement.
        Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
        Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

        Source: http://radon.readthedocs.org/en/latest/intro.html

        Cyclomatic complexity is too high in method _process_IHDR. (7)
        Open

            def _process_IHDR(self, data):
                # http://www.w3.org/TR/PNG/#11IHDR
                if len(data) != 13:
                    raise FormatError('IHDR chunk has incorrect length.')
                (self.width, self.height, self.bitdepth, self.color_type,
        Severity: Minor
        Found in appJar/lib/png.py by radon

        Cyclomatic Complexity

        Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

        Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

        Construct Effect on CC Reasoning
        if +1 An if statement is a single decision.
        elif +1 The elif statement adds another decision.
        else +0 The else statement does not cause a new decision. The decision is at the if.
        for +1 There is a decision at the start of the loop.
        while +1 There is a decision at the while statement.
        except +1 Each except branch adds a new conditional path of execution.
        finally +0 The finally block is unconditionally executed.
        with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
        assert +1 The assert statement internally roughly equals a conditional statement.
        Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
        Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

        Source: http://radon.readthedocs.org/en/latest/intro.html

        Cyclomatic complexity is too high in method _process_tRNS. (6)
        Open

            def _process_tRNS(self, data):
                # http://www.w3.org/TR/PNG/#11tRNS
                self.trns = data
                if self.colormap:
                    if not self.plte:
        Severity: Minor
        Found in appJar/lib/png.py by radon

        Cyclomatic Complexity

        Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

        Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

        Construct Effect on CC Reasoning
        if +1 An if statement is a single decision.
        elif +1 The elif statement adds another decision.
        else +0 The else statement does not cause a new decision. The decision is at the if.
        for +1 There is a decision at the start of the loop.
        while +1 There is a decision at the while statement.
        except +1 Each except branch adds a new conditional path of execution.
        finally +0 The finally block is unconditionally executed.
        with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
        assert +1 The assert statement internally roughly equals a conditional statement.
        Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
        Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

        Source: http://radon.readthedocs.org/en/latest/intro.html

        Cyclomatic complexity is too high in method read. (6)
        Open

            def read(self, lenient=False):
                """
                Read the PNG file and decode it.  Returns (`width`, `height`,
                `pixels`, `metadata`).
        
        
        Severity: Minor
        Found in appJar/lib/png.py by radon

        Cyclomatic Complexity

        Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

        Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

        Construct Effect on CC Reasoning
        if +1 An if statement is a single decision.
        elif +1 The elif statement adds another decision.
        else +0 The else statement does not cause a new decision. The decision is at the if.
        for +1 There is a decision at the start of the loop.
        while +1 There is a decision at the while statement.
        except +1 Each except branch adds a new conditional path of execution.
        finally +0 The finally block is unconditionally executed.
        with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
        assert +1 The assert statement internally roughly equals a conditional statement.
        Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
        Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

        Source: http://radon.readthedocs.org/en/latest/intro.html

        Cyclomatic complexity is too high in method undo_filter_paeth. (6)
        Open

                def undo_filter_paeth(filter_unit, scanline, previous, result):
                    """Undo Paeth filter."""
        
                    # Also used for ci.
                    ai = -filter_unit
        Severity: Minor
        Found in appJar/lib/png.py by radon

        Cyclomatic Complexity

        Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

        Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

        Construct Effect on CC Reasoning
        if +1 An if statement is a single decision.
        elif +1 The elif statement adds another decision.
        else +0 The else statement does not cause a new decision. The decision is at the if.
        for +1 There is a decision at the start of the loop.
        while +1 There is a decision at the while statement.
        except +1 Each except branch adds a new conditional path of execution.
        finally +0 The finally block is unconditionally executed.
        with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
        assert +1 The assert statement internally roughly equals a conditional statement.
        Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
        Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

        Source: http://radon.readthedocs.org/en/latest/intro.html

        Cyclomatic complexity is too high in method array_scanlines_interlace. (6)
        Open

            def array_scanlines_interlace(self, pixels):
                """
                Generator for interlaced scanlines from an array.  `pixels` is
                the full source image in flat row flat pixel format.  The
                generator yields each scanline of the reduced passes in turn, in
        Severity: Minor
        Found in appJar/lib/png.py by radon

        Cyclomatic Complexity

        Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

        Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

        Construct Effect on CC Reasoning
        if +1 An if statement is a single decision.
        elif +1 The elif statement adds another decision.
        else +0 The else statement does not cause a new decision. The decision is at the if.
        for +1 There is a decision at the start of the loop.
        while +1 There is a decision at the while statement.
        except +1 Each except branch adds a new conditional path of execution.
        finally +0 The finally block is unconditionally executed.
        with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
        assert +1 The assert statement internally roughly equals a conditional statement.
        Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
        Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

        Source: http://radon.readthedocs.org/en/latest/intro.html

        Function __init__ has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

            def __init__(self, _guess=None, **kw):
                """
                Create a PNG decoder object.
        
                The constructor expects exactly one keyword argument. If you
        Severity: Minor
        Found in appJar/lib/png.py - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function asRGBA has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

            def asRGBA(self):
                """Return image as RGBA pixels.  Greyscales are expanded into
                RGB triplets; an alpha channel is synthesized if necessary.
                The return values are as for the :meth:`read` method
                except that the *metadata* reflect the returned pixels, not the
        Severity: Minor
        Found in appJar/lib/png.py - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function array_scanlines_interlace has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

            def array_scanlines_interlace(self, pixels):
                """
                Generator for interlaced scanlines from an array.  `pixels` is
                the full source image in flat row flat pixel format.  The
                generator yields each scanline of the reduced passes in turn, in
        Severity: Minor
        Found in appJar/lib/png.py - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function read_pam_header has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

        def read_pam_header(infile):
            """
            Read (the rest of a) PAM header.  `infile` should be positioned
            immediately after the initial 'P7' line (at the beginning of the
            second line).  Returns are as for `read_pnm_header`.
        Severity: Minor
        Found in appJar/lib/png.py - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function deinterlace has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

            def deinterlace(self, raw):
                """
                Read raw pixel data, undo filters, deinterlace, and flatten.
                Return in flat row flat pixel format.
                """
        Severity: Minor
        Found in appJar/lib/png.py - About 1 hr to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function __init__ has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def __init__(self, width=None, height=None,
                         size=None,
                         greyscale=False,
                         alpha=False,
                         bitdepth=8,
        Severity: Minor
        Found in appJar/lib/png.py - About 1 hr to fix

          Function check_color has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
          Open

          def check_color(c, greyscale, which):
              """Checks that a colour argument for transparent or
              background options is the right form.  Returns the colour
              (which, if it's a bar integer, is "corrected" to a 1-tuple).
              """
          Severity: Minor
          Found in appJar/lib/png.py - About 1 hr to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function _process_tRNS has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
          Open

              def _process_tRNS(self, data):
                  # http://www.w3.org/TR/PNG/#11tRNS
                  self.trns = data
                  if self.colormap:
                      if not self.plte:
          Severity: Minor
          Found in appJar/lib/png.py - About 1 hr to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function undo_filter_paeth has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
          Open

                  def undo_filter_paeth(filter_unit, scanline, previous, result):
                      """Undo Paeth filter."""
          
                      # Also used for ci.
                      ai = -filter_unit
          Severity: Minor
          Found in appJar/lib/png.py - About 1 hr to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function write_pnm has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

          def write_pnm(file, width, height, pixels, meta):
              """Write a Netpbm PNM/PAM file.
              """
          
              bitdepth = meta['bitdepth']
          Severity: Minor
          Found in appJar/lib/png.py - About 1 hr to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function iterboxed has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              def iterboxed(self, rows):
                  """Iterator that yields each scanline in boxed row flat pixel
                  format.  `rows` should be an iterator that yields the bytes of
                  each row in turn.
                  """
          Severity: Minor
          Found in appJar/lib/png.py - About 45 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function preamble has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              def preamble(self, lenient=False):
                  """
                  Extract the image metadata by reading the initial part of
                  the PNG file up to the start of the ``IDAT`` chunk.  All the
                  chunks that precede the ``IDAT`` chunk are read and either
          Severity: Minor
          Found in appJar/lib/png.py - About 45 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

          Function write_pnm has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def write_pnm(file, width, height, pixels, meta):
          Severity: Minor
          Found in appJar/lib/png.py - About 35 mins to fix

            Function asRGB has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                def asRGB(self):
                    """Return image as RGB pixels.  RGB colour images are passed
                    through unchanged; greyscales are expanded into RGB
                    triplets (there is a small speed overhead for doing this).
            
            
            Severity: Minor
            Found in appJar/lib/png.py - About 35 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function _process_IHDR has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                def _process_IHDR(self, data):
                    # http://www.w3.org/TR/PNG/#11IHDR
                    if len(data) != 13:
                        raise FormatError('IHDR chunk has incorrect length.')
                    (self.width, self.height, self.bitdepth, self.color_type,
            Severity: Minor
            Found in appJar/lib/png.py - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function serialtoflat has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                def serialtoflat(self, bytes, width=None):
                    """Convert serial format (byte stream) pixel data to flat row
                    flat pixel.
                    """
            
            
            Severity: Minor
            Found in appJar/lib/png.py - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function undo_filter_average has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                    def undo_filter_average(filter_unit, scanline, previous, result):
                        """Undo up filter."""
            
                        ai = -filter_unit
                        for i in range(len(result)):
            Severity: Minor
            Found in appJar/lib/png.py - About 25 mins to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    def paeth():
                        """Undo Paeth filter."""
            
                        # Also used for ci.
                        ai = -fu
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 2 days to fix
            appJar/lib/png.py on lines 2290..2314

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 228.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    def undo_filter_paeth(filter_unit, scanline, previous, result):
                        """Undo Paeth filter."""
            
                        # Also used for ci.
                        ai = -filter_unit
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 2 days to fix
            appJar/lib/png.py on lines 1499..1523

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 228.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    def average():
                        """Undo average filter."""
            
                        ai = -fu
                        for i in range(len(result)):
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 7 hrs to fix
            appJar/lib/png.py on lines 2275..2287

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 118.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    def undo_filter_average(filter_unit, scanline, previous, result):
                        """Undo up filter."""
            
                        ai = -filter_unit
                        for i in range(len(result)):
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 7 hrs to fix
            appJar/lib/png.py on lines 1485..1497

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 118.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    def undo_filter_sub(filter_unit, scanline, previous, result):
                        """Undo sub filter."""
            
                        ai = 0
                        # Loops starts at index fu.  Observe that the initial part
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 4 hrs to fix
            appJar/lib/png.py on lines 1464..1475

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 76.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    def sub():
                        """Undo sub filter."""
            
                        ai = 0
                        # Loop starts at index fu.  Observe that the initial part
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 4 hrs to fix
            appJar/lib/png.py on lines 2252..2263

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 76.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                    def undo_filter_up(filter_unit, scanline, previous, result):
                        """Undo up filter."""
            
                        for i in range(len(result)):
                            x = scanline[i]
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 3 hrs to fix
            appJar/lib/png.py on lines 1477..1483

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 63.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                    def up():
                        """Undo up filter."""
            
                        for i in range(len(result)):
                            x = scanline[i]
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 3 hrs to fix
            appJar/lib/png.py on lines 2266..2272

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 63.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    if self.transparent is not None:
                        if self.greyscale:
                            write_chunk(outfile, b'tRNS',
                                        struct.pack("!1H", *self.transparent))
                        else:
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 2 hrs to fix
            appJar/lib/png.py on lines 689..695

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 59.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    if self.background is not None:
                        if self.greyscale:
                            write_chunk(outfile, b'bKGD',
                                        struct.pack("!1H", *self.background))
                        else:
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 2 hrs to fix
            appJar/lib/png.py on lines 680..686

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 59.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                        if self.bitdepth == 16:
                            raw = tostring(raw)
                            return array(str('H'), struct.unpack('!%dH' % (len(raw)//2), raw))
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 2 hrs to fix
            appJar/lib/png.py on lines 1623..1626

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 56.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    if self.bitdepth == 16:
                        bytes = tostring(bytes)
                        return array(str('H'),
                          struct.unpack('!%dH' % (len(bytes)//2), bytes))
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 2 hrs to fix
            appJar/lib/png.py on lines 1596..1598

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 56.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                if height is not None and height != size[1]:
                    raise ValueError(
                      "size[1] (%r) and height (%r) should match when both are used."
                        % (size[1], height))
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 1 hr to fix
            appJar/lib/png.py on lines 269..272

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 49.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                if width is not None and width != size[0]:
                    raise ValueError(
                      "size[0] (%r) and width (%r) should match when both are used."
                        % (size[0], width))
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 1 hr to fix
            appJar/lib/png.py on lines 273..276

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 49.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                if color.startswith('#') and len(color) == 7:
                    return (int(color[1:3], 16),
                            int(color[3:5], 16),
                            int(color[5:7], 16))
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 1 hr to fix
            appJar/lib/png.py on lines 2519..2522

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 47.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                elif color.startswith('#') and len(color) == 13:
                    return (int(color[1:5], 16),
                            int(color[5:9], 16),
                            int(color[9:13], 16))
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 1 hr to fix
            appJar/lib/png.py on lines 2515..2518

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 47.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                        pixels.fromfile(infile,
                                        (self.bitdepth/8) * self.color_planes *
                                        self.width * self.height)
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 1 hr to fix
            appJar/lib/png.py on lines 852..854

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 42.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

                    pixels.fromfile(ppmfile,
                                    (self.bitdepth/8) * self.color_planes *
                                    self.width * self.height)
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 1 hr to fix
            appJar/lib/png.py on lines 839..841

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 42.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                    if self.interlace:
                        self.write_passes(outfile, self.array_scanlines_interlace(pixels))
                    else:
                        self.write_passes(outfile, self.array_scanlines(pixels))
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 1 hr to fix
            appJar/lib/png.py on lines 805..808

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 39.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                    if self.interlace:
                        self.write_passes(outfile, self.array_scanlines_interlace(pixels))
                    else:
                        self.write_passes(outfile, self.array_scanlines(pixels))
            Severity: Major
            Found in appJar/lib/png.py and 1 other location - About 1 hr to fix
            appJar/lib/png.py on lines 862..865

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 39.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                        ppr = int(math.ceil((self.width-xstart)/float(xstep)))
            Severity: Minor
            Found in appJar/lib/png.py and 1 other location - About 35 mins to fix
            appJar/lib/png.py on lines 1558..1558

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 33.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Identical blocks of code found in 2 locations. Consider refactoring.
            Open

                        ppr = int(math.ceil((self.width-xstart)/float(xstep)))
            Severity: Minor
            Found in appJar/lib/png.py and 1 other location - About 35 mins to fix
            appJar/lib/png.py on lines 924..924

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 33.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 3 locations. Consider refactoring.
            Open

                    if meta['alpha'] and meta['greyscale']:
                        # LA to RGBA
                        def convert():
                            for row in pixels:
                                # Create a fresh target row, then copy L channel
            Severity: Minor
            Found in appJar/lib/png.py and 2 other locations - About 30 mins to fix
            appJar/lib/png.py on lines 2195..2201
            appJar/lib/png.py on lines 2205..2209

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 32.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 3 locations. Consider refactoring.
            Open

                        def convert():
                            for row in pixels:
                                a = newarray()
                                pngfilters.convert_rgb_to_rgba(row, a)
                                yield a
            Severity: Minor
            Found in appJar/lib/png.py and 2 other locations - About 30 mins to fix
            appJar/lib/png.py on lines 2185..2194
            appJar/lib/png.py on lines 2195..2201

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 32.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Similar blocks of code found in 3 locations. Consider refactoring.
            Open

                    elif meta['greyscale']:
                        # L to RGBA
                        def convert():
                            for row in pixels:
                                a = newarray()
            Severity: Minor
            Found in appJar/lib/png.py and 2 other locations - About 30 mins to fix
            appJar/lib/png.py on lines 2185..2194
            appJar/lib/png.py on lines 2205..2209

            Duplicated Code

            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

            Tuning

            This issue has a mass of 32.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

            Missing whitespace after ','
            Open

                    if len(t) not in (3,4):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    return p,None
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Expected 2 blank lines, found 1
            Open

            class Reader:
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Expected 2 blank lines, found 1
            Open

            def tostring(row):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Unexpected spaces around keyword / parameter equals
            Open

                             x_pixels_per_unit = None,
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Don't use spaces around the '=' sign in function arguments.

            Don't use spaces around the '=' sign when used to indicate a
            keyword argument or a default parameter value, except when
            using a type annotation.
            
            Okay: def complex(real, imag=0.0):
            Okay: return magic(r=real, i=imag)
            Okay: boolean(a == b)
            Okay: boolean(a != b)
            Okay: boolean(a <= b)
            Okay: boolean(a >= b)
            Okay: def foo(arg: int = 42):
            Okay: async def foo(arg: int = 42):
            
            E251: def complex(real, imag = 0.0):
            E251: return magic(r = real, i = imag)
            E252: def complex(real, image: float=0.0):

            Missing whitespace after ','
            Open

                            if bitdepth not in (1,2,4,8,16):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    for i,x in enumerate(line):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Ambiguous variable name 'l'
            Open

                        l -= spb
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Never use the characters 'l', 'O', or 'I' as variable names.

            In some fonts, these characters are indistinguishable from the
            numerals one and zero. When tempted to use 'l', use 'L' instead.
            
            Okay: L = 0
            Okay: o = 123
            Okay: i = 42
            E741: l = 0
            E741: O = 123
            E741: I = 42
            
            Variables can be bound in several other contexts, including class
            and function definitions, 'global' and 'nonlocal' statements,
            exception handlers, and 'with' and 'for' statements.
            In addition, we have a special handling for function parameters.
            
            Okay: except AttributeError as o:
            Okay: with lock as L:
            Okay: foo(l=12)
            Okay: for a in foo(l=12):
            E741: except AttributeError as O:
            E741: with lock as l:
            E741: global I
            E741: nonlocal l
            E741: def foo(l):
            E741: def foo(l=12):
            E741: l = foo(l=12)
            E741: for l in range(10):
            E742: class I(object):
            E743: def l(x):

            Expected 2 blank lines, found 1
            Open

            def group(s, n):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Expected 2 blank lines, found 1
            Open

            def isarray(x):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Expected 2 blank lines, found 1
            Open

            class ChunkError(FormatError):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                a,t = itertools.tee(a)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Continuation line under-indented for visual indent
            Open

                                (sbit,self.bitdepth))
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Continuation line unaligned for hanging indent
            Open

                        % (size[0], width))
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Missing whitespace after ','
            Open

                for i,t in enumerate(p):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Expected 2 blank lines, found 1
            Open

            class FormatError(Error):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Expected 2 blank lines, found 1
            Open

            def check_color(c, greyscale, which):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Unexpected spaces around keyword / parameter equals
            Open

                             unit_is_meter = False):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Don't use spaces around the '=' sign in function arguments.

            Don't use spaces around the '=' sign when used to indicate a
            keyword argument or a default parameter value, except when
            using a type annotation.
            
            Okay: def complex(real, imag=0.0):
            Okay: return magic(r=real, i=imag)
            Okay: boolean(a == b)
            Okay: boolean(a != b)
            Okay: boolean(a <= b)
            Okay: boolean(a >= b)
            Okay: def foo(arg: int = 42):
            Okay: async def foo(arg: int = 42):
            
            E251: def complex(real, imag = 0.0):
            E251: return magic(r = real, i = imag)
            E252: def complex(real, image: float=0.0):

            Missing whitespace after ','
            Open

                    length,type = struct.unpack('!I4s', x)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Continuation line under-indented for visual indent
            Open

                          bitdepth)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Missing whitespace after ','
            Open

                                    assert bitdepth in (5,6,7)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Ambiguous variable name 'l'
            Open

                            l = group(a, spb)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Never use the characters 'l', 'O', or 'I' as variable names.

            In some fonts, these characters are indistinguishable from the
            numerals one and zero. When tempted to use 'l', use 'L' instead.
            
            Okay: L = 0
            Okay: o = 123
            Okay: i = 42
            E741: l = 0
            E741: O = 123
            E741: I = 42
            
            Variables can be bound in several other contexts, including class
            and function definitions, 'global' and 'nonlocal' statements,
            exception handlers, and 'with' and 'for' statements.
            In addition, we have a special handling for function parameters.
            
            Okay: except AttributeError as o:
            Okay: with lock as L:
            Okay: foo(l=12)
            Okay: for a in foo(l=12):
            E741: except AttributeError as O:
            E741: with lock as l:
            E741: global I
            E741: nonlocal l
            E741: def foo(l):
            E741: def foo(l=12):
            E741: l = foo(l=12)
            E741: for l in range(10):
            E742: class I(object):
            E743: def l(x):

            Expected 2 blank lines, found 1
            Open

            class Image:
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Expected 2 blank lines, found 1
            Open

            def check_sizes(size, width, height):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                    assert self.color_type in (0,2,3,4,6)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Expected 1 blank line before a nested definition, found 0
            Open

                def average():
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            At least two spaces before inline comment
            Open

                    elif type == 4: # "paeth"
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate inline comments by at least two spaces.

            An inline comment is a comment on the same line as a statement.
            Inline comments should be separated by at least two spaces from the
            statement. They should start with a # and a single space.
            
            Each line of a block comment starts with a # and a single space
            (unless it is indented text inside the comment).
            
            Okay: x = x + 1  # Increment x
            Okay: x = x + 1    # Increment x
            Okay: # Block comment
            E261: x = x + 1 # Increment x
            E262: x = x + 1  #Increment x
            E262: x = x + 1  #  Increment x
            E265: #Block comment
            E266: ### Block comment

            Expected 2 blank lines, found 1
            Open

            def from_array(a, mode=None, info={}):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Expected 2 blank lines, found 1
            Open

            class _readable:
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                        if bitdepth not in (1,2,4,8):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                            if bitdepth not in (1,2,4,8,16):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    if filter_type not in (1,2,3,4):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Continuation line under-indented for visual indent
            Open

                            which)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Continuation line under-indented for visual indent
            Open

                            struct.pack('%dB' % self.planes,
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Continuation line over-indented for visual indent
            Open

                          float(2**self.rescale[1]-1) / float(2**self.rescale[0]-1)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Do not use bare 'except'
            Open

                    except:
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            When catching exceptions, mention specific exceptions when possible.

            Okay: except Exception:
            Okay: except BaseException:
            E722: except:

            At least two spaces before inline comment
            Open

                    ai = -fo # also used for ci
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate inline comments by at least two spaces.

            An inline comment is a comment on the same line as a statement.
            Inline comments should be separated by at least two spaces from the
            statement. They should start with a # and a single space.
            
            Each line of a block comment starts with a # and a single space
            (unless it is indented text inside the comment).
            
            Okay: x = x + 1  # Increment x
            Okay: x = x + 1    # Increment x
            Okay: # Block comment
            E261: x = x + 1 # Increment x
            E262: x = x + 1  #Increment x
            E262: x = x + 1  #  Increment x
            E265: #Block comment
            E266: ### Block comment

            Missing whitespace after ','
            Open

                    for dimension,axis in [('width', 0), ('height', 1)]:
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Continuation line under-indented for visual indent
            Open

                          '  See http://www.w3.org/TR/2003/REC-PNG-20031110/#9Filters .')
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Missing whitespace after ','
            Open

                            if bitdepth not in (1,2,4,8,16):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                                    assert bitdepth in (5,6,7)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    assert self.color_type in (0,2,3,4,6)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace around bitwise or shift operator
            Open

                            out.extend([mask&(o>>i) for i in shifts])
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Surround operators with a single space on either side.

            - Always surround these binary operators with a single space on
              either side: assignment (=), augmented assignment (+=, -= etc.),
              comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),
              Booleans (and, or, not).
            
            - If operators with different priorities are used, consider adding
              whitespace around the operators with the lowest priorities.
            
            Okay: i = i + 1
            Okay: submitted += 1
            Okay: x = x * 2 - 1
            Okay: hypot2 = x * x + y * y
            Okay: c = (a + b) * (a - b)
            Okay: foo(bar, key='word', *args, **kwargs)
            Okay: alpha[:-i]
            
            E225: i=i+1
            E225: submitted +=1
            E225: x = x /2 - 1
            E225: z = x **y
            E225: z = 1and 1
            E226: c = (a+b) * (a-b)
            E226: hypot2 = x*x + y*y
            E227: c = a|b
            E228: msg = fmt%(errno, errmsg)

            Missing whitespace after ','
            Open

                    assert self.color_type in (0,2,3,4,6)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    self.color_planes = (3,1)[self.greyscale or self.colormap]
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Continuation line over-indented for visual indent
            Open

                                                       (x << self.bitdepth) + y, e) for e in l]
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Continuation line under-indented for visual indent
            Open

                          self.rescale[0])
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Expected 1 blank line before a nested definition, found 0
            Open

                def up():
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                    return x,y,pixels,meta
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Expected 2 blank lines, found 1
            Open

            def check_palette(palette):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Expected 1 blank line before a nested definition, found 0
            Open

                        def extend(sl):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Expected 2 blank lines, found 1
            Open

            def write_chunk(outfile, tag, data=b''):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Expected 2 blank lines, found 1
            Open

            def write_chunks(out, chunks):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Expected 2 blank lines after class or function definition, found 1
            Open

            try:
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Expected 2 blank lines, found 1
            Open

            def interleave_planes(ipixels, apixels, ipsize, apsize):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                        if bitdepth not in (1,2,4,8):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Unexpected spaces around keyword / parameter equals
            Open

                             y_pixels_per_unit = None,
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Don't use spaces around the '=' sign in function arguments.

            Don't use spaces around the '=' sign when used to indicate a
            keyword argument or a default parameter value, except when
            using a type annotation.
            
            Okay: def complex(real, imag=0.0):
            Okay: return magic(r=real, i=imag)
            Okay: boolean(a == b)
            Okay: boolean(a != b)
            Okay: boolean(a <= b)
            Okay: boolean(a >= b)
            Okay: def foo(arg: int = 42):
            Okay: async def foo(arg: int = 42):
            
            E251: def complex(real, imag = 0.0):
            E251: return magic(r = real, i = imag)
            E252: def complex(real, image: float=0.0):

            Missing whitespace after ','
            Open

                                targetbitdepth = (8,16)[bitdepth > 8]
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                            if bitdepth not in (8,16):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                        p,t = self.make_palette()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Continuation line under-indented for visual indent
            Open

                          (bitdepth, info['bitdepth']))
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Missing whitespace after ','
            Open

                            l = [reduce(lambda x,y:
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Expected 1 blank line before a nested definition, found 0
            Open

                        def extend(sl):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Expected 1 blank line before a nested definition, found 0
            Open

                        def line():
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Expected 2 blank lines, found 1
            Open

            def filter_scanline(type, line, fo, prev=None):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                        yield t,v
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Expected 1 blank line before a nested definition, found 0
            Open

                def paeth():
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            At least two spaces before inline comment
            Open

                else: # type == 4
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate inline comments by at least two spaces.

            An inline comment is a comment on the same line as a statement.
            Inline comments should be separated by at least two spaces from the
            statement. They should start with a # and a single space.
            
            Each line of a block comment starts with a # and a single space
            (unless it is indented text inside the comment).
            
            Okay: x = x + 1  # Increment x
            Okay: x = x + 1    # Increment x
            Okay: # Block comment
            E261: x = x + 1 # Increment x
            E262: x = x + 1  #Increment x
            E262: x = x + 1  #  Increment x
            E265: #Block comment
            E266: ### Block comment

            Continuation line under-indented for visual indent
            Open

                              % (type, length))
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Expected 2 blank lines, found 1
            Open

            class Error(Exception):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Unexpected spaces around keyword / parameter equals
            Open

                             unit_is_meter = False):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Don't use spaces around the '=' sign in function arguments.

            Don't use spaces around the '=' sign when used to indicate a
            keyword argument or a default parameter value, except when
            using a type annotation.
            
            Okay: def complex(real, imag=0.0):
            Okay: return magic(r=real, i=imag)
            Okay: boolean(a == b)
            Okay: boolean(a != b)
            Okay: boolean(a <= b)
            Okay: boolean(a >= b)
            Okay: def foo(arg: int = 42):
            Okay: async def foo(arg: int = 42):
            
            E251: def complex(real, imag = 0.0):
            E251: return magic(r = real, i = imag)
            E252: def complex(real, image: float=0.0):

            Continuation line unaligned for hanging indent
            Open

                        % (size[1], height))
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Unexpected spaces around keyword / parameter equals
            Open

                             y_pixels_per_unit = None,
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Don't use spaces around the '=' sign in function arguments.

            Don't use spaces around the '=' sign when used to indicate a
            keyword argument or a default parameter value, except when
            using a type annotation.
            
            Okay: def complex(real, imag=0.0):
            Okay: return magic(r=real, i=imag)
            Okay: boolean(a == b)
            Okay: boolean(a != b)
            Okay: boolean(a <= b)
            Okay: boolean(a >= b)
            Okay: def foo(arg: int = 42):
            Okay: async def foo(arg: int = 42):
            
            E251: def complex(real, imag = 0.0):
            E251: return magic(r = real, i = imag)
            E252: def complex(real, image: float=0.0):

            At least two spaces before inline comment
            Open

                             bytes_per_sample=None, # deprecated
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate inline comments by at least two spaces.

            An inline comment is a comment on the same line as a statement.
            Inline comments should be separated by at least two spaces from the
            statement. They should start with a # and a single space.
            
            Each line of a block comment starts with a # and a single space
            (unless it is indented text inside the comment).
            
            Okay: x = x + 1  # Increment x
            Okay: x = x + 1    # Increment x
            Okay: # Block comment
            E261: x = x + 1 # Increment x
            E262: x = x + 1  #Increment x
            E262: x = x + 1  #  Increment x
            E265: #Block comment
            E266: ### Block comment

            Missing whitespace after ','
            Open

                    assert self.color_type in (0,2,3,4,6)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                        return p,t
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                            if bitdepth not in (1,2,4,8,16):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                        write_chunk(outfile, b'pHYs', struct.pack("!LLB",*tup))
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    i,row = next(enumrows)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    for i,row in enumrows:
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Ambiguous variable name 'l'
            Open

                            l = [reduce(lambda x,y:
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Never use the characters 'l', 'O', or 'I' as variable names.

            In some fonts, these characters are indistinguishable from the
            numerals one and zero. When tempted to use 'l', use 'L' instead.
            
            Okay: L = 0
            Okay: o = 123
            Okay: i = 42
            E741: l = 0
            E741: O = 123
            E741: I = 42
            
            Variables can be bound in several other contexts, including class
            and function definitions, 'global' and 'nonlocal' statements,
            exception handlers, and 'with' and 'for' statements.
            In addition, we have a special handling for function parameters.
            
            Okay: except AttributeError as o:
            Okay: with lock as L:
            Okay: foo(l=12)
            Okay: for a in foo(l=12):
            E741: except AttributeError as O:
            E741: with lock as l:
            E741: global I
            E741: nonlocal l
            E741: def foo(l):
            E741: def foo(l=12):
            E741: l = foo(l=12)
            E741: for l in range(10):
            E742: class I(object):
            E743: def l(x):

            Missing whitespace after ','
            Open

                    for i,x in enumerate(line):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    for i,x in enumerate(line):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    info['width'],info['height'] = info['size']
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Too many blank lines (2)
            Open

                def chunk(self, seek=None, lenient=False):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Continuation line under-indented for visual indent
            Open

                          % self.interlace)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Unexpected spaces around keyword / parameter equals
            Open

                             x_pixels_per_unit = None,
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Don't use spaces around the '=' sign in function arguments.

            Don't use spaces around the '=' sign when used to indicate a
            keyword argument or a default parameter value, except when
            using a type annotation.
            
            Okay: def complex(real, imag=0.0):
            Okay: return magic(r=real, i=imag)
            Okay: boolean(a == b)
            Okay: boolean(a != b)
            Okay: boolean(a <= b)
            Okay: boolean(a >= b)
            Okay: def foo(arg: int = 42):
            Okay: async def foo(arg: int = 42):
            
            E251: def complex(real, imag = 0.0):
            E251: return magic(r = real, i = imag)
            E252: def complex(real, image: float=0.0):

            Missing whitespace after ','
            Open

                        if bitdepth not in (1,2,4,8):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Ambiguous variable name 'l'
            Open

                            l = float(len(a))
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Never use the characters 'l', 'O', or 'I' as variable names.

            In some fonts, these characters are indistinguishable from the
            numerals one and zero. When tempted to use 'l', use 'L' instead.
            
            Okay: L = 0
            Okay: o = 123
            Okay: i = 42
            E741: l = 0
            E741: O = 123
            E741: I = 42
            
            Variables can be bound in several other contexts, including class
            and function definitions, 'global' and 'nonlocal' statements,
            exception handlers, and 'with' and 'for' statements.
            In addition, we have a special handling for function parameters.
            
            Okay: except AttributeError as o:
            Okay: with lock as L:
            Okay: foo(l=12)
            Okay: for a in foo(l=12):
            E741: except AttributeError as O:
            E741: with lock as l:
            E741: global I
            E741: nonlocal l
            E741: def foo(l):
            E741: def foo(l=12):
            E741: l = foo(l=12)
            E741: for l in range(10):
            E742: class I(object):
            E743: def l(x):

            At least two spaces before inline comment
            Open

                    if type == 2: # "up"
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate inline comments by at least two spaces.

            An inline comment is a comment on the same line as a statement.
            Inline comments should be separated by at least two spaces from the
            statement. They should start with a # and a single space.
            
            Each line of a block comment starts with a # and a single space
            (unless it is indented text inside the comment).
            
            Okay: x = x + 1  # Increment x
            Okay: x = x + 1    # Increment x
            Okay: # Block comment
            E261: x = x + 1 # Increment x
            E262: x = x + 1  #Increment x
            E262: x = x + 1  #  Increment x
            E265: #Block comment
            E266: ### Block comment

            Expected 2 blank lines after class or function definition, found 1
            Open

            fromarray = from_array
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Continuation line under-indented for visual indent
            Open

                          " see http://www.w3.org/TR/2003/REC-PNG-20031110/#8InterlaceMethods ."
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Too many blank lines (2)
            Open

                def read_flat(self):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                    width,height,pixels,meta = get()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                if bitdepth not in (1,2,4,8,16):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                if bitdepth not in (1,2,4,8,16):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                if colortype not in (0,2,3,4,6):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                assert planes in (1,2,3,4)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    if filter_type not in (1,2,3,4):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    if filter_type not in (1,2,3,4):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                        raise FormatError('Chunk %s is too large: %d.' % (type,length))
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    x,y,pixels,meta = self.read()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                if colortype not in (0,2,3,4,6):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Continuation line under-indented for visual indent
            Open

                                  itertools.chain(*map(operator.add, row, opa)))
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Missing whitespace after ','
            Open

                WIDTH,HEIGHT,DEPTH,MAXVAL = required
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Expected 1 blank line before a nested definition, found 0
            Open

                    def iterfloat():
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                    width,height,pixels,meta = png.asDirect()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                if bitdepth not in (1,2,4,8,16):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    return x,y,pixels,meta
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                if colortype not in (0,2,3,4,6):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                        return width,height,pixels,meta
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Continuation line under-indented for visual indent
            Open

                      " and colour type (%d)."
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Expected 1 blank line before a nested definition, found 0
            Open

                    def iterrgb():
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Expected 2 blank lines, found 1
            Open

            def _main(argv):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                        return width,height,pixels,meta
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                        t,v = self.chunk()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Expected 1 blank line before a nested definition, found 0
            Open

                    def newarray():
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                    return width,height,convert(),meta
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Continuation line under-indented for visual indent
            Open

                            for i in reversed(list(range(spb)))]
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Missing whitespace after ','
            Open

                    return width,height,convert(),meta
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    if self.interlace not in (0,1):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                if bitdepth < 8 and colortype not in (0,3):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    x,y,pixels,meta = self.read()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                assert planes in (1,2,3,4)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    width,height,pixels,meta = self.asDirect()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Continuation line over-indented for visual indent
            Open

                          read_pnm_header(pgmfile, 'P5')
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Missing whitespace around bitwise or shift operator
            Open

                        out.extend([(mask&(o>>s)) for s in shifts][:l])
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Surround operators with a single space on either side.

            - Always surround these binary operators with a single space on
              either side: assignment (=), augmented assignment (+=, -= etc.),
              comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),
              Booleans (and, or, not).
            
            - If operators with different priorities are used, consider adding
              whitespace around the operators with the lowest priorities.
            
            Okay: i = i + 1
            Okay: submitted += 1
            Okay: x = x * 2 - 1
            Okay: hypot2 = x * x + y * y
            Okay: c = (a + b) * (a - b)
            Okay: foo(bar, key='word', *args, **kwargs)
            Okay: alpha[:-i]
            
            E225: i=i+1
            E225: submitted +=1
            E225: x = x /2 - 1
            E225: z = x **y
            E225: z = 1and 1
            E226: c = (a+b) * (a-b)
            E226: hypot2 = x*x + y*y
            E227: c = a|b
            E228: msg = fmt%(errno, errmsg)

            Missing whitespace after ','
            Open

                    return x,y,iterfloat(),info
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Expected 1 blank line before a nested definition, found 0
            Open

                        def convert():
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                WIDTH,HEIGHT,DEPTH,MAXVAL = required
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Ambiguous variable name 'l'
            Open

                            l = width
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Never use the characters 'l', 'O', or 'I' as variable names.

            In some fonts, these characters are indistinguishable from the
            numerals one and zero. When tempted to use 'l', use 'L' instead.
            
            Okay: L = 0
            Okay: o = 123
            Okay: i = 42
            E741: l = 0
            E741: O = 123
            E741: I = 42
            
            Variables can be bound in several other contexts, including class
            and function definitions, 'global' and 'nonlocal' statements,
            exception handlers, and 'with' and 'for' statements.
            In addition, we have a special handling for function parameters.
            
            Okay: except AttributeError as o:
            Okay: with lock as L:
            Okay: foo(l=12)
            Okay: for a in foo(l=12):
            E741: except AttributeError as O:
            E741: with lock as l:
            E741: global I
            E741: nonlocal l
            E741: def foo(l):
            E741: def foo(l=12):
            E741: l = foo(l=12)
            E741: for l in range(10):
            E742: class I(object):
            E743: def l(x):

            Continuation line under-indented for visual indent
            Open

                                   *[iter(self.deinterlace(raw))]*self.width*self.planes)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Missing whitespace after ','
            Open

                                (sbit,self.bitdepth))
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    x,y,pixels,info = self.asDirect()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    return x,y,iterfloat(),info
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Ambiguous variable name 'l'
            Open

                    l = infile.readline().strip()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Never use the characters 'l', 'O', or 'I' as variable names.

            In some fonts, these characters are indistinguishable from the
            numerals one and zero. When tempted to use 'l', use 'L' instead.
            
            Okay: L = 0
            Okay: o = 123
            Okay: i = 42
            E741: l = 0
            E741: O = 123
            E741: I = 42
            
            Variables can be bound in several other contexts, including class
            and function definitions, 'global' and 'nonlocal' statements,
            exception handlers, and 'with' and 'for' statements.
            In addition, we have a special handling for function parameters.
            
            Okay: except AttributeError as o:
            Okay: with lock as L:
            Okay: foo(l=12)
            Okay: for a in foo(l=12):
            E741: except AttributeError as O:
            E741: with lock as l:
            E741: global I
            E741: nonlocal l
            E741: def foo(l):
            E741: def foo(l=12):
            E741: l = foo(l=12)
            E741: for l in range(10):
            E742: class I(object):
            E743: def l(x):

            Missing whitespace after ','
            Open

                WIDTH,HEIGHT,DEPTH,MAXVAL = required
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace around operator
            Open

                        arraycode = 'BH'[self.bitdepth>8]
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Surround operators with a single space on either side.

            - Always surround these binary operators with a single space on
              either side: assignment (=), augmented assignment (+=, -= etc.),
              comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),
              Booleans (and, or, not).
            
            - If operators with different priorities are used, consider adding
              whitespace around the operators with the lowest priorities.
            
            Okay: i = i + 1
            Okay: submitted += 1
            Okay: x = x * 2 - 1
            Okay: hypot2 = x * x + y * y
            Okay: c = (a + b) * (a - b)
            Okay: foo(bar, key='word', *args, **kwargs)
            Okay: alpha[:-i]
            
            E225: i=i+1
            E225: submitted +=1
            E225: x = x /2 - 1
            E225: z = x **y
            E225: z = 1and 1
            E226: c = (a+b) * (a-b)
            E226: hypot2 = x*x + y*y
            E227: c = a|b
            E228: msg = fmt%(errno, errmsg)

            Visually indented line with same indent as next logical line
            Open

                    maxval <= 0):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Missing whitespace after ','
            Open

                    x,y,pixels,info = self.asDirect()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    return x,y,iterfloat(),info
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    width,height,pixels,meta = self.asDirect()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Multiple imports on one line
            Open

                    import msvcrt, os
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Place imports on separate lines.

            Okay: import os\nimport sys
            E401: import sys, os
            
            Okay: from subprocess import Popen, PIPE
            Okay: from myclas import MyClass
            Okay: from foo.bar.yourclass import YourClass
            Okay: import myclass
            Okay: import foo.bar.yourclass

            Ambiguous variable name 'l'
            Open

                        if l <= 0:
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Never use the characters 'l', 'O', or 'I' as variable names.

            In some fonts, these characters are indistinguishable from the
            numerals one and zero. When tempted to use 'l', use 'L' instead.
            
            Okay: L = 0
            Okay: o = 123
            Okay: i = 42
            E741: l = 0
            E741: O = 123
            E741: I = 42
            
            Variables can be bound in several other contexts, including class
            and function definitions, 'global' and 'nonlocal' statements,
            exception handlers, and 'with' and 'for' statements.
            In addition, we have a special handling for function parameters.
            
            Okay: except AttributeError as o:
            Okay: with lock as L:
            Okay: foo(l=12)
            Okay: for a in foo(l=12):
            E741: except AttributeError as O:
            E741: with lock as l:
            E741: global I
            E741: nonlocal l
            E741: def foo(l):
            E741: def foo(l=12):
            E741: l = foo(l=12)
            E741: for l in range(10):
            E742: class I(object):
            E743: def l(x):

            Missing whitespace after ','
            Open

                    return length,type
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Expected 1 blank line before a nested definition, found 0
            Open

                        def itertrns(pixels):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            At least two spaces before inline comment
            Open

                                opa = list(zip(opa)) # convert to 1-tuples
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate inline comments by at least two spaces.

            An inline comment is a comment on the same line as a statement.
            Inline comments should be separated by at least two spaces from the
            statement. They should start with a # and a single space.
            
            Each line of a block comment starts with a # and a single space
            (unless it is indented text inside the comment).
            
            Okay: x = x + 1  # Increment x
            Okay: x = x + 1    # Increment x
            Okay: # Block comment
            E261: x = x + 1 # Increment x
            E262: x = x + 1  #Increment x
            E262: x = x + 1  #  Increment x
            E265: #Block comment
            E266: ### Block comment

            Missing whitespace after ','
            Open

                    width,height,pixels,meta = get()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    width,height,pixels,meta = self.asDirect()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    width,height,pixels,meta = self.asDirect()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    return width,height,iterrgb(),meta
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                        return width,height,pixels,meta
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Ambiguous variable name 'l'
            Open

                    if l == b'ENDHDR':
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Never use the characters 'l', 'O', or 'I' as variable names.

            In some fonts, these characters are indistinguishable from the
            numerals one and zero. When tempted to use 'l', use 'L' instead.
            
            Okay: L = 0
            Okay: o = 123
            Okay: i = 42
            E741: l = 0
            E741: O = 123
            E741: I = 42
            
            Variables can be bound in several other contexts, including class
            and function definitions, 'global' and 'nonlocal' statements,
            exception handlers, and 'with' and 'for' statements.
            In addition, we have a special handling for function parameters.
            
            Okay: except AttributeError as o:
            Okay: with lock as L:
            Okay: foo(l=12)
            Okay: for a in foo(l=12):
            E741: except AttributeError as O:
            E741: with lock as l:
            E741: global I
            E741: nonlocal l
            E741: def foo(l):
            E741: def foo(l=12):
            E741: l = foo(l=12)
            E741: for l in range(10):
            E742: class I(object):
            E743: def l(x):

            Ambiguous variable name 'l'
            Open

                    l = l.split(None, 1)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Never use the characters 'l', 'O', or 'I' as variable names.

            In some fonts, these characters are indistinguishable from the
            numerals one and zero. When tempted to use 'l', use 'L' instead.
            
            Okay: L = 0
            Okay: o = 123
            Okay: i = 42
            E741: l = 0
            E741: O = 123
            E741: I = 42
            
            Variables can be bound in several other contexts, including class
            and function definitions, 'global' and 'nonlocal' statements,
            exception handlers, and 'with' and 'for' statements.
            In addition, we have a special handling for function parameters.
            
            Okay: except AttributeError as o:
            Okay: with lock as L:
            Okay: foo(l=12)
            Okay: for a in foo(l=12):
            E741: except AttributeError as O:
            E741: with lock as l:
            E741: global I
            E741: nonlocal l
            E741: def foo(l):
            E741: def foo(l=12):
            E741: l = foo(l=12)
            E741: for l in range(10):
            E742: class I(object):
            E743: def l(x):

            Expected 2 blank lines, found 1
            Open

            def _add_common_options(parser):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                      read_pnm_header(infile, (b'P5',b'P6',b'P7'))
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Expected 1 blank line before a nested definition, found 0
            Open

                    def iterscale():
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                        return width,height,pixels,meta
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Expected 2 blank lines, found 1
            Open

            def isinteger(x):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                    width,height,pixels,meta = png.asDirect()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Visually indented line with same indent as next logical line
            Open

                        (_guess is None and len(kw) != 1)):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Missing whitespace around bitwise or shift operator
            Open

                            out.extend([mask&(o>>i) for i in shifts])
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Surround operators with a single space on either side.

            - Always surround these binary operators with a single space on
              either side: assignment (=), augmented assignment (+=, -= etc.),
              comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),
              Booleans (and, or, not).
            
            - If operators with different priorities are used, consider adding
              whitespace around the operators with the lowest priorities.
            
            Okay: i = i + 1
            Okay: submitted += 1
            Okay: x = x * 2 - 1
            Okay: hypot2 = x * x + y * y
            Okay: c = (a + b) * (a - b)
            Okay: foo(bar, key='word', *args, **kwargs)
            Okay: alpha[:-i]
            
            E225: i=i+1
            E225: submitted +=1
            E225: x = x /2 - 1
            E225: z = x **y
            E225: z = 1and 1
            E226: c = (a+b) * (a-b)
            E226: hypot2 = x*x + y*y
            E227: c = a|b
            E228: msg = fmt%(errno, errmsg)

            Missing whitespace around bitwise or shift operator
            Open

                        out.extend([(mask&(o>>s)) for s in shifts][:l])
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Surround operators with a single space on either side.

            - Always surround these binary operators with a single space on
              either side: assignment (=), augmented assignment (+=, -= etc.),
              comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),
              Booleans (and, or, not).
            
            - If operators with different priorities are used, consider adding
              whitespace around the operators with the lowest priorities.
            
            Okay: i = i + 1
            Okay: submitted += 1
            Okay: x = x * 2 - 1
            Okay: hypot2 = x * x + y * y
            Okay: c = (a + b) * (a - b)
            Okay: foo(bar, key='word', *args, **kwargs)
            Okay: alpha[:-i]
            
            E225: i=i+1
            E225: submitted +=1
            E225: x = x /2 - 1
            E225: z = x **y
            E225: z = 1and 1
            E226: c = (a+b) * (a-b)
            E226: hypot2 = x*x + y*y
            E227: c = a|b
            E228: msg = fmt%(errno, errmsg)

            Continuation line under-indented for visual indent
            Open

                          % self.filter)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Expected 1 blank line before a nested definition, found 0
            Open

                        def iterpal(pixels):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                    width,height,pixels,meta = get()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                if colortype not in (0,2,3,4,6):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Continuation line under-indented for visual indent
            Open

                      " See http://www.w3.org/TR/2003/REC-PNG-20031110/#table111 ."
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Expected 2 blank lines, found 1
            Open

            def write_pnm(file, width, height, pixels, meta):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                      read_pnm_header(infile, (b'P5',b'P6',b'P7'))
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Continuation line under-indented for visual indent
            Open

                              data)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Missing whitespace after ','
            Open

                    width,height,pixels,meta = self.asDirect()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    return width,height,convert(),meta
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                assert planes in (1,2,3,4)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Ambiguous variable name 'l'
            Open

                    l = width
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Never use the characters 'l', 'O', or 'I' as variable names.

            In some fonts, these characters are indistinguishable from the
            numerals one and zero. When tempted to use 'l', use 'L' instead.
            
            Okay: L = 0
            Okay: o = 123
            Okay: i = 42
            E741: l = 0
            E741: O = 123
            E741: I = 42
            
            Variables can be bound in several other contexts, including class
            and function definitions, 'global' and 'nonlocal' statements,
            exception handlers, and 'with' and 'for' statements.
            In addition, we have a special handling for function parameters.
            
            Okay: except AttributeError as o:
            Okay: with lock as L:
            Okay: foo(l=12)
            Okay: for a in foo(l=12):
            E741: except AttributeError as O:
            E741: with lock as l:
            E741: global I
            E741: nonlocal l
            E741: def foo(l):
            E741: def foo(l=12):
            E741: l = foo(l=12)
            E741: for l in range(10):
            E742: class I(object):
            E743: def l(x):

            Missing whitespace around operator
            Open

                    arraycode = 'BH'[meta['bitdepth']>8]
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Surround operators with a single space on either side.

            - Always surround these binary operators with a single space on
              either side: assignment (=), augmented assignment (+=, -= etc.),
              comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),
              Booleans (and, or, not).
            
            - If operators with different priorities are used, consider adding
              whitespace around the operators with the lowest priorities.
            
            Okay: i = i + 1
            Okay: submitted += 1
            Okay: x = x * 2 - 1
            Okay: hypot2 = x * x + y * y
            Okay: c = (a + b) * (a - b)
            Okay: foo(bar, key='word', *args, **kwargs)
            Okay: alpha[:-i]
            
            E225: i=i+1
            E225: submitted +=1
            E225: x = x /2 - 1
            E225: z = x **y
            E225: z = 1and 1
            E226: c = (a+b) * (a-b)
            E226: hypot2 = x*x + y*y
            E227: c = a|b
            E228: msg = fmt%(errno, errmsg)

            Missing whitespace after ','
            Open

                    x,y,pixels,meta = self.read()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Expected 1 blank line before a nested definition, found 0
            Open

                        def itershift(pixels):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                if bitdepth not in (1,2,4,8,16):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Continuation line under-indented for visual indent
            Open

                      % (bitdepth, colortype))
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Expected 2 blank lines, found 1
            Open

            def read_pnm_header(infile, supported=(b'P5', b'P6')):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                    width,height,pixels,meta = png.asDirect()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Continuation line under-indented for visual indent
            Open

                          struct.unpack('!%dH' % (len(bytes)//2), bytes))
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Missing whitespace after ','
            Open

                    self.x_pixels_per_unit, self.y_pixels_per_unit, unit = struct.unpack(fmt,data)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace around operator
            Open

                        typecode = 'BH'[meta['bitdepth']>8]
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Surround operators with a single space on either side.

            - Always surround these binary operators with a single space on
              either side: assignment (=), augmented assignment (+=, -= etc.),
              comparisons (==, <, >, !=, <=, >=, in, not in, is, is not),
              Booleans (and, or, not).
            
            - If operators with different priorities are used, consider adding
              whitespace around the operators with the lowest priorities.
            
            Okay: i = i + 1
            Okay: submitted += 1
            Okay: x = x * 2 - 1
            Okay: hypot2 = x * x + y * y
            Okay: c = (a + b) * (a - b)
            Okay: foo(bar, key='word', *args, **kwargs)
            Okay: alpha[:-i]
            
            E225: i=i+1
            E225: submitted +=1
            E225: x = x /2 - 1
            E225: z = x **y
            E225: z = 1and 1
            E226: c = (a+b) * (a-b)
            E226: hypot2 = x*x + y*y
            E227: c = a|b
            E228: msg = fmt%(errno, errmsg)

            Missing whitespace after ','
            Open

                        return width,height,pixels,meta
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                        return width,height,pixels,meta
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    width,height,pixels,meta = self.asDirect()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Visually indented line with same indent as next logical line
            Open

                        not self.colormap and len(data) != self.planes):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Missing whitespace after ','
            Open

                    return x,y,pixels,meta
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    x,y,pixels,info = self.asDirect()
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    return width,height,iterrgb(),meta
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    return width,height,iterrgb(),meta
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Expected 2 blank lines, found 1
            Open

            def color_triple(color):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                    pamalpha = depth in (2,4)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                    supported = [2**x-1 for x in range(1,17)]
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Continuation line under-indented for visual indent
            Open

                          " see http://www.w3.org/TR/2003/REC-PNG-20031110/#9Filters ."
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Continuation lines indentation.

            Continuation lines should align wrapped elements either vertically
            using Python's implicit line joining inside parentheses, brackets
            and braces, or using a hanging indent.
            
            When using a hanging indent these considerations should be applied:
            - there should be no arguments on the first line, and
            - further indentation should be used to clearly distinguish itself
              as a continuation line.
            
            Okay: a = (\n)
            E123: a = (\n    )
            
            Okay: a = (\n    42)
            E121: a = (\n   42)
            E122: a = (\n42)
            E123: a = (\n    42\n    )
            E124: a = (24,\n     42\n)
            E125: if (\n    b):\n    pass
            E126: a = (\n        42)
            E127: a = (24,\n      42)
            E128: a = (24,\n    42)
            E129: if (a or\n    b):\n    pass
            E131: a = (\n    42\n 24)

            Multiple spaces after operator
            Open

                    colormap =  bool(self.color_type & 1)
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Avoid extraneous whitespace around an operator.

            Okay: a = 12 + 3
            E221: a = 4  + 5
            E222: a = 4 +  5
            E223: a = 4\t+ 5
            E224: a = 4 +\t5

            Missing whitespace after ','
            Open

                    color_planes = (3,1)[greyscale or colormap]
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Expected 2 blank lines, found 1
            Open

            def check_bitdepth_colortype(bitdepth, colortype):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Separate top-level function and class definitions with two blank lines.

            Method definitions inside a class are separated by a single blank
            line.
            
            Extra blank lines may be used (sparingly) to separate groups of
            related functions.  Blank lines may be omitted between a bunch of
            related one-liners (e.g. a set of dummy implementations).
            
            Use blank lines in functions, sparingly, to indicate logical
            sections.
            
            Okay: def a():\n    pass\n\n\ndef b():\n    pass
            Okay: def a():\n    pass\n\n\nasync def b():\n    pass
            Okay: def a():\n    pass\n\n\n# Foo\n# Bar\n\ndef b():\n    pass
            Okay: default = 1\nfoo = 1
            Okay: classify = 1\nfoo = 1
            
            E301: class Foo:\n    b = 0\n    def bar():\n        pass
            E302: def a():\n    pass\n\ndef b(n):\n    pass
            E302: def a():\n    pass\n\nasync def b(n):\n    pass
            E303: def a():\n    pass\n\n\n\ndef b(n):\n    pass
            E303: def a():\n\n\n\n    pass
            E304: @decorator\n\ndef a():\n    pass
            E305: def a():\n    pass\na()
            E306: def a():\n    def b():\n        pass\n    def c():\n        pass

            Missing whitespace after ','
            Open

                depth = (1,3)[type == b'P6']
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                if planes in (1,3):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            Missing whitespace after ','
            Open

                if planes in (2,4):
            Severity: Minor
            Found in appJar/lib/png.py by pep8

            Each comma, semicolon or colon should be followed by whitespace.

            Okay: [a, b]
            Okay: (3,)
            Okay: a[1:4]
            Okay: a[:4]
            Okay: a[1:]
            Okay: a[1:4:2]
            E231: ['a','b']
            E231: foo(bar,baz)
            E231: [{'a':'b'}]

            There are no issues that match your filters.

            Category
            Status