motom001/DoorPi

View on GitHub
doorpi/status/webserver_lib/request_handler.py

Summary

Maintainability
F
3 days
Test Coverage

Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
Open

        response = load_online_fallback(url, timeout = 1)

File request_handler.py has 363 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import logging
logger = logging.getLogger(__name__)
Severity: Minor
Found in doorpi/status/webserver_lib/request_handler.py - About 4 hrs to fix

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

        def parse_content(self, content, online_fallback = False, **mapping_table):
            try:
                matches = re.findall(r"{([^}\s]*)}", content)
                if not matches: return content
                #http://stackoverflow.com/questions/12897374/get-unique-values-from-a-list-in-python/12897491#12897491
    Severity: Minor
    Found in doorpi/status/webserver_lib/request_handler.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 do_control has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

        def do_control(self, control_order, para):
            result_object = dict(
                success = False,
                message = 'unknown error'
            )
    Severity: Minor
    Found in doorpi/status/webserver_lib/request_handler.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

    DoorPiWebRequestHandler has 26 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class DoorPiWebRequestHandler(BaseHTTPRequestHandler):
    
        @property
        def conf(self): return self.server.config
    
    
    Severity: Minor
    Found in doorpi/status/webserver_lib/request_handler.py - About 3 hrs to fix

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

          def return_virtual_resource(self, prepared_object, return_type = 'json'):
              if isinstance(return_type, list) and len(return_type) > 0: return_type = return_type[0]
      
              if return_type in ["json", "default"]:
                  return  self.return_message(json.dumps(prepared_object), "application/json; charset=utf-8")
      Severity: Minor
      Found in doorpi/status/webserver_lib/request_handler.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 authentication_required has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

          def authentication_required(self):
              parsed_path = urlparse(self.path)
      
              public_resources = self.conf.get_keys(self.server.area_public_name, log = False)
              for public_resource in public_resources:
      Severity: Minor
      Found in doorpi/status/webserver_lib/request_handler.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 create_virtual_resource has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

          def create_virtual_resource(self, path, raw_parameters):
              return_object = {}
              try:
                  if path.path == '/mirror':
                      return_object = self.create_mirror()
      Severity: Minor
      Found in doorpi/status/webserver_lib/request_handler.py - About 35 mins to fix

      Cognitive Complexity

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

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

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

      Further reading

      Avoid too many return statements within this function.
      Open

              else: return self.real_resource(parsed_path.path)
      Severity: Major
      Found in doorpi/status/webserver_lib/request_handler.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    try:    return self.return_message(repr(prepared_object))
        Severity: Major
        Found in doorpi/status/webserver_lib/request_handler.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      except: return self.return_message(str(prepared_object))
          Severity: Major
          Found in doorpi/status/webserver_lib/request_handler.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return True
            Severity: Major
            Found in doorpi/status/webserver_lib/request_handler.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return self.return_message(prepared_object, 'text/html; charset=utf-8')
              Severity: Major
              Found in doorpi/status/webserver_lib/request_handler.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return self.return_message(repr(prepared_object))
                Severity: Major
                Found in doorpi/status/webserver_lib/request_handler.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                  return False
                  Severity: Major
                  Found in doorpi/status/webserver_lib/request_handler.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return self.return_message(str(prepared_object))
                    Severity: Major
                    Found in doorpi/status/webserver_lib/request_handler.py - About 30 mins to fix

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

                          def list_directory(self, path):
                              dirs = []
                              files = []
                              for item in os.listdir(path):
                                  if os.path.isfile(item): files.append(item)
                      Severity: Minor
                      Found in doorpi/status/webserver_lib/request_handler.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

                      Refactor this function to reduce its Cognitive Complexity from 25 to the 15 allowed.
                      Open

                          def parse_content(self, content, online_fallback = False, **mapping_table):

                      Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                      See

                      Refactor this function to reduce its Cognitive Complexity from 23 to the 15 allowed.
                      Open

                          def do_control(self, control_order, para):

                      Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                      See

                      Either merge this branch with the identical one on line "251" or change one of the implementations.
                      Open

                                      return self.parse_content(file_content)

                      Having two branches in the same if structure with the same implementation is at best duplicate code, and at worst a coding error. If the same logic is truly needed for both instances, then they should be combined.

                      Noncompliant Code Example

                      if 0 <= a < 10:
                          do_the_thing()
                      elif 10 <= a < 20:
                          do_the_other_thing()
                      elif 20 <= a < 50:
                          do_the_thing()  # Noncompliant; duplicates first condition
                      else:
                          do_the_rest()
                      
                      b = 4 if a > 12 else 4
                      

                      Compliant Solution

                      if (0 <= a < 10) or (20 <= a < 50):
                          do_the_thing()
                      elif 10 <= a < 20:
                          do_the_other_thing()
                      else:
                          do_the_rest()
                      
                      b = 4
                      

                      or

                      if 0 <= a < 10:
                          do_the_thing()
                      elif 10 <= a < 20:
                          do_the_other_thing()
                      elif 20 <= a < 50:
                          do_the_third_thing()
                      else:
                          do_the_rest()
                      
                      b = 8 if a > 12 else 4
                      

                      Remove this commented out code.
                      Open

                              #return self.send_error(403)

                      Programmers should not comment out code as it bloats programs and reduces readability.

                      Unused code should be deleted and can be retrieved from source control history if required.

                      See

                      • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
                      • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
                      • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
                      • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

                      Remove this commented out code.
                      Open

                              #doorpi.DoorPi().event_handler('OnWebServerRequest', __name__, {'header': self.headers.items(), 'path': parsed_path})

                      Programmers should not comment out code as it bloats programs and reduces readability.

                      Unused code should be deleted and can be retrieved from source control history if required.

                      See

                      • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
                      • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
                      • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
                      • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

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

                              for read_permission in user_session['readpermissions']:
                                  if re.match(read_permission, parsed_path.path):
                                      logger.info('user %s has read permissions: %s', user_session['username'], parsed_path.path)
                                      return False
                      Severity: Major
                      Found in doorpi/status/webserver_lib/request_handler.py and 1 other location - About 1 hr to fix
                      doorpi/status/webserver_lib/request_handler.py on lines 346..349

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 47.

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

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

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

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

                      Refactorings

                      Further Reading

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

                              for write_permission in user_session['writepermissions']:
                                  if re.match(write_permission, parsed_path.path):
                                      logger.info('user %s has write permissions: %s', user_session['username'], parsed_path.path)
                                      return False
                      Severity: Major
                      Found in doorpi/status/webserver_lib/request_handler.py and 1 other location - About 1 hr to fix
                      doorpi/status/webserver_lib/request_handler.py on lines 351..354

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 47.

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

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

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

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

                      Refactorings

                      Further Reading

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

                                  elif control_order == "config_value_delete":
                                      # section and key
                                      result_object['success'] = control_config_delete_key(**para)
                                      result_object['message'] = "config_value_delete %s" % (
                                          'success' if result_object['success'] else 'failed'
                      Severity: Major
                      Found in doorpi/status/webserver_lib/request_handler.py and 2 other locations - About 1 hr to fix
                      doorpi/status/webserver_lib/request_handler.py on lines 107..111
                      doorpi/status/webserver_lib/request_handler.py on lines 119..123

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

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

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

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

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

                      Refactorings

                      Further Reading

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

                                  elif control_order == "config_save":
                                      # configfile
                                      result_object['success'] = control_config_save(**para)
                                      result_object['message'] = "config_save %s" % (
                                          'success' if result_object['success'] else 'failed'
                      Severity: Major
                      Found in doorpi/status/webserver_lib/request_handler.py and 2 other locations - About 1 hr to fix
                      doorpi/status/webserver_lib/request_handler.py on lines 107..111
                      doorpi/status/webserver_lib/request_handler.py on lines 113..117

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

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

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

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

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

                      Refactorings

                      Further Reading

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

                                  elif control_order == "config_value_set":
                                      # section, key, value, password
                                      result_object['success'] = control_config_set_value(**para)
                                      result_object['message'] = "config_value_set %s" % (
                                          'success' if result_object['success'] else 'failed'
                      Severity: Major
                      Found in doorpi/status/webserver_lib/request_handler.py and 2 other locations - About 1 hr to fix
                      doorpi/status/webserver_lib/request_handler.py on lines 113..117
                      doorpi/status/webserver_lib/request_handler.py on lines 119..123

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

                      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

                                          try: replace_with = self.read_from_file(self.server.www + '/dashboard/parts/' + mapping_table[match])
                      Severity: Minor
                      Found in doorpi/status/webserver_lib/request_handler.py and 1 other location - About 35 mins to fix
                      doorpi/status/webserver_lib/request_handler.py on lines 423..427

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 33.

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

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

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

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

                      Refactorings

                      Further Reading

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

                                              if self.server.online_fallback:
                                                  replace_with = self.read_from_fallback(
                                                      self.server.online_fallback +
                                                      '/dashboard/parts/' +
                                                      mapping_table[match]
                      Severity: Minor
                      Found in doorpi/status/webserver_lib/request_handler.py and 1 other location - About 35 mins to fix
                      doorpi/status/webserver_lib/request_handler.py on lines 421..421

                      Duplicated Code

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

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

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

                      Tuning

                      This issue has a mass of 33.

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

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

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

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

                      Refactorings

                      Further Reading

                      Line too long (95 > 79 characters)
                      Open

                              if isinstance(return_type, list) and len(return_type) > 0: return_type = return_type[0]

                      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

                      from urlparse import urlparse, parse_qs # parsing parameters and url

                      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

                      Module level import not at top of file
                      Open

                      from urllib2 import urlopen as load_online_fallback

                      Place imports at the top of the file.

                      Always put imports at the top of the file, just after any module
                      comments and docstrings, and before module globals and constants.
                      
                      Okay: import os
                      Okay: # this is a comment\nimport os
                      Okay: '''this is a module docstring'''\nimport os
                      Okay: r'''this is a module docstring'''\nimport os
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                      E402: a=1\nimport os
                      E402: 'One string'\n"Two string"\nimport os
                      E402: a=1\nfrom sys import x
                      
                      Okay: if x:\n    import os

                      Multiple statements on one line (colon)
                      Open

                      class WebServerLoginRequired(Exception): pass

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Block comment should start with '# '
                      Open

                              #doorpi.DoorPi().event_handler('OnWebServerRequest', __name__)

                      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 (128 > 79 characters)
                      Open

                              #doorpi.DoorPi().event_handler('OnWebServerRequestGet', __name__, {'header': self.headers.items(), 'path': parsed_path})

                      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.

                      Line too long (100 > 79 characters)
                      Open

                                      result_object['message'] = doorpi.DoorPi().event_handler.fire_event_synchron(**para)

                      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.

                      Multiple statements on one line (colon)
                      Open

                              if 'module' not in raw_parameters.keys(): raw_parameters['module'] = []

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Multiple statements on one line (colon)
                      Open

                              if 'value' not in raw_parameters.keys(): raw_parameters['value'] = []

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Line too long (111 > 79 characters)
                      Open

                              elif return_type in ["json_beautified_parsed", "json.beautified.parsed", "beautified.json.parsed", ""]:

                      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.

                      Line too long (98 > 79 characters)
                      Open

                              for file in files: return_html += '<a href="./{file}">{file}</a></br>'.format(file = file)

                      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.

                      Module level import not at top of file
                      Open

                      from mimetypes import guess_type

                      Place imports at the top of the file.

                      Always put imports at the top of the file, just after any module
                      comments and docstrings, and before module globals and constants.
                      
                      Okay: import os
                      Okay: # this is a comment\nimport os
                      Okay: '''this is a module docstring'''\nimport os
                      Okay: r'''this is a module docstring'''\nimport os
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                      E402: a=1\nimport os
                      E402: 'One string'\n"Two string"\nimport os
                      E402: a=1\nfrom sys import x
                      
                      Okay: if x:\n    import os

                      Module level import not at top of file
                      Open

                      from urlparse import urlparse, parse_qs # parsing parameters and url

                      Place imports at the top of the file.

                      Always put imports at the top of the file, just after any module
                      comments and docstrings, and before module globals and constants.
                      
                      Okay: import os
                      Okay: # this is a comment\nimport os
                      Okay: '''this is a module docstring'''\nimport os
                      Okay: r'''this is a module docstring'''\nimport os
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                      E402: a=1\nimport os
                      E402: 'One string'\n"Two string"\nimport os
                      E402: a=1\nfrom sys import x
                      
                      Okay: if x:\n    import os

                      Module level import not at top of file
                      Open

                      import json # for virtual resources

                      Place imports at the top of the file.

                      Always put imports at the top of the file, just after any module
                      comments and docstrings, and before module globals and constants.
                      
                      Okay: import os
                      Okay: # this is a comment\nimport os
                      Okay: '''this is a module docstring'''\nimport os
                      Okay: r'''this is a module docstring'''\nimport os
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                      E402: a=1\nimport os
                      E402: 'One string'\n"Two string"\nimport os
                      E402: a=1\nfrom sys import x
                      
                      Okay: if x:\n    import os

                      Module level import not at top of file
                      Open

                      from urllib import unquote_plus

                      Place imports at the top of the file.

                      Always put imports at the top of the file, just after any module
                      comments and docstrings, and before module globals and constants.
                      
                      Okay: import os
                      Okay: # this is a comment\nimport os
                      Okay: '''this is a module docstring'''\nimport os
                      Okay: r'''this is a module docstring'''\nimport os
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                      E402: a=1\nimport os
                      E402: 'One string'\n"Two string"\nimport os
                      E402: a=1\nfrom sys import x
                      
                      Okay: if x:\n    import os

                      Block comment should start with '# '
                      Open

                              #doorpi.DoorPi().event_handler('OnWebServerRequestGet', __name__)

                      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

                      Multiple statements on one line (colon)
                      Open

                                  try:    return self.return_message(repr(prepared_object))

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Line too long (82 > 79 characters)
                      Open

                                  return self.return_fallback_content(self.server.online_fallback, path)

                      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.

                      Module level import not at top of file
                      Open

                      import cgi # for parsing POST

                      Place imports at the top of the file.

                      Always put imports at the top of the file, just after any module
                      comments and docstrings, and before module globals and constants.
                      
                      Okay: import os
                      Okay: # this is a comment\nimport os
                      Okay: '''this is a module docstring'''\nimport os
                      Okay: r'''this is a module docstring'''\nimport os
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                      E402: a=1\nimport os
                      E402: 'One string'\n"Two string"\nimport os
                      E402: a=1\nfrom sys import x
                      
                      Okay: if x:\n    import os

                      Module level import not at top of file
                      Open

                      import doorpi

                      Place imports at the top of the file.

                      Always put imports at the top of the file, just after any module
                      comments and docstrings, and before module globals and constants.
                      
                      Okay: import os
                      Okay: # this is a comment\nimport os
                      Okay: '''this is a module docstring'''\nimport os
                      Okay: r'''this is a module docstring'''\nimport os
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                      E402: a=1\nimport os
                      E402: 'One string'\n"Two string"\nimport os
                      E402: a=1\nfrom sys import x
                      
                      Okay: if x:\n    import os

                      Module level import not at top of file
                      Open

                      from BaseHTTPServer import BaseHTTPRequestHandler

                      Place imports at the top of the file.

                      Always put imports at the top of the file, just after any module
                      comments and docstrings, and before module globals and constants.
                      
                      Okay: import os
                      Okay: # this is a comment\nimport os
                      Okay: '''this is a module docstring'''\nimport os
                      Okay: r'''this is a module docstring'''\nimport os
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                      E402: a=1\nimport os
                      E402: 'One string'\n"Two string"\nimport os
                      E402: a=1\nfrom sys import x
                      
                      Okay: if x:\n    import os

                      Expected 2 blank lines, found 1
                      Open

                      class DoorPiWebRequestHandler(BaseHTTPRequestHandler):

                      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

                      Line too long (93 > 79 characters)
                      Open

                          def log_error(self, format, *args): logger.error("[%s] %s", self.client_address[0], args)

                      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.

                      Line too long (125 > 79 characters)
                      Open

                              #doorpi.DoorPi().event_handler('OnWebServerRequest', __name__, {'header': self.headers.items(), 'path': parsed_path})

                      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.

                      Line too long (97 > 79 characters)
                      Open

                                  return self.create_virtual_resource(parsed_path, parse_qs(urlparse(self.path).query))

                      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.

                      Unexpected spaces around keyword / parameter equals
                      Open

                              logger.debug(json.dumps(para, sort_keys = True, indent = 4))

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

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                              logger.debug(json.dumps(para, sort_keys = True, indent = 4))

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

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                              except Exception as exp: return_object = dict(error_message = str(exp))

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

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

                      Module level import not at top of file
                      Open

                      import os

                      Place imports at the top of the file.

                      Always put imports at the top of the file, just after any module
                      comments and docstrings, and before module globals and constants.
                      
                      Okay: import os
                      Okay: # this is a comment\nimport os
                      Okay: '''this is a module docstring'''\nimport os
                      Okay: r'''this is a module docstring'''\nimport os
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                      E402: a=1\nimport os
                      E402: 'One string'\n"Two string"\nimport os
                      E402: a=1\nfrom sys import x
                      
                      Okay: if x:\n    import os

                      Line too long (88 > 79 characters)
                      Open

                              doorpi.DoorPi().event_handler.register_event('OnWebServerRequestPost', __name__)

                      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.

                      Unexpected spaces around keyword / parameter equals
                      Open

                                          MODULE_NAME = raw_parameters['name'][0] or ''

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

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

                      Multiple statements on one line (colon)
                      Open

                              if isinstance(return_type, list) and len(return_type) > 0: return_type = return_type[0]

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Line too long (149 > 79 characters)
                      Open

                                  return  self.return_message(self.parse_content(json.dumps(prepared_object, sort_keys=True, indent=4)), "application/json; charset=utf-8")

                      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

                              #doorpi.DoorPi().event_handler('OnWebServerRealResource', __name__, {'path': path})

                      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

                      Unexpected spaces around keyword / parameter equals
                      Open

                                          modules = raw_parameters['module'],

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

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                                          name = raw_parameters['name'],

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

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                              except Exception as exp: return_object = dict(error_message = str(exp))

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

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

                      Multiple spaces after keyword
                      Open

                                  return  self.return_message(json.dumps(prepared_object), "application/json; charset=utf-8")

                      Avoid extraneous whitespace around keywords.

                      Okay: True and False
                      E271: True and  False
                      E272: True  and False
                      E273: True and\tFalse
                      E274: True\tand False

                      Unexpected spaces around keyword / parameter equals
                      Open

                              response = load_online_fallback(url, timeout = 1)

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

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

                      Line too long (80 > 79 characters)
                      Open

                              doorpi.DoorPi().event_handler.register_event('OnConfigKeySet', __name__)

                      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.

                      Module level import not at top of file
                      Open

                      from request_handler_static_functions import *

                      Place imports at the top of the file.

                      Always put imports at the top of the file, just after any module
                      comments and docstrings, and before module globals and constants.
                      
                      Okay: import os
                      Okay: # this is a comment\nimport os
                      Okay: '''this is a module docstring'''\nimport os
                      Okay: r'''this is a module docstring'''\nimport os
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                      E402: a=1\nimport os
                      E402: 'One string'\n"Two string"\nimport os
                      E402: a=1\nfrom sys import x
                      
                      Okay: if x:\n    import os

                      Line too long (95 > 79 characters)
                      Open

                          def log_message(self, format, *args): logger.debug("[%s] %s", self.client_address[0], args)

                      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.

                      Multiple statements on one line (colon)
                      Open

                                      try:                    para[parameter_name] = unquote_plus(para[parameter_name][0])

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Unexpected spaces around keyword / parameter equals
                      Open

                                          MODULE_AREA_NAME = raw_parameters['module'][0] or '',

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

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

                      Line too long (92 > 79 characters)
                      Open

                              for dir in dirs: return_html += '<a href="./{dir}">{dir}</a></br>'.format(dir = dir)

                      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.

                      Unexpected spaces around keyword / parameter equals
                      Open

                              for file in files: return_html += '<a href="./{file}">{file}</a></br>'.format(file = file)

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

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                                  message = self.parse_content(login_form_content),

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

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                                  http_code = 401

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

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

                      Line too long (88 > 79 characters)
                      Open

                              public_resources = self.conf.get_keys(self.server.area_public_name, log = False)

                      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.

                      Unexpected spaces around keyword / parameter equals
                      Open

                              public_resources = self.conf.get_keys(self.server.area_public_name, log = False)

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

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                              public_resources = self.conf.get_keys(self.server.area_public_name, log = False)

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

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

                      Line too long (97 > 79 characters)
                      Open

                                  mapping_table['MIN_EXTENSION'] =    '' if logger.getEffectiveLevel() <= 5 else '.min'

                      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.

                      Multiple spaces after operator
                      Open

                                      mapping_table['BASE_URL'] =     "http://%s:%s"%(self.server.server_name, self.server.server_port)

                      Avoid extraneous whitespace around an operator.

                      Okay: a = 12 + 3
                      E221: a = 4  + 5
                      E222: a = 4 +  5
                      E223: a = 4\t+ 5
                      E224: a = 4 +\t5

                      At least two spaces before inline comment
                      Open

                      import json # for virtual resources

                      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

                      Multiple spaces after keyword
                      Open

                                  return  self.return_message(json.dumps(prepared_object, sort_keys=True, indent=4), "application/json; charset=utf-8")

                      Avoid extraneous whitespace around keywords.

                      Okay: True and False
                      E271: True and  False
                      E272: True  and False
                      E273: True and\tFalse
                      E274: True\tand False

                      Unexpected spaces around keyword / parameter equals
                      Open

                              for dir in dirs: return_html += '<a href="./{dir}">{dir}</a></br>'.format(dir = dir)

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

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                          def return_message(self, message = "", content_type = 'text/plain; charset=utf-8', http_code = 200,):

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

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

                      Line too long (82 > 79 characters)
                      Open

                                          content = content.replace('{'+match+'}', mapping_table[match])

                      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.

                      Expected 2 blank lines, found 1
                      Open

                      class WebServerLoginRequired(Exception): pass

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

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                                  message = 'unknown error'

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

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                              logger.debug(json.dumps(para, sort_keys = True, indent = 4))

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

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

                      Line too long (101 > 79 characters)
                      Open

                                      return_object, mime = self.get_file_content('/dashboard/parts/modules.overview.html')

                      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.

                      Line too long (123 > 79 characters)
                      Open

                                  return  self.return_message(self.parse_content(json.dumps(prepared_object)), "application/json; charset=utf-8")

                      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.

                      Multiple spaces after keyword
                      Open

                                  return  self.return_message(self.parse_content(json.dumps(prepared_object, sort_keys=True, indent=4)), "application/json; charset=utf-8")

                      Avoid extraneous whitespace around keywords.

                      Okay: True and False
                      E271: True and  False
                      E272: True  and False
                      E273: True and\tFalse
                      E274: True\tand False

                      Line too long (83 > 79 characters)
                      Open

                                  return self.return_message(prepared_object, 'text/html; charset=utf-8')

                      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.

                      Do not use bare 'except'
                      Open

                                  except: return self.return_message(str(prepared_object))

                      When catching exceptions, mention specific exceptions when possible.

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                                  content_type = 'text/html; charset=utf-8',

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

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

                      Multiple spaces after operator
                      Open

                                  mapping_table['SERVER'] =           self.server.server_name

                      Avoid extraneous whitespace around an operator.

                      Okay: a = 12 + 3
                      E221: a = 4  + 5
                      E222: a = 4 +  5
                      E223: a = 4\t+ 5
                      E224: a = 4 +\t5

                      Multiple statements on one line (colon)
                      Open

                                  if os.path.isfile(item): files.append(item)

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Block comment should start with '# '
                      Open

                              #return self.send_error(403)

                      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 (115 > 79 characters)
                      Open

                                      <p>Message: <a href="http://tools.ietf.org/html/rfc7235#section-3.1">RFC7235 - 401 Unauthorized</a>

                      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.

                      Line too long (100 > 79 characters)
                      Open

                              logger.warning('user %s has no permissions: %s', user_session['username'], parsed_path.path)

                      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.

                      Multiple statements on one line (colon)
                      Open

                                  if not matches: return content

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Line too long (114 > 79 characters)
                      Open

                                  #http://stackoverflow.com/questions/12897374/get-unique-values-from-a-list-in-python/12897491#12897491

                      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.

                      Multiple spaces after operator
                      Open

                                      mapping_table['BASE_URL'] =     "http://%s"%self.headers['host']

                      Avoid extraneous whitespace around an operator.

                      Okay: a = 12 + 3
                      E221: a = 4  + 5
                      E222: a = 4 +  5
                      E223: a = 4\t+ 5
                      E224: a = 4 +\t5

                      Unexpected spaces around keyword / parameter equals
                      Open

                                  message = 'unknown error'

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

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                          def return_virtual_resource(self, prepared_object, return_type = 'json'):

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

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

                      Multiple spaces after keyword
                      Open

                                  return  self.return_message(self.parse_content(json.dumps(prepared_object)), "application/json; charset=utf-8")

                      Avoid extraneous whitespace around keywords.

                      Okay: True and False
                      E271: True and  False
                      E272: True  and False
                      E273: True and\tFalse
                      E274: True\tand False

                      Multiple statements on one line (colon)
                      Open

                                  except: return self.return_message(str(prepared_object))

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Unexpected spaces around keyword / parameter equals
                      Open

                                  content_type = 'text/html; charset=utf-8',

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

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                          def return_message(self, message = "", content_type = 'text/plain; charset=utf-8', http_code = 200,):

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

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

                      Line too long (80 > 79 characters)
                      Open

                                      mapping_table['BASE_URL'] =     "http://%s"%self.headers['host']

                      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.

                      Line too long (80 > 79 characters)
                      Open

                                  #nutze den Hostnamen aus der URL. sonst ist ein erneuter Login nötig

                      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.

                      Line too long (113 > 79 characters)
                      Open

                                      mapping_table['BASE_URL'] =     "http://%s:%s"%(self.server.server_name, self.server.server_port)

                      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

                      import re # regex for area

                      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

                      Multiple statements on one line (colon)
                      Open

                      class WebServerRequestHandlerShutdownAction(SingleAction): pass

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Line too long (92 > 79 characters)
                      Open

                              doorpi.DoorPi().event_handler.register_event('OnWebServerVirtualResource', __name__)

                      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.

                      Multiple statements on one line (colon)
                      Open

                              if self.authentication_required(): return self.login_form()

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Multiple statements on one line (colon)
                      Open

                                      except KeyError:        para[parameter_name] = ''

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Unexpected spaces around keyword / parameter equals
                      Open

                                          MODULE_NAME = raw_parameters['name'][0] or ''

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

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

                      Multiple spaces before keyword
                      Open

                                  try:    return self.return_message(repr(prepared_object))

                      Avoid extraneous whitespace around keywords.

                      Okay: True and False
                      E271: True and  False
                      E272: True  and False
                      E273: True and\tFalse
                      E274: True\tand False

                      Multiple statements on one line (colon)
                      Open

                              if os.path.isdir(self.server.www + path): return self.list_directory(self.server.www + path)

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Multiple statements on one line (colon)
                      Open

                              for dir in dirs: return_html += '<a href="./{dir}">{dir}</a></br>'.format(dir = dir)

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Line too long (105 > 79 characters)
                      Open

                          def return_message(self, message = "", content_type = 'text/plain; charset=utf-8', http_code = 200,):

                      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

                                  #nutze den Hostnamen aus der URL. sonst ist ein erneuter Login nötig

                      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

                      Unexpected spaces around keyword / parameter equals
                      Open

                          def return_message(self, message = "", content_type = 'text/plain; charset=utf-8', http_code = 200,):

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

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

                      At least two spaces before inline comment
                      Open

                      import cgi # for parsing POST

                      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

                      Module level import not at top of file
                      Open

                      from doorpi.action.base import SingleAction

                      Place imports at the top of the file.

                      Always put imports at the top of the file, just after any module
                      comments and docstrings, and before module globals and constants.
                      
                      Okay: import os
                      Okay: # this is a comment\nimport os
                      Okay: '''this is a module docstring'''\nimport os
                      Okay: r'''this is a module docstring'''\nimport os
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                      E402: a=1\nimport os
                      E402: 'One string'\n"Two string"\nimport os
                      E402: a=1\nfrom sys import x
                      
                      Okay: if x:\n    import os

                      Unexpected spaces around keyword / parameter equals
                      Open

                              for file in files: return_html += '<a href="./{file}">{file}</a></br>'.format(file = file)

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

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

                      Whitespace after '('
                      Open

                              doorpi.DoorPi().event_handler.unregister_source( __name__, True)

                      Avoid extraneous whitespace.

                      Avoid extraneous whitespace in these situations:
                      - Immediately inside parentheses, brackets or braces.
                      - Immediately before a comma, semicolon, or colon.
                      
                      Okay: spam(ham[1], {eggs: 2})
                      E201: spam( ham[1], {eggs: 2})
                      E201: spam(ham[ 1], {eggs: 2})
                      E201: spam(ham[1], { eggs: 2})
                      E202: spam(ham[1], {eggs: 2} )
                      E202: spam(ham[1 ], {eggs: 2})
                      E202: spam(ham[1], {eggs: 2 })
                      
                      E203: if x == 4: print x, y; x, y = y , x
                      E203: if x == 4: print x, y ; x, y = y, x
                      E203: if x == 4 : print x, y; x, y = y, x

                      Line too long (108 > 79 characters)
                      Open

                                      logger.info('user %s has write permissions: %s', user_session['username'], parsed_path.path)

                      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.

                      Unexpected spaces around keyword / parameter equals
                      Open

                              return self.return_message(message, 'text/html', http_code = 301)

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

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

                      Line too long (100 > 79 characters)
                      Open

                                      try:                    para[parameter_name] = unquote_plus(para[parameter_name][0])

                      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.

                      Missing whitespace around operator
                      Open

                                  logger.info('Missing login file: '+ self.server.loginfile)

                      Surround operators with a single space on either side.

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

                      Line too long (80 > 79 characters)
                      Open

                                  mapping_table['DOORPI'] =           doorpi.DoorPi().name_and_version

                      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.

                      Multiple statements on one line (colon)
                      Open

                              if 'name' not in raw_parameters.keys(): raw_parameters['name'] = []

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Unexpected spaces around keyword / parameter equals
                      Open

                                          modules = raw_parameters['module'],

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

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

                      Multiple spaces after operator
                      Open

                                  mapping_table['MIN_EXTENSION'] =    '' if logger.getEffectiveLevel() <= 5 else '.min'

                      Avoid extraneous whitespace around an operator.

                      Okay: a = 12 + 3
                      E221: a = 4  + 5
                      E222: a = 4 +  5
                      E223: a = 4\t+ 5
                      E224: a = 4 +\t5

                      Unexpected spaces around keyword / parameter equals
                      Open

                                          name = raw_parameters['name'],

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

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

                      Missing whitespace around modulo operator
                      Open

                                      mapping_table['BASE_URL'] =     "http://%s:%s"%(self.server.server_name, self.server.server_port)

                      Surround operators with a single space on either side.

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                                          value = raw_parameters['value']

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

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

                      Multiple statements on one line (colon)
                      Open

                              except Exception as exp: return_object = dict(error_message = str(exp))

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Line too long (86 > 79 characters)
                      Open

                              elif return_type in ["json_beautified", "json.beautified", "beautified.json"]:

                      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.

                      Line too long (129 > 79 characters)
                      Open

                                  return  self.return_message(json.dumps(prepared_object, sort_keys=True, indent=4), "application/json; charset=utf-8")

                      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.

                      Unexpected spaces around keyword / parameter equals
                      Open

                              return self.return_message(message, 'text/html', http_code = 301)

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

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                              response = load_online_fallback(url, timeout = 1)

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

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

                      Line too long (99 > 79 characters)
                      Open

                                  login_form_content = self.read_from_file(self.server.www + "/" + self.server.loginfile)

                      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.

                      Missing whitespace after ','
                      Open

                                      logger.debug('public resource: %s',parsed_path.path)

                      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'}]

                      Line too long (89 > 79 characters)
                      Open

                                  user_session = self.server.sessions.build_security_object(username, password)

                      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.

                      Multiple spaces after operator
                      Open

                                  mapping_table['PORT'] =             str(self.server.server_port)

                      Avoid extraneous whitespace around an operator.

                      Okay: a = 12 + 3
                      E221: a = 4  + 5
                      E222: a = 4 +  5
                      E223: a = 4\t+ 5
                      E224: a = 4 +\t5

                      Line too long (121 > 79 characters)
                      Open

                                          try: replace_with = self.read_from_file(self.server.www + '/dashboard/parts/' + mapping_table[match])

                      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.

                      Multiple statements on one line (colon)
                      Open

                                          try: replace_with = self.read_from_file(self.server.www + '/dashboard/parts/' + mapping_table[match])

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Multiple statements on one line (colon)
                      Open

                              for file in files: return_html += '<a href="./{file}">{file}</a></br>'.format(file = file)

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Line too long (101 > 79 characters)
                      Open

                                      logger.trace('use onlinefallback - local file  %s not found', self.server.www + path)

                      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.

                      Line too long (101 > 79 characters)
                      Open

                              self.send_header('WWW-Authenticate', 'Basic realm=\"%s\"' % doorpi.DoorPi().name_and_version)

                      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.

                      Unexpected spaces around keyword / parameter equals
                      Open

                                  message = self.parse_content(login_form_content),

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

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                                  http_code = 401

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

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

                      Line too long (84 > 79 characters)
                      Open

                              doorpi.DoorPi().event_handler.register_event('OnWebServerRequest', __name__)

                      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.

                      Line too long (83 > 79 characters)
                      Open

                              doorpi.DoorPi().event_handler.register_event('OnConfigKeyDelete', __name__)

                      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.

                      Unexpected spaces around keyword / parameter equals
                      Open

                                  success = False,

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

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

                      Multiple statements on one line (colon)
                      Open

                                      except IndexError:      para[parameter_name] = ''

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Unexpected spaces around keyword / parameter equals
                      Open

                                          MODULE_AREA_NAME = raw_parameters['module'][0] or '',

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

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

                      Line too long (100 > 79 characters)
                      Open

                              if os.path.isdir(self.server.www + path): return self.list_directory(self.server.www + path)

                      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.

                      Multiple statements on one line (colon)
                      Open

                                  else: dirs.append(item)

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Unexpected spaces around keyword / parameter equals
                      Open

                              for dir in dirs: return_html += '<a href="./{dir}">{dir}</a></br>'.format(dir = dir)

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

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                          def return_message(self, message = "", content_type = 'text/plain; charset=utf-8', http_code = 200,):

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

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

                      Line too long (115 > 79 characters)
                      Open

                                  username, password = self.headers['authorization'].replace('Basic ', '').decode('base64').split(':', 1)

                      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.

                      Multiple statements on one line (colon)
                      Open

                              if not self.authentication_required(): return True

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Unexpected spaces around keyword / parameter equals
                      Open

                          def parse_content(self, content, online_fallback = False, **mapping_table):

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

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

                      Multiple spaces after operator
                      Open

                                  mapping_table['TEMPLATE:HTML_HEADER'] =     'html.header.html'

                      Avoid extraneous whitespace around an operator.

                      Okay: a = 12 + 3
                      E221: a = 4  + 5
                      E222: a = 4 +  5
                      E223: a = 4\t+ 5
                      E224: a = 4 +\t5

                      Multiple spaces after operator
                      Open

                                  mapping_table['TEMPLATE:HTML_FOOTER'] =     'html.footer.html'

                      Avoid extraneous whitespace around an operator.

                      Okay: a = 12 + 3
                      E221: a = 4  + 5
                      E222: a = 4 +  5
                      E223: a = 4\t+ 5
                      E224: a = 4 +\t5

                      Multiple statements on one line (colon)
                      Open

                              if not self.server.keep_running: return

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Multiple statements on one line (colon)
                      Open

                              else: return self.real_resource(parsed_path.path)

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Unexpected spaces around keyword / parameter equals
                      Open

                                  success = False,

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

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

                      Multiple statements on one line (colon)
                      Open

                              if 'output' not in raw_parameters.keys(): raw_parameters['output'] = ''

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Block comment should start with '# '
                      Open

                              #doorpi.DoorPi().event_handler('OnWebServerRequest', __name__, {'header': self.headers.items(), 'path': parsed_path})

                      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

                              #doorpi.DoorPi().event_handler('OnWebServerRequestGet', __name__, {'header': self.headers.items(), 'path': parsed_path})

                      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

                      Unexpected spaces around keyword / parameter equals
                      Open

                              logger.debug(json.dumps(para, sort_keys = True, indent = 4))

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

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                                          value = raw_parameters['value']

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

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                          def return_virtual_resource(self, prepared_object, return_type = 'json'):

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

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

                      Unexpected spaces around keyword / parameter equals
                      Open

                              '''.format(new_location = new_location)

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

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

                      Line too long (85 > 79 characters)
                      Open

                                      content = self.read_from_fallback(self.server.online_fallback + path)

                      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.

                      Unexpected spaces around keyword / parameter equals
                      Open

                          def return_message(self, message = "", content_type = 'text/plain; charset=utf-8', http_code = 200,):

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

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

                      Line too long (82 > 79 characters)
                      Open

                                  logger.debug('need authentication (no session): %s', parsed_path.path)

                      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.

                      Line too long (107 > 79 characters)
                      Open

                                      logger.info('user %s has read permissions: %s', user_session['username'], parsed_path.path)

                      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

                                  #http://stackoverflow.com/questions/12897374/get-unique-values-from-a-list-in-python/12897491#12897491

                      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

                      Multiple spaces after operator
                      Open

                                  mapping_table['DOORPI'] =           doorpi.DoorPi().name_and_version

                      Avoid extraneous whitespace around an operator.

                      Okay: a = 12 + 3
                      E221: a = 4  + 5
                      E222: a = 4 +  5
                      E223: a = 4\t+ 5
                      E224: a = 4 +\t5

                      Line too long (84 > 79 characters)
                      Open

                              return self.return_virtual_resource(return_object, raw_parameters['output'])

                      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.

                      Line too long (103 > 79 characters)
                      Open

                                  return  self.return_message(json.dumps(prepared_object), "application/json; charset=utf-8")

                      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.

                      Line too long (91 > 79 characters)
                      Open

                              #doorpi.DoorPi().event_handler('OnWebServerRealResource', __name__, {'path': path})

                      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.

                      Unexpected spaces around keyword / parameter equals
                      Open

                          def return_message(self, message = "", content_type = 'text/plain; charset=utf-8', http_code = 200,):

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

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

                      Block comment should start with '# '
                      Open

                              #if login_form:

                      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

                      Unexpected spaces around keyword / parameter equals
                      Open

                          def parse_content(self, content, online_fallback = False, **mapping_table):

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

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

                      Multiple spaces after operator
                      Open

                                  mapping_table['TEMPLATE:NAVIGATION'] =      'navigation.html'

                      Avoid extraneous whitespace around an operator.

                      Okay: a = 12 + 3
                      E221: a = 4  + 5
                      E222: a = 4 +  5
                      E223: a = 4\t+ 5
                      E224: a = 4 +\t5

                      Multiple statements on one line (colon)
                      Open

                                          except Exception: replace_with = ""

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      Module level import not at top of file
                      Open

                      import re # regex for area

                      Place imports at the top of the file.

                      Always put imports at the top of the file, just after any module
                      comments and docstrings, and before module globals and constants.
                      
                      Okay: import os
                      Okay: # this is a comment\nimport os
                      Okay: '''this is a module docstring'''\nimport os
                      Okay: r'''this is a module docstring'''\nimport os
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nelse:\n\tpass\nimport y
                      Okay:
                      try:\n\timport x\nexcept ImportError:\n\tpass\nfinally:\n\tpass\nimport y
                      E402: a=1\nimport os
                      E402: 'One string'\n"Two string"\nimport os
                      E402: a=1\nfrom sys import x
                      
                      Okay: if x:\n    import os

                      Line too long (87 > 79 characters)
                      Open

                              doorpi.DoorPi().event_handler.register_event('OnWebServerRequestGet', __name__)

                      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.

                      Line too long (89 > 79 characters)
                      Open

                              doorpi.DoorPi().event_handler.register_event('OnWebServerRealResource', __name__)

                      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.

                      Line too long (92 > 79 characters)
                      Open

                                      result_object['success'] = True if result_object['message'] != "" else False

                      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.

                      Line too long (89 > 79 characters)
                      Open

                                      return_object = self.do_control(path.path.split('/')[-1], raw_parameters)

                      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.

                      Unexpected spaces around keyword / parameter equals
                      Open

                              '''.format(new_location = new_location)

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

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

                      Missing whitespace around modulo operator
                      Open

                                      mapping_table['BASE_URL'] =     "http://%s"%self.headers['host']

                      Surround operators with a single space on either side.

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

                      Multiple statements on one line (colon)
                      Open

                                      if match not in mapping_table.keys(): continue

                      Compound statements (on the same line) are generally discouraged.

                      While sometimes it's okay to put an if/for/while with a small body
                      on the same line, never do this for multi-clause statements.
                      Also avoid folding such long lines!
                      
                      Always use a def statement instead of an assignment statement that
                      binds a lambda expression directly to a name.
                      
                      Okay: if foo == 'blah':\n    do_blah_thing()
                      Okay: do_one()
                      Okay: do_two()
                      Okay: do_three()
                      
                      E701: if foo == 'blah': do_blah_thing()
                      E701: for x in lst: total += x
                      E701: while t < 10: t = delay()
                      E701: if foo == 'blah': do_blah_thing()
                      E701: else: do_non_blah_thing()
                      E701: try: something()
                      E701: finally: cleanup()
                      E701: if foo == 'blah': one(); two(); three()
                      E702: do_one(); do_two(); do_three()
                      E703: do_four();  # useless semicolon
                      E704: def f(x): return 2*x
                      E731: f = lambda x: 2*x

                      There are no issues that match your filters.

                      Category
                      Status