tlsfuzzer/tlslite-ng

View on GitHub
tlslite/tlsrecordlayer.py

Summary

Maintainability
F
2 wks
Test Coverage
C
76%

Function _getMsg has a Cognitive Complexity of 182 (exceeds 5 allowed). Consider refactoring.
Open

    def _getMsg(self, expectedType, secondaryType=None, constructorType=None):
        try:
            if not isinstance(expectedType, tuple):
                expectedType = (expectedType,)

Severity: Minor
Found in tlslite/tlsrecordlayer.py - About 3 days 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

File tlsrecordlayer.py has 1163 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# Authors:
#   Trevor Perrin
#   Google (adapted by Sam Rushing) - NPN support
#   Google - minimal padding
#   Martin von Loewis - python 3 port
Severity: Major
Found in tlslite/tlsrecordlayer.py - About 2 days to fix

    Cyclomatic complexity is too high in method _getMsg. (81)
    Open

        def _getMsg(self, expectedType, secondaryType=None, constructorType=None):
            try:
                if not isinstance(expectedType, tuple):
                    expectedType = (expectedType,)
    
    
    Severity: Minor
    Found in tlslite/tlsrecordlayer.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 readAsync has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
    Open

        def readAsync(self, max=None, min=1):
            """Start a read operation on the TLS connection.
    
            This function returns a generator which behaves similarly to
            read().  Successive invocations of the generator will return 0
    Severity: Minor
    Found in tlslite/tlsrecordlayer.py - About 1 day 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

    TLSRecordLayer has 59 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class TLSRecordLayer(object):
        """
        This class handles data transmission for a TLS connection.
    
        Its only subclass is :py:class:`~tlslite.tlsconnection.TLSConnection`.
    Severity: Major
    Found in tlslite/tlsrecordlayer.py - About 1 day to fix

      Function _handle_srv_pha has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
      Open

          def _handle_srv_pha(self, cert):
              """Process the post-handshake authentication from client."""
              prf_name = 'sha256'
              prf_size = 32
              if self.session.cipherSuite in CipherSuite.sha384PrfSuites:
      Severity: Minor
      Found in tlslite/tlsrecordlayer.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 readAsync. (33)
      Open

          def readAsync(self, max=None, min=1):
              """Start a read operation on the TLS connection.
      
              This function returns a generator which behaves similarly to
              read().  Successive invocations of the generator will return 0
      Severity: Minor
      Found in tlslite/tlsrecordlayer.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 _decrefAsync has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
      Open

          def _decrefAsync(self):
              self._refCount -= 1
              if self._refCount == 0 and not self.closed:
                  try:
                      for result in self._sendMsg(Alert().create(\
      Severity: Minor
      Found in tlslite/tlsrecordlayer.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 _handle_srv_pha. (25)
      Open

          def _handle_srv_pha(self, cert):
              """Process the post-handshake authentication from client."""
              prf_name = 'sha256'
              prf_size = 32
              if self.session.cipherSuite in CipherSuite.sha384PrfSuites:
      Severity: Minor
      Found in tlslite/tlsrecordlayer.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 _getNextRecordFromSocket has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring.
      Open

          def _getNextRecordFromSocket(self):
              """Read a record, handle errors"""
      
              try:
                  # otherwise... read the next record
      Severity: Minor
      Found in tlslite/tlsrecordlayer.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

      Function _handle_pha has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
      Open

          def _handle_pha(self, cert_request):
              cert, p_key = self._client_keypair
      
              handshake_context = self._first_handshake_hashes.copy()
              handshake_context.update(cert_request.write())
      Severity: Minor
      Found in tlslite/tlsrecordlayer.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

      Function _getNextRecord has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
      Open

          def _getNextRecord(self):
              """read next message from socket, defragment message"""
      
              while True:
                  # support for fragmentation
      Severity: Minor
      Found in tlslite/tlsrecordlayer.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 method _getNextRecordFromSocket. (18)
      Open

          def _getNextRecordFromSocket(self):
              """Read a record, handle errors"""
      
              try:
                  # otherwise... read the next record
      Severity: Minor
      Found in tlslite/tlsrecordlayer.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 _handle_pha. (16)
      Open

          def _handle_pha(self, cert_request):
              cert, p_key = self._client_keypair
      
              handshake_context = self._first_handshake_hashes.copy()
              handshake_context.update(cert_request.write())
      Severity: Minor
      Found in tlslite/tlsrecordlayer.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 _sendMsgThroughSocket has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
      Open

          def _sendMsgThroughSocket(self, msg):
              """Send message, handle errors"""
      
              try:
                  for result in self._recordLayer.sendRecord(msg):
      Severity: Minor
      Found in tlslite/tlsrecordlayer.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 _decrefAsync. (13)
      Open

          def _decrefAsync(self):
              self._refCount -= 1
              if self._refCount == 0 and not self.closed:
                  try:
                      for result in self._sendMsg(Alert().create(\
      Severity: Minor
      Found in tlslite/tlsrecordlayer.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 _sendMsg. (12)
      Open

          def _sendMsg(self, msg, randomizeFirstBlock=True, update_hashes=True):
              """Fragment and send message through socket"""
              #Whenever we're connected and asked to send an app data message,
              #we first send the first byte of the message.  This prevents
              #an attacker from launching a chosen-plaintext attack based on
      Severity: Minor
      Found in tlslite/tlsrecordlayer.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 _getNextRecord. (12)
      Open

          def _getNextRecord(self):
              """read next message from socket, defragment message"""
      
              while True:
                  # support for fragmentation
      Severity: Minor
      Found in tlslite/tlsrecordlayer.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 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def __init__(self, sock):
              sock = BufferedSocket(sock)
              self.sock = sock
              self._recordLayer = RecordLayer(sock)
      
      
      Severity: Minor
      Found in tlslite/tlsrecordlayer.py - About 1 hr to fix

        Function _sendMsg has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

            def _sendMsg(self, msg, randomizeFirstBlock=True, update_hashes=True):
                """Fragment and send message through socket"""
                #Whenever we're connected and asked to send an app data message,
                #we first send the first byte of the message.  This prevents
                #an attacker from launching a chosen-plaintext attack based on
        Severity: Minor
        Found in tlslite/tlsrecordlayer.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 _handle_keyupdate_request has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
        Open

            def _handle_keyupdate_request(self, request):
                """Process the KeyUpdate request.
        
                :type request: KeyUpdate
                :param request: Recieved KeyUpdate message.
        Severity: Minor
        Found in tlslite/tlsrecordlayer.py - About 55 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 _create_cert_msg has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def _create_cert_msg(self, peer, request_msg, valid_compression_algos,
        Severity: Major
        Found in tlslite/tlsrecordlayer.py - About 50 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                          for result in self._sendMsg(alertMsg):
                                              yield result
                                      except socket.error:
          Severity: Major
          Found in tlslite/tlsrecordlayer.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                        if subType == HandshakeType.hello_request:
                                            reneg = True
                                    else:
            Severity: Major
            Found in tlslite/tlsrecordlayer.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                          for result in self._sendMsg(alertMsg):
                                              yield result
                                          continue
              Severity: Major
              Found in tlslite/tlsrecordlayer.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                                if len(heartbeat_message.padding) < 16:
                                                    # per RFC, silently ignore if the message
                                                    # is malformed
                                                    continue
                                                heartbeat_response = heartbeat_message.\
                Severity: Major
                Found in tlslite/tlsrecordlayer.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                                  if not self.heartbeat_can_receive:
                                                      for result in self._sendError(
                                                              AlertDescription.
                                                              unexpected_message,
                                                              "Received heartbeat_request to "
                  Severity: Major
                  Found in tlslite/tlsrecordlayer.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                if alert.description == \
                                                       AlertDescription.close_notify:
                                                    self._shutdown(True)
                                                elif alert.level == AlertLevel.warning:
                                                    self._shutdown(False)
                    Severity: Major
                    Found in tlslite/tlsrecordlayer.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                                      for result in self._sendMsg(
                                                              heartbeat_response):
                                                          yield result
                                                  # If we received heartbeat response, then we
                                                  # check, if its payload is same as payload of
                      Severity: Major
                      Found in tlslite/tlsrecordlayer.py - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                    if result in (0,1):
                                                        yield result
                                                if result.contentType == ContentType.alert:
                        Severity: Major
                        Found in tlslite/tlsrecordlayer.py - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                      if subType == HandshakeType.client_hello:
                                                          reneg = True
                                                  # Send no_renegotiation if we're not negotiating
                                                  # a connection now, then try again
                                                  if reneg and self.session:
                          Severity: Major
                          Found in tlslite/tlsrecordlayer.py - About 45 mins to fix

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

                                def _calcPendingStates(self, cipherSuite, masterSecret,
                            Severity: Minor
                            Found in tlslite/tlsrecordlayer.py - About 35 mins to fix

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

                                  def makefile(self, mode='r', bufsize=-1):
                                      """Create a file object for the TLS connection (socket emulation).
                              
                                      :rtype: socket._fileobject
                                      """
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              TODO found
                              Open

                                      # TODO: verify that the extensions used by client were sent by us in
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by fixme

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

                                          if sig_scheme in (SignatureScheme.ed25519, SignatureScheme.ed448):
                                              pad_type = None
                                              hash_name = "intrinsic"
                                              salt_len = None
                                              sig_func = p_key.hashAndSign
                              Severity: Major
                              Found in tlslite/tlsrecordlayer.py and 1 other location - About 1 day to fix
                              tlslite/tlsconnection.py on lines 1526..1544

                              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 157.

                              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

                                          while True:
                                              # empty message buffer
                                              ret = self._defragmenter.get_message()
                                              if ret is None:
                                                  break
                              Severity: Major
                              Found in tlslite/tlsrecordlayer.py and 1 other location - About 3 hrs to fix
                              tlslite/messagesocket.py on lines 75..82

                              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 67.

                              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 not ver_func(
                                                  cert_verify.signature, signature_context, pad_type,
                                                  hash_name, salt_len):
                                              for result in self._sendError(
                                                      AlertDescription.decrypt_error,
                              Severity: Major
                              Found in tlslite/tlsrecordlayer.py and 2 other locations - About 45 mins to fix
                              tlslite/tlsconnection.py on lines 3123..3131
                              tlslite/tlsconnection.py on lines 4552..4560

                              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 38.

                              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

                                          self.session.cl_app_secret, self.session.sr_app_secret = self._recordLayer.\
                                              calcTLS1_3KeyUpdate_sender(
                                                  self.session.cipherSuite,
                                                  self.session.cl_app_secret,
                                                  self.session.sr_app_secret)
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py and 1 other location - About 45 mins to fix
                              tlslite/tlsrecordlayer.py on lines 1535..1539

                              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 38.

                              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

                                      self.session.cl_app_secret, self.session.sr_app_secret = \
                                          self._recordLayer.calcTLS1_3KeyUpdate_reciever(
                                                  self.session.cipherSuite,
                                                  self.session.cl_app_secret,
                                                  self.session.sr_app_secret)
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py and 1 other location - About 45 mins to fix
                              tlslite/tlsrecordlayer.py on lines 1502..1506

                              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 38.

                              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 10 locations. Consider refactoring.
                              Open

                                          for result in self._getMsg(ContentType.handshake,
                                                                     HandshakeType.certificate_verify):
                                              if result in (0, 1):
                                                  yield result
                              Severity: Major
                              Found in tlslite/tlsrecordlayer.py and 9 other locations - About 40 mins to fix
                              tlslite/tlsconnection.py on lines 937..939
                              tlslite/tlsconnection.py on lines 1049..1052
                              tlslite/tlsconnection.py on lines 1301..1304
                              tlslite/tlsconnection.py on lines 1392..1395
                              tlslite/tlsconnection.py on lines 1790..1793
                              tlslite/tlsconnection.py on lines 3079..3082
                              tlslite/tlsconnection.py on lines 3249..3251
                              tlslite/tlsconnection.py on lines 3978..3981
                              tlslite/tlsconnection.py on lines 4476..4479

                              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 37.

                              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 not ver_func(signature, signature_context,
                                                          pad_type,
                                                          hash_name,
                                                          salt_len):
                                              for result in self._sendError(
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py and 2 other locations - About 35 mins to fix
                              tlslite/tlsconnection.py on lines 1550..1557
                              tlslite/tlsconnection.py on lines 3006..3013

                              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 36.

                              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 7 locations. Consider refactoring.
                              Open

                                      if comp_cert_ext and not comp_cert_ext.algorithms:
                                          for result in self._sendError(
                                                  AlertDescription.decode_error,
                                                  "Empty algorithm list in compress_certificate "
                                                  "extension"):
                              Severity: Major
                              Found in tlslite/tlsrecordlayer.py and 6 other locations - About 30 mins to fix
                              tlslite/tlsconnection.py on lines 1312..1317
                              tlslite/tlsconnection.py on lines 1341..1346
                              tlslite/tlsconnection.py on lines 1782..1787
                              tlslite/tlsconnection.py on lines 2751..2755
                              tlslite/tlsconnection.py on lines 4115..4119
                              tlslite/tlsconnection.py on lines 4341..4346

                              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 35.

                              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

                              Block comment should start with '# '
                              Open

                                      #Is this a resumed session?
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              class TLSRecordLayer(object):
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                                      self._refCount = 0 #Used to trigger closure
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                      #My session object (Session instance; read-only)
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Inline comment should start with '# '
                              Open

                                      self.closed = True #read-only
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              At least two spaces before inline comment
                              Open

                                      self.closed = True #read-only
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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 over-indented for visual indent
                              Open

                                                                 AlertDescription.close_notify:
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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)

                              Line too long (88 > 79 characters)
                              Open

                                          self.session.cl_app_secret, self.session.sr_app_secret = self._recordLayer.\
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Limit all lines to a maximum of 79 characters.

                              There are still many devices around that are limited to 80 character
                              lines; plus, limiting windows to 80 characters makes it possible to
                              have several windows side-by-side.  The default wrapping on such
                              devices looks ugly.  Therefore, please limit all lines to a maximum
                              of 79 characters. For flowing long blocks of text (docstrings or
                              comments), limiting the length to 72 characters is recommended.
                              
                              Reports error E501.

                              At least two spaces before inline comment
                              Open

                                      self.resumed = False #read-only
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                      #Fault we will induce, for testing purposes
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              The backslash is redundant between brackets
                              Open

                                                      for result in self._getMsg((ContentType.alert, \
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Avoid explicit line join between brackets.

                              The preferred way of wrapping long lines is by using Python's
                              implied line continuation inside parentheses, brackets and braces.
                              Long lines can be broken over multiple lines by wrapping expressions
                              in parentheses.  These should be used in preference to using a
                              backslash for line continuation.
                              
                              E502: aaa = [123, \\n       123]
                              E502: aaa = ("bbb " \\n       "ccc")
                              
                              Okay: aaa = [123,\n       123]
                              Okay: aaa = ("bbb "\n       "ccc")
                              Okay: aaa = "bbb " \\n    "ccc"
                              Okay: aaa = 123  # \\

                              Block comment should start with '# '
                              Open

                                   #*********************************************************
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                  #Returns next record or next handshake message
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Line too long (87 > 79 characters)
                              Open

                                              raise TLSClosedConnectionError("attempt to write to closed connection")
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Limit all lines to a maximum of 79 characters.

                              There are still many devices around that are limited to 80 character
                              lines; plus, limiting windows to 80 characters makes it possible to
                              have several windows side-by-side.  The default wrapping on such
                              devices looks ugly.  Therefore, please limit all lines to a maximum
                              of 79 characters. For flowing long blocks of text (docstrings or
                              comments), limiting the length to 72 characters is recommended.
                              
                              Reports error E501.

                              The backslash is redundant between brackets
                              Open

                                              for result in self._sendMsg(Alert().create(\
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Avoid explicit line join between brackets.

                              The preferred way of wrapping long lines is by using Python's
                              implied line continuation inside parentheses, brackets and braces.
                              Long lines can be broken over multiple lines by wrapping expressions
                              in parentheses.  These should be used in preference to using a
                              backslash for line continuation.
                              
                              E502: aaa = [123, \\n       123]
                              E502: aaa = ("bbb " \\n       "ccc")
                              
                              Okay: aaa = [123,\n       123]
                              Okay: aaa = ("bbb "\n       "ccc")
                              Okay: aaa = "bbb " \\n    "ccc"
                              Okay: aaa = 123  # \\

                              Block comment should start with '# '
                              Open

                                      #an attacker from launching a chosen-plaintext attack based on
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                                      #We either received a fatal error, a warning, or a
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Inline comment should start with '# '
                              Open

                                      self.resumed = False #read-only
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                      #On a call to close(), do we close the socket? (writeable)
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                                                          if result in (0,1):
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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'}]

                              Indentation is not a multiple of 4 (comment)
                              Open

                                   #*********************************************************
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Use indent_size (PEP8 says 4) spaces per indentation level.

                              For really old code that you don't want to mess up, you can continue
                              to use 8-space tabs.
                              
                              Okay: a = 1
                              Okay: if a == 0:\n    a = 1
                              E111:   a = 1
                              E114:   # a = 1
                              
                              Okay: for item in items:\n    pass
                              E112: for item in items:\npass
                              E115: for item in items:\n# Hi\n    pass
                              
                              Okay: a = 1\nb = 2
                              E113: a = 1\n    b = 2
                              E116: a = 1\n    # b = 2

                              Missing whitespace after ','
                              Open

                                      self.version = (0,0)
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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'}]

                              Block comment should start with '# '
                              Open

                                      #Whenever we're connected and asked to send an app data message,
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                      #we first send the first byte of the message.  This prevents
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                                      #connection.  In the latter two cases we respond with
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                                          #already been closed, we will be forgiving and not
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              The backslash is redundant between brackets
                              Open

                                                      for result in self._sendError(\
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Avoid explicit line join between brackets.

                              The preferred way of wrapping long lines is by using Python's
                              implied line continuation inside parentheses, brackets and braces.
                              Long lines can be broken over multiple lines by wrapping expressions
                              in parentheses.  These should be used in preference to using a
                              backslash for line continuation.
                              
                              E502: aaa = [123, \\n       123]
                              E502: aaa = ("bbb " \\n       "ccc")
                              
                              Okay: aaa = [123,\n       123]
                              Okay: aaa = ("bbb "\n       "ccc")
                              Okay: aaa = "bbb " \\n    "ccc"
                              Okay: aaa = 123  # \\

                              Inline comment should start with '# '
                              Open

                                      self._refCount = 0 #Used to trigger closure
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                      #What username did the client claim in his handshake?
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Too many blank lines (2)
                              Open

                                   #*********************************************************
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                      #Fragment big messages
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              The backslash is redundant between brackets
                              Open

                                          for result in self._sendError(\
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Avoid explicit line join between brackets.

                              The preferred way of wrapping long lines is by using Python's
                              implied line continuation inside parentheses, brackets and braces.
                              Long lines can be broken over multiple lines by wrapping expressions
                              in parentheses.  These should be used in preference to using a
                              backslash for line continuation.
                              
                              E502: aaa = [123, \\n       123]
                              E502: aaa = ("bbb " \\n       "ccc")
                              
                              Okay: aaa = [123,\n       123]
                              Okay: aaa = ("bbb "\n       "ccc")
                              Okay: aaa = "bbb " \\n    "ccc"
                              Okay: aaa = 123  # \\

                              Block comment should start with '# '
                              Open

                                  #*********************************************************
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Line too long (80 > 79 characters)
                              Open

                                          # Don't invalidate the session on write failure if abrupt closes are
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Limit all lines to a maximum of 79 characters.

                              There are still many devices around that are limited to 80 character
                              lines; plus, limiting windows to 80 characters makes it possible to
                              have several windows side-by-side.  The default wrapping on such
                              devices looks ugly.  Therefore, please limit all lines to a maximum
                              of 79 characters. For flowing long blocks of text (docstrings or
                              comments), limiting the length to 72 characters is recommended.
                              
                              Reports error E501.

                              Block comment should start with '# '
                              Open

                                              #If the other side closes the socket, that's okay
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                                      #a close_notify, but ignore any socket errors, since
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                                  #If we received a renegotiation attempt...
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Line too long (80 > 79 characters)
                              Open

                                      unread the last data from a socket, that won't wake up selected waiters,
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Limit all lines to a maximum of 79 characters.

                              There are still many devices around that are limited to 80 character
                              lines; plus, limiting windows to 80 characters makes it possible to
                              have several windows side-by-side.  The default wrapping on such
                              devices looks ugly.  Therefore, please limit all lines to a maximum
                              of 79 characters. For flowing long blocks of text (docstrings or
                              comments), limiting the length to 72 characters is recommended.
                              
                              Reports error E501.

                              Block comment should start with '# '
                              Open

                                              #If this is an empty application-data fragment, try again
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                              #Convert secondaryType to tuple, if it isn't already
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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 1 blank line, found 0
                              Open

                                  def read(self, max=None, min=1):
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                                                                                ContentType.application_data)):
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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)

                              Indentation is not a multiple of 4 (comment)
                              Open

                                   # Public Functions END
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Use indent_size (PEP8 says 4) spaces per indentation level.

                              For really old code that you don't want to mess up, you can continue
                              to use 8-space tabs.
                              
                              Okay: a = 1
                              Okay: if a == 0:\n    a = 1
                              E111:   a = 1
                              E114:   # a = 1
                              
                              Okay: for item in items:\n    pass
                              E112: for item in items:\npass
                              E115: for item in items:\n# Hi\n    pass
                              
                              Okay: a = 1\nb = 2
                              E113: a = 1\n    b = 2
                              E116: a = 1\n    # b = 2

                              Block comment should start with '# '
                              Open

                                          #Spin in a loop, until we've got a non-empty record of a type we
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                                                  if result in (0,1):
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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'}]

                              Block comment should start with '# '
                              Open

                                      #Handshake digests
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                      #Is the connection open?
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                      #and pretend the connection was shut down properly? (writeable)
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Do not use bare 'except'
                              Open

                                      except:
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              When catching exceptions, mention specific exceptions when possible.

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

                              Line too long (80 > 79 characters)
                              Open

                                              ver_func = cert.cert_chain.getEndEntityPublicKey().hashAndVerify
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Limit all lines to a maximum of 79 characters.

                              There are still many devices around that are limited to 80 character
                              lines; plus, limiting windows to 80 characters makes it possible to
                              have several windows side-by-side.  The default wrapping on such
                              devices looks ugly.  Therefore, please limit all lines to a maximum
                              of 79 characters. For flowing long blocks of text (docstrings or
                              comments), limiting the length to 72 characters is recommended.
                              
                              Reports error E501.

                              Block comment should start with '# '
                              Open

                                              #If we received an unexpected record type...
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                                      #close_notify.  In any case, we're going to close the
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Comparison to none should be 'if cond is none:'
                              Open

                                          if max == None:
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Comparison to singletons should use "is" or "is not".

                              Comparisons to singletons like None should always be done
                              with "is" or "is not", never the equality operators.
                              
                              Okay: if arg is not None:
                              E711: if arg != None:
                              E711: if None == arg:
                              E712: if arg == True:
                              E712: if False == arg:
                              
                              Also, beware of writing if x when you really mean if x is not None
                              -- e.g. when testing whether a variable or argument that defaults to
                              None was set to some other value.  The other value might have a type
                              (such as a container) that could be false in a boolean context!

                              Block comment should start with '# '
                              Open

                                   #*********************************************************
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                          #expect.  The loop will be repeated if:
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                                  #If we received an alert...
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                          #Parse based on content_type
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              The backslash is redundant between brackets
                              Open

                                                      for result in self._sendError(\
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Avoid explicit line join between brackets.

                              The preferred way of wrapping long lines is by using Python's
                              implied line continuation inside parentheses, brackets and braces.
                              Long lines can be broken over multiple lines by wrapping expressions
                              in parentheses.  These should be used in preference to using a
                              backslash for line continuation.
                              
                              E502: aaa = [123, \\n       123]
                              E502: aaa = ("bbb " \\n       "ccc")
                              
                              Okay: aaa = [123,\n       123]
                              Okay: aaa = ("bbb "\n       "ccc")
                              Okay: aaa = "bbb " \\n    "ccc"
                              Okay: aaa = 123  # \\

                              Block comment should start with '# '
                              Open

                                      #If an exception was raised by a Parser or Message instance:
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                      #If the socket is abruptly closed, do we ignore it
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Do not use bare 'except'
                              Open

                                          except:
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              When catching exceptions, mention specific exceptions when possible.

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

                              Block comment should start with '# '
                              Open

                                  #Emulate a socket, somewhat -
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                              #If it's a handshake message, check handshake header
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Indentation is not a multiple of 4 (comment)
                              Open

                                   #*********************************************************
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Use indent_size (PEP8 says 4) spaces per indentation level.

                              For really old code that you don't want to mess up, you can continue
                              to use 8-space tabs.
                              
                              Okay: a = 1
                              Okay: if a == 0:\n    a = 1
                              E111:   a = 1
                              E114:   # a = 1
                              
                              Okay: for item in items:\n    pass
                              E112: for item in items:\npass
                              E115: for item in items:\n# Hi\n    pass
                              
                              Okay: a = 1\nb = 2
                              E113: a = 1\n    b = 2
                              E116: a = 1\n    # b = 2

                              Block comment should start with '# '
                              Open

                                                      #the other side might have already closed the socket.
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                                  #alert nor renegotiation
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                              #Parse based on handshake type
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              The backslash is redundant between brackets
                              Open

                                                  yield ClientKeyExchange(constructorType, \
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Avoid explicit line join between brackets.

                              The preferred way of wrapping long lines is by using Python's
                              implied line continuation inside parentheses, brackets and braces.
                              Long lines can be broken over multiple lines by wrapping expressions
                              in parentheses.  These should be used in preference to using a
                              backslash for line continuation.
                              
                              E502: aaa = [123, \\n       123]
                              E502: aaa = ("bbb " \\n       "ccc")
                              
                              Okay: aaa = [123,\n       123]
                              Okay: aaa = ("bbb "\n       "ccc")
                              Okay: aaa = "bbb " \\n    "ccc"
                              Okay: aaa = 123  # \\

                              Line too long (81 > 79 characters)
                              Open

                                                                                ContentType.application_data)):
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Limit all lines to a maximum of 79 characters.

                              There are still many devices around that are limited to 80 character
                              lines; plus, limiting windows to 80 characters makes it possible to
                              have several windows side-by-side.  The default wrapping on such
                              devices looks ugly.  Therefore, please limit all lines to a maximum
                              of 79 characters. For flowing long blocks of text (docstrings or
                              comments), limiting the length to 72 characters is recommended.
                              
                              Reports error E501.

                              Too many blank lines (2)
                              Open

                                  def _sendError(self, alertDescription, errorStr=None):
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                      #Update handshake hashes
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                                          #If the sendMsg() call fails because the socket has
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              At least two spaces before inline comment
                              Open

                                                      else: #Fatal alert:
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                                      #Raise the alert as an exception
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                                  #Otherwise: this is an unexpected record, but neither an
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                              #Update handshake hashes
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Line too long (80 > 79 characters)
                              Open

                                      if request.message_type == KeyUpdateMessageType.update_not_requested or\
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Limit all lines to a maximum of 79 characters.

                              There are still many devices around that are limited to 80 character
                              lines; plus, limiting windows to 80 characters makes it possible to
                              have several windows side-by-side.  The default wrapping on such
                              devices looks ugly.  Therefore, please limit all lines to a maximum
                              of 79 characters. For flowing long blocks of text (docstrings or
                              comments), limiting the length to 72 characters is recommended.
                              
                              Reports error E501.

                              Block comment should start with '# '
                              Open

                                      #Buffers for processing messages
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                  #*********************************************************
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                      #Even if resumable is False, we'll never toggle this on
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                      #knowing the next IV (a la BEAST).
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                                          #of the session.
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Inline comment should start with '# '
                              Open

                                                      else: #Fatal alert:
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              The backslash is redundant between brackets
                              Open

                                                  for result in self._sendError(\
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Avoid explicit line join between brackets.

                              The preferred way of wrapping long lines is by using Python's
                              implied line continuation inside parentheses, brackets and braces.
                              Long lines can be broken over multiple lines by wrapping expressions
                              in parentheses.  These should be used in preference to using a
                              backslash for line continuation.
                              
                              E502: aaa = [123, \\n       123]
                              E502: aaa = ("bbb " \\n       "ccc")
                              
                              Okay: aaa = [123,\n       123]
                              Okay: aaa = ("bbb "\n       "ccc")
                              Okay: aaa = "bbb " \\n    "ccc"
                              Okay: aaa = 123  # \\

                              Line too long (80 > 79 characters)
                              Open

                                          raise TLSIllegalParameterException("KeyUpdate is a TLS 1.3 specific"
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Limit all lines to a maximum of 79 characters.

                              There are still many devices around that are limited to 80 character
                              lines; plus, limiting windows to 80 characters makes it possible to
                              have several windows side-by-side.  The default wrapping on such
                              devices looks ugly.  Therefore, please limit all lines to a maximum
                              of 79 characters. For flowing long blocks of text (docstrings or
                              comments), limiting the length to 72 characters is recommended.
                              
                              Reports error E501.

                              Too many blank lines (2)
                              Open

                                  #*********************************************************
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              The backslash is redundant between brackets
                              Open

                                          for result in self._sendMsg(applicationData, \
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Avoid explicit line join between brackets.

                              The preferred way of wrapping long lines is by using Python's
                              implied line continuation inside parentheses, brackets and braces.
                              Long lines can be broken over multiple lines by wrapping expressions
                              in parentheses.  These should be used in preference to using a
                              backslash for line continuation.
                              
                              E502: aaa = [123, \\n       123]
                              E502: aaa = ("bbb " \\n       "ccc")
                              
                              Okay: aaa = [123,\n       123]
                              Okay: aaa = ("bbb "\n       "ccc")
                              Okay: aaa = "bbb " \\n    "ccc"
                              Okay: aaa = 123  # \\

                              Expected 1 blank line, found 0
                              Open

                                  def _handle_pha(self, cert_request):
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              Block comment should start with '# '
                              Open

                                                          #report the error nor invalidate the "resumability"
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.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

                              The backslash is redundant between brackets
                              Open

                                                  AlertDescription.unexpected_message, \
                              Severity: Minor
                              Found in tlslite/tlsrecordlayer.py by pep8

                              Avoid explicit line join between brackets.

                              The preferred way of wrapping long lines is by using Python's
                              implied line continuation inside parentheses, brackets and braces.
                              Long lines can be broken over multiple lines by wrapping expressions
                              in parentheses.  These should be used in preference to using a
                              backslash for line continuation.
                              
                              E502: aaa = [123, \\n       123]
                              E502: aaa = ("bbb " \\n       "ccc")
                              
                              Okay: aaa = [123,\n       123]
                              Okay: aaa = ("bbb "\n       "ccc")
                              Okay: aaa = "bbb " \\n    "ccc"
                              Okay: aaa = 123  # \\

                              There are no issues that match your filters.

                              Category
                              Status