apel/db/backends/mysql.py

Summary

Maintainability
F
1 wk
Test Coverage

Possible SQL injection vector through string-based query construction.
Open

        select_query = ('SELECT Site, SubmitHost, sum(NumberOfJobs) '
                        'AS NumberOfJobs, Month, Year FROM VSuperSummaries %s '
                        'GROUP BY Site, SubmitHost, Month, Year ORDER BY NULL'
                        % where)
Severity: Minor
Found in apel/db/backends/mysql.py by bandit

Possible SQL injection vector through string-based query construction.
Open

        select_query = 'SELECT * FROM %s' % (table_name)
Severity: Minor
Found in apel/db/backends/mysql.py by bandit

File mysql.py has 405 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'''
   Copyright (C) 2011,2012 STFC

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
Severity: Minor
Found in apel/db/backends/mysql.py - About 5 hrs to fix

    Cyclomatic complexity is too high in method load_records. (10)
    Open

        def load_records(self, record_list, replace=True, source=None):
            '''
            Loads the records in the list into the DB.  This is transactional -
            either all or no records will be loaded.  Includes the DN of the
            sender.
    Severity: Minor
    Found in apel/db/backends/mysql.py by radon

    Cyclomatic Complexity

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

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

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

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

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

        def update_spec(self, site, ce, spec_level_type, spec_level):
            '''
            This method compares the existing data from database to given values
            and updates the SpecRecords table if it is neccessary.
            '''
    Severity: Minor
    Found in apel/db/backends/mysql.py by radon

    Cyclomatic Complexity

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

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

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

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

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

        def _get_records(self, record_type, query_string, records_per_message=1000):
    
            record_list = []
            try:
                # prevent MySQLdb from raising
    Severity: Minor
    Found in apel/db/backends/mysql.py by radon

    Cyclomatic Complexity

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

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

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

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

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

        def load_records(self, record_list, replace=True, source=None):
            '''
            Loads the records in the list into the DB.  This is transactional -
            either all or no records will be loaded.  Includes the DN of the
            sender.
    Severity: Minor
    Found in apel/db/backends/mysql.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 _get_records has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

        def _get_records(self, record_type, query_string, records_per_message=1000):
    
            record_list = []
            try:
                # prevent MySQLdb from raising
    Severity: Minor
    Found in apel/db/backends/mysql.py - About 45 mins to fix

    Cognitive Complexity

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

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

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

    Further reading

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

        def __init__(self, host, port, username, pwd, db):
    Severity: Minor
    Found in apel/db/backends/mysql.py - About 35 mins to fix

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

          def update_spec(self, site, ce, spec_level_type, spec_level):
              '''
              This method compares the existing data from database to given values
              and updates the SpecRecords table if it is neccessary.
              '''
      Severity: Minor
      Found in apel/db/backends/mysql.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

      Too many arguments (6/5)
      Open

          def __init__(self, host, port, username, pwd, db):
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when a function or method takes too many arguments.

      Too many instance attributes (16/7)
      Open

      class ApelMysqlDb(object):
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when class has too many instance attributes, try to reduce this to get a simpler (and so easier to use) class.

      Class 'ApelMysqlDb' inherits from object, can be safely removed from bases in python3
      Open

      class ApelMysqlDb(object):
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when a class inherit from object, which under python3 is implicit, hence can be safely removed from bases.

      Unnecessary else after return
      Open

              if result is None:
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used in order to highlight an unnecessary block of code following an if containing a return statement. As such, it will warn when it encounters an else following a chain of ifs, all of them containing a return statement.

      Unable to import 'MySQLdb.cursors'
      Open

      import MySQLdb.cursors
      Severity: Critical
      Found in apel/db/backends/mysql.py by pylint

      Used when pylint has been unable to import a module.

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

          def summarise_jobs(self):
              '''
              Aggregate the data from the JobRecords table and put the results in the
              HybridSuperSummaries table.  This method does this by calling the
              SummariseJobs stored procedure.
      Severity: Major
      Found in apel/db/backends/mysql.py and 2 other locations - About 7 hrs to fix
      apel/db/backends/mysql.py on lines 324..353
      apel/db/backends/mysql.py on lines 378..405

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 118.

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

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

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

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

      Refactorings

      Further Reading

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

          def summarise_cloud(self):
              '''
              Aggregate the CloudRecords table and put the results in the
              CloudSummaries table.  This method does this by calling the
              SummariseVMs() stored procedure.
      Severity: Major
      Found in apel/db/backends/mysql.py and 2 other locations - About 7 hrs to fix
      apel/db/backends/mysql.py on lines 296..322
      apel/db/backends/mysql.py on lines 324..353

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 118.

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

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

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

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

      Refactorings

      Further Reading

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

          def normalise_summaries(self):
              """
              Normalise data from Summaries and insert into HybridSuperSummaries.
      
              Normalise the data from the Summaries table (calculate the normalised
      Severity: Major
      Found in apel/db/backends/mysql.py and 2 other locations - About 7 hrs to fix
      apel/db/backends/mysql.py on lines 296..322
      apel/db/backends/mysql.py on lines 378..405

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 118.

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

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

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

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

      Refactorings

      Further Reading

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

          def create_local_jobs(self):
              try:
                  # prevent MySQLdb from raising
                  # 'MySQL server has gone' exception
                  self._mysql_reconnect()
      Severity: Major
      Found in apel/db/backends/mysql.py and 1 other location - About 7 hrs to fix
      apel/db/backends/mysql.py on lines 415..431

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

      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:
                  # prevent MySQLdb from raising
                  # 'MySQL server has gone' exception
                  self._mysql_reconnect()
      
      
      Severity: Major
      Found in apel/db/backends/mysql.py and 1 other location - About 7 hrs to fix
      apel/db/backends/mysql.py on lines 433..452

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

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

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

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

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

      Refactorings

      Further Reading

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

              except MySQLdb.Error:
                  try:
                      self.db = MySQLdb.connect(host=self._db_host, port=self._db_port,
                                                user=self._db_username, passwd=self._db_pwd,
                                                db=self._db_name)
      Severity: Major
      Found in apel/db/backends/mysql.py and 1 other location - About 3 hrs to fix
      apel/db/backends/mysql.py on lines 100..106

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

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

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

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

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

      Refactorings

      Further Reading

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

              try:
                  self.db = MySQLdb.connect(host=self._db_host, port=self._db_port,
                                            user=self._db_username, passwd=self._db_pwd,
                                            db=self._db_name)
              except MySQLdb.Error as e:
      Severity: Major
      Found in apel/db/backends/mysql.py and 1 other location - About 3 hrs to fix
      apel/db/backends/mysql.py on lines 524..531

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

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

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

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

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

      Refactorings

      Further Reading

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

              try:
                  # prevent MySQLdb from raising
                  # 'MySQL server has gone' exception
                  self._mysql_reconnect()
      
      
      Severity: Major
      Found in apel/db/backends/mysql.py and 1 other location - About 1 hr to fix
      apel/db/backends/mysql.py on lines 503..515

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

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

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

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

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

      Refactorings

      Further Reading

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

              try:
                  # prevent MySQLdb from raising
                  # 'MySQL server has gone' exception
                  self._mysql_reconnect()
      
      
      Severity: Major
      Found in apel/db/backends/mysql.py and 1 other location - About 1 hr to fix
      apel/db/backends/mysql.py on lines 460..497

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

      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

              except (MySQLdb.Warning, MySQLdb.Error, KeyError) as err:
                  log.error("Error loading records: %s", err)
                  log.error("Transaction will be rolled back.")
                  self.db.rollback()
                  raise ApelDbException(err)
      Severity: Minor
      Found in apel/db/backends/mysql.py and 1 other location - About 50 mins to fix
      apel/db/backends/mysql.py on lines 236..240

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 36.

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

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

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

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

      Refactorings

      Further Reading

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

              except MySQLdb.Error as err:
                  log.error('Error during getting records: %s', err)
                  log.error('Transaction will be rolled back.')
                  self.db.rollback()
                  raise ApelDbException(err)
      Severity: Minor
      Found in apel/db/backends/mysql.py and 1 other location - About 50 mins to fix
      apel/db/backends/mysql.py on lines 168..172

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 36.

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

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

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

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

      Refactorings

      Further Reading

      Expected 2 blank lines, found 1
      Open

      class ApelMysqlDb(object):
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

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

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

      Whitespace before ':'
      Open

                          JobRecord   : 'VJobRecords',
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

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

                    BlahdRecord : "CALL InsertBlahdRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Whitespace before ':'
      Open

                    EventRecord : 'CALL InsertEventRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)',
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

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

          def _get_records(self, record_type, query_string, records_per_message=1000):
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Line too long (127 > 79 characters)
      Open

                    SummaryRecord: "CALL ReplaceSummary(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Line too long (101 > 79 characters)
      Open

                  raise ApelDbException('No procedure found for %s; replace = %s' % (record_type, replace))
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Line too long (82 > 79 characters)
      Open

                  # Precision limited to third decimal place is enough for our purposes.
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Whitespace before ':'
      Open

                    CloudRecord : "CALL ReplaceCloudRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

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

                                            user=self._db_username, passwd=self._db_pwd,
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Line too long (84 > 79 characters)
      Open

                  log.info('Database: %s; username: %s', self._db_name, self._db_username)
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Line too long (94 > 79 characters)
      Open

          def get_records(self, record_type, table_name=None, query=None, records_per_message=1000):
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Line too long (96 > 79 characters)
      Open

                  c.execute("select count(*) from JobRecords j inner join Summaries s using (SiteID)")
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Line too long (94 > 79 characters)
      Open

                  elif abs((old_level-decimal.Decimal(str(spec_level)))) > decimal.Decimal('0.001'):
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Line too long (86 > 79 characters)
      Open

                                                user=self._db_username, passwd=self._db_pwd,
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Line too long (92 > 79 characters)
      Open

              Copy summaries from the NormalisedSummaries table to the HybridSuperSummaries table.
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Line too long (82 > 79 characters)
      Open

              For exact implementantion please read the code of JoinJobRecords procedure
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Whitespace before ':'
      Open

                          SyncRecord  : 'SyncRecords',
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      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

      Whitespace before ':'
      Open

                          NormalisedSummaryRecord : 'VNormalisedSummaries',
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

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

                    JobRecord   : "CALL ReplaceJobRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Line too long (147 > 79 characters)
      Open

                    NormalisedSummaryRecord: "CALL ReplaceNormalisedSummary(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Line too long (87 > 79 characters)
      Open

              for batch in self._get_records(record_type, select_query, records_per_message):
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Continuation line over-indented for visual indent
      Open

                                 [site, ce, spec_level_type,
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Continuation lines indentation.

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

      Line too long (114 > 79 characters)
      Open

                    EventRecord : 'CALL ReplaceEventRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)',
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Whitespace before ':'
      Open

                          CloudSummaryRecord : 'VCloudSummaries',
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      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

      Whitespace before ':'
      Open

                          ProcessedRecord : 'VProcessedFiles',
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      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

      Whitespace before ':'
      Open

                          SummaryRecord : 'VSummaries',
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

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

                    StorageRecord: "CALL ReplaceStarRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Whitespace before ':'
      Open

                    CloudSummaryRecord : "CALL ReplaceCloudSummaryRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

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

              Yields lists of records fetched from database of the given type.  This is used
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Whitespace before ':'
      Open

                    SyncRecord  : "CALL ReplaceSyncRecord(%s, %s, %s, %s, %s, %s)",
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      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

      Continuation line over-indented for visual indent
      Open

                                 [site, ce, spec_level_type,
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Continuation lines indentation.

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

      Line too long (81 > 79 characters)
      Open

                      self.db = MySQLdb.connect(host=self._db_host, port=self._db_port,
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Whitespace before ':'
      Open

                          BlahdRecord : 'BlahdRecords',
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

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

          # These simply need to have the same number of arguments as the stored procedures defined in the database schemas.
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Line too long (164 > 79 characters)
      Open

                    CloudSummaryRecord : "CALL ReplaceCloudSummaryRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Multiple spaces after operator
      Open

                  db =  MySQLdb.connect(host=self._db_host, port=self._db_port,
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Avoid extraneous whitespace around an operator.

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

      Whitespace before ':'
      Open

          MYSQL_TABLES = {EventRecord : 'EventRecords',
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

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

                    ProcessedRecord : "CALL ReplaceProcessedFile(%s, %s, %s, %s, %s)",
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Whitespace before ':'
      Open

                    ProcessedRecord : "CALL ReplaceProcessedFile(%s, %s, %s, %s, %s)",
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      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

      Whitespace before ':'
      Open

                    BlahdRecord : "CALL InsertBlahdRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

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

              wall clock and cpu duration values from the ServiceLevel fields) and put
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Whitespace before ':'
      Open

                          CloudRecord : 'VCloudRecords',
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

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

                    EventRecord : 'CALL InsertEventRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)',
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Whitespace before ':'
      Open

                    JobRecord   : "CALL ReplaceJobRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

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

              Tests the DB connection - if it fails a MySQLdb.OperationalError will be
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Line too long (178 > 79 characters)
      Open

                    CloudRecord : "CALL ReplaceCloudRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Line too long (98 > 79 characters)
      Open

                          raise ApelDbException("Not all records in list are of type %s." % record_type)
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Line too long (82 > 79 characters)
      Open

              This method executes JoinJobRecords procedure in database which joins data
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Whitespace before ':'
      Open

                    EventRecord : 'CALL ReplaceEventRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)',
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

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

              for batch in self._get_records(SyncRecord, select_query, records_per_message):
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Line too long (104 > 79 characters)
      Open

                      raise ApelDbException("Records exist in both job and summary tables for the same site.")
      Severity: Minor
      Found in apel/db/backends/mysql.py by pep8

      Limit all lines to a maximum of 79 characters.

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

      Wrong hanging indentation (remove 6 spaces).
      Open

                    BlahdRecord : "CALL InsertBlahdRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      TODO BlahdRecord : CALL InsertBlahdRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s), | ^

      Wrong hanging indentation (remove 6 spaces).
      Open

                    ProcessedRecord : "CALL ReplaceProcessedFile(%s, %s, %s, %s, %s)",
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      TODO ProcessedRecord : CALL ReplaceProcessedFile(%s, %s, %s, %s, %s), | ^

      Line too long (164/100)
      Open

                    CloudSummaryRecord : "CALL ReplaceCloudSummaryRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when a line is longer than a given number of characters.

      Variable name c doesn't conform to snake_case naming style
      Open

                  c = self.db.cursor()
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Missing function or method docstring
      Open

          def create_local_jobs(self):
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when a function or method has no docstring.Some special methods like init do not require a docstring.

      Variable name e doesn't conform to snake_case naming style
      Open

              except MySQLdb.Error as e:
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Variable name c doesn't conform to snake_case naming style
      Open

                  c = self.db.cursor()
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Using type() instead of isinstance() for a typecheck.
      Open

                      if type(record) in (StorageRecord, GroupAttributeRecord):
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      The idiomatic way to perform an explicit typecheck in Python is to use isinstance(x, Y) rather than type(x) == Y, type(x) is Y. Though there are unusual situations where these give different results.

      Variable name c doesn't conform to snake_case naming style
      Open

                  c = self.db.cursor()
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      standard import import logging should be placed before from apel.db import ApelDbException
      Open

      import logging
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when PEP8 import order is not respected (standard imports first, then third-party libraries, then local imports)

      Variable name c doesn't conform to snake_case naming style
      Open

                  c = self.db.cursor()
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      standard import import datetime should be placed before from apel.db import ApelDbException
      Open

      import datetime
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when PEP8 import order is not respected (standard imports first, then third-party libraries, then local imports)

      Constant name log doesn't conform to UPPER_CASE naming style
      Open

      log = logging.getLogger(__name__)
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Variable name c doesn't conform to snake_case naming style
      Open

                  c = self.db.cursor(cursorclass=MySQLdb.cursors.DictCursor)
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Variable name e doesn't conform to snake_case naming style
      Open

              except MySQLdb.Error as e:
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Variable name c doesn't conform to snake_case naming style
      Open

                  c = self.db.cursor()
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Variable name e doesn't conform to snake_case naming style
      Open

              except MySQLdb.Error as e:
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Line too long (148/100)
      Open

                    JobRecord   : "CALL ReplaceJobRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when a line is longer than a given number of characters.

      Variable name e doesn't conform to snake_case naming style
      Open

                  except MySQLdb.Error as e:
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Line too long (134/100)
      Open

                    StorageRecord: "CALL ReplaceStarRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when a line is longer than a given number of characters.

      Wrong hanging indentation (remove 6 spaces).
      Open

                    GroupAttributeRecord: "CALL ReplaceGroupAttribute(%s, %s, %s)"
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      TODO GroupAttributeRecord: CALL ReplaceGroupAttribute(%s, %s, %s) | ^

      Line too long (101/100)
      Open

                  raise ApelDbException('No procedure found for %s; replace = %s' % (record_type, replace))
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when a line is longer than a given number of characters.

      Variable name c doesn't conform to snake_case naming style
      Open

                  c = self.db.cursor()
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Variable name c doesn't conform to snake_case naming style
      Open

                  c = self.db.cursor()
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Wrong hanging indentation (remove 6 spaces).
      Open

                    StorageRecord: "CALL ReplaceStarRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      TODO StorageRecord: CALL ReplaceStarRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s), | ^

      Line too long (104/100)
      Open

                      raise ApelDbException("Records exist in both job and summary tables for the same site.")
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when a line is longer than a given number of characters.

      Variable name c doesn't conform to snake_case naming style
      Open

                  c = self.db.cursor()
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Line too long (114/100)
      Open

                    EventRecord : 'CALL ReplaceEventRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)',
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when a line is longer than a given number of characters.

      Exactly one space required after assignment
      Open

                  db =  MySQLdb.connect(host=self._db_host, port=self._db_port,
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when a wrong number of spaces is used around an operator, bracket or block opener. db = MySQLdb.connect(host=self.dbhost, port=self.dbport, ^

      Wrong continued indentation (remove 1 space).
      Open

                                 [site, ce, spec_level_type,
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      TODO [site, ce, specleveltype, |^

      Variable name db doesn't conform to snake_case naming style
      Open

                  db =  MySQLdb.connect(host=self._db_host, port=self._db_port,
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Line too long (127/100)
      Open

                    SummaryRecord: "CALL ReplaceSummary(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when a line is longer than a given number of characters.

      Variable name c doesn't conform to snake_case naming style
      Open

                  c = self.db.cursor(cursorclass=MySQLdb.cursors.SSDictCursor)
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Variable name c doesn't conform to snake_case naming style
      Open

                  c = self.db.cursor()
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Wrong hanging indentation (remove 6 spaces).
      Open

                    CloudRecord : "CALL ReplaceCloudRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      TODO CloudRecord : CALL ReplaceCloudRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s), | ^

      Wrong continued indentation (remove 1 space).
      Open

                                 [site, ce, spec_level_type,
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      TODO [site, ce, specleveltype, |^

      Variable name e doesn't conform to snake_case naming style
      Open

              except MySQLdb.OperationalError as e:
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Using type() instead of isinstance() for a typecheck.
      Open

                      if (type(record) != record_type and type(record) not in
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      The idiomatic way to perform an explicit typecheck in Python is to use isinstance(x, Y) rather than type(x) == Y, type(x) is Y. Though there are unusual situations where these give different results.

      standard import import decimal should be placed before from apel.db import ApelDbException
      Open

      import decimal
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when PEP8 import order is not respected (standard imports first, then third-party libraries, then local imports)

      Wrong hanging indentation (remove 6 spaces).
      Open

                    NormalisedSummaryRecord: "CALL ReplaceNormalisedSummary(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      TODO NormalisedSummaryRecord: CALL ReplaceNormalisedSummary(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s), | ^

      Variable name c doesn't conform to snake_case naming style
      Open

              c = self.db.cursor()
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Variable name e doesn't conform to snake_case naming style
      Open

              except MySQLdb.Error as e:
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Variable name e doesn't conform to snake_case naming style
      Open

              except MySQLdb.Error as e:
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Line too long (105/100)
      Open

                    BlahdRecord : "CALL InsertBlahdRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when a line is longer than a given number of characters.

      Line too long (178/100)
      Open

                    CloudRecord : "CALL ReplaceCloudRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when a line is longer than a given number of characters.

      Variable name e doesn't conform to snake_case naming style
      Open

              except MySQLdb.Error as e:
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Variable name e doesn't conform to snake_case naming style
      Open

              except MySQLdb.Error as e:
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Line too long (113/100)
      Open

                    EventRecord : 'CALL InsertEventRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)',
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when a line is longer than a given number of characters.

      Wrong hanging indentation (remove 6 spaces).
      Open

                    EventRecord : 'CALL ReplaceEventRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)',
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      TODO EventRecord : 'CALL ReplaceEventRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)', | ^

      Wrong hanging indentation (remove 6 spaces).
      Open

                    JobRecord   : "CALL ReplaceJobRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      TODO JobRecord : CALL ReplaceJobRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s), | ^

      Wrong hanging indentation.
      Open

                    }
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      TODO } | | ^

      Wrong hanging indentation (remove 6 spaces).
      Open

                    CloudSummaryRecord : "CALL ReplaceCloudSummaryRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      TODO CloudSummaryRecord : CALL ReplaceCloudSummaryRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s), | ^

      Using type() instead of isinstance() for a typecheck.
      Open

                      if (type(record) != record_type and type(record) not in
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      The idiomatic way to perform an explicit typecheck in Python is to use isinstance(x, Y) rather than type(x) == Y, type(x) is Y. Though there are unusual situations where these give different results.

      Variable name e doesn't conform to snake_case naming style
      Open

              except MySQLdb.Error as e:
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Wrong hanging indentation (remove 6 spaces).
      Open

                    EventRecord : 'CALL InsertEventRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)',
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      TODO EventRecord : 'CALL InsertEventRecord(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)', | ^

      Line too long (147/100)
      Open

                    NormalisedSummaryRecord: "CALL ReplaceNormalisedSummary(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when a line is longer than a given number of characters.

      Variable name c doesn't conform to snake_case naming style
      Open

              c = self.db.cursor()
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Variable name e doesn't conform to snake_case naming style
      Open

              except MySQLdb.Error as e:
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Line too long (118/100)
      Open

          # These simply need to have the same number of arguments as the stored procedures defined in the database schemas.
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when a line is longer than a given number of characters.

      Wrong hanging indentation (remove 6 spaces).
      Open

                    SyncRecord  : "CALL ReplaceSyncRecord(%s, %s, %s, %s, %s, %s)",
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      TODO SyncRecord : CALL ReplaceSyncRecord(%s, %s, %s, %s, %s, %s), | ^

      Wrong hanging indentation.
      Open

                    }
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      TODO } | | ^

      Attribute name db doesn't conform to snake_case naming style
      Open

                  self.db = MySQLdb.connect(host=self._db_host, port=self._db_port,
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Wrong hanging indentation (remove 6 spaces).
      Open

                    SummaryRecord: "CALL ReplaceSummary(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      TODO SummaryRecord: CALL ReplaceSummary(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s), | ^

      Variable name e doesn't conform to snake_case naming style
      Open

              except MySQLdb.Error as e:
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      Argument name ce doesn't conform to snake_case naming style
      Open

          def update_spec(self, site, ce, spec_level_type, spec_level):
      Severity: Info
      Found in apel/db/backends/mysql.py by pylint

      Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

      There are no issues that match your filters.

      Category
      Status