saltstack/salt

View on GitHub
salt/modules/boto_rds.py

Summary

Maintainability
F
1 wk
Test Coverage

File boto_rds.py has 764 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-
'''
Connection module for Amazon RDS

.. versionadded:: 2015.8.0
Severity: Major
Found in salt/modules/boto_rds.py - About 1 day to fix

    Function create has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
    Open

    def create(name, allocated_storage, db_instance_class, engine,
               master_username, master_user_password, db_name=None,
               db_security_groups=None, vpc_security_group_ids=None,
               vpc_security_groups=None, availability_zone=None,
               db_subnet_group_name=None, preferred_maintenance_window=None,
    Severity: Minor
    Found in salt/modules/boto_rds.py - About 3 hrs to fix

    Cognitive Complexity

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

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

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

    Further reading

    Cyclomatic complexity is too high in function create. (23)
    Open

    def create(name, allocated_storage, db_instance_class, engine,
               master_username, master_user_password, db_name=None,
               db_security_groups=None, vpc_security_group_ids=None,
               vpc_security_groups=None, availability_zone=None,
               db_subnet_group_name=None, preferred_maintenance_window=None,
    Severity: Minor
    Found in salt/modules/boto_rds.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 create_read_replica has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

    def create_read_replica(name, source_name, db_instance_class=None,
                            availability_zone=None, port=None,
                            auto_minor_version_upgrade=None, iops=None,
                            option_group_name=None, publicly_accessible=None,
                            tags=None, db_subnet_group_name=None,
    Severity: Minor
    Found in salt/modules/boto_rds.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 describe_parameters has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

    def describe_parameters(name, Source=None, MaxRecords=None, Marker=None,
                            region=None, key=None, keyid=None, profile=None):
        '''
        Returns a list of `DBParameterGroup` parameters.
        CLI example to description of parameters ::
    Severity: Minor
    Found in salt/modules/boto_rds.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 delete has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

    def delete(name, skip_final_snapshot=None, final_db_snapshot_identifier=None,
               region=None, key=None, keyid=None, profile=None, tags=None,
               wait_for_deletion=True, timeout=180):
        '''
        Delete an RDS instance.
    Severity: Minor
    Found in salt/modules/boto_rds.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 update_parameter_group has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    def update_parameter_group(name, parameters, apply_method="pending-reboot",
                               tags=None, region=None, key=None, keyid=None,
                               profile=None):
        '''
        Update an RDS parameter group.
    Severity: Minor
    Found in salt/modules/boto_rds.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_endpoint has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

    def get_endpoint(name, tags=None, region=None, key=None, keyid=None,
                     profile=None):
        '''
        Return the endpoint of an RDS instance.
    
    
    Severity: Minor
    Found in salt/modules/boto_rds.py - About 55 mins to fix

    Cognitive Complexity

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

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

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

    Further reading

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

    def describe_parameter_group(name, Filters=None, MaxRecords=None, Marker=None,
                                 region=None, key=None, keyid=None, profile=None):
        '''
        Returns a list of `DBParameterGroup` descriptions.
        CLI example to description of parameter group::
    Severity: Minor
    Found in salt/modules/boto_rds.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 modify_db_instance has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    def modify_db_instance(name,
                           allocated_storage=None,
                           allow_major_version_upgrade=None,
                           apply_immediately=None,
                           auto_minor_version_upgrade=None,
    Severity: Minor
    Found in salt/modules/boto_rds.py - About 35 mins to fix

    Cognitive Complexity

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

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

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

    Further reading

    Avoid too many return statements within this function.
    Open

            return {'error': __utils__['boto3.get_error'](e)}
    Severity: Major
    Found in salt/modules/boto_rds.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return {'error': __utils__['boto3.get_error'](e)}
      Severity: Major
      Found in salt/modules/boto_rds.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                        return {'created': True,
        Severity: Major
        Found in salt/modules/boto_rds.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return {'error': __utils__['boto3.get_error'](e)}
          Severity: Major
          Found in salt/modules/boto_rds.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return {'rds': None}
            Severity: Major
            Found in salt/modules/boto_rds.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return {'error': __utils__['boto3.get_error'](e)}
              Severity: Major
              Found in salt/modules/boto_rds.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return {'error': __utils__['boto3.get_error'](e)}
                Severity: Major
                Found in salt/modules/boto_rds.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return {'error': __utils__['boto3.get_error'](e)}
                  Severity: Major
                  Found in salt/modules/boto_rds.py - About 30 mins to fix

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

                    def describe(name, tags=None, region=None, key=None, keyid=None,
                                 profile=None):
                        '''
                        Return RDS instance details.
                    
                    
                    Severity: Minor
                    Found in salt/modules/boto_rds.py - About 25 mins to fix

                    Cognitive Complexity

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

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

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

                    Further reading

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

                    def describe_db_instances(name=None, filters=None, jmespath='DBInstances',
                                              region=None, key=None, keyid=None, profile=None):
                        '''
                        Return a detailed listing of some, or all, DB Instances visible in the
                        current scope.  Arbitrary subelements or subsections of the returned dataset
                    Severity: Minor
                    Found in salt/modules/boto_rds.py - About 25 mins to fix

                    Cognitive Complexity

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

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

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

                    Further reading

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

                    def _tag_doc(tags):
                        taglist = []
                        if tags is not None:
                            for k, v in six.iteritems(tags):
                                if six.text_type(k).startswith('__'):
                    Severity: Minor
                    Found in salt/modules/boto_rds.py - About 25 mins to fix

                    Cognitive Complexity

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

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

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

                    Further reading

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

                    def delete_parameter_group(name, region=None, key=None, keyid=None,
                                               profile=None):
                        '''
                        Delete an RDS parameter group.
                    
                    
                    Severity: Major
                    Found in salt/modules/boto_rds.py and 1 other location - About 6 hrs to fix
                    salt/modules/boto_rds.py on lines 758..777

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

                    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 delete_subnet_group(name, region=None, key=None, keyid=None,
                                            profile=None):
                        '''
                        Delete an RDS subnet group.
                    
                    
                    Severity: Major
                    Found in salt/modules/boto_rds.py and 1 other location - About 6 hrs to fix
                    salt/modules/boto_rds.py on lines 736..755

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

                    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 exists(name, tags=None, region=None, key=None, keyid=None, profile=None):
                        '''
                        Check to see if an RDS exists.
                    
                        CLI example::
                    Severity: Major
                    Found in salt/modules/boto_rds.py and 1 other location - About 4 hrs to fix
                    salt/modules/boto_rds.py on lines 158..173

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

                    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 option_group_exists(name, tags=None, region=None, key=None, keyid=None,
                                            profile=None):
                        '''
                        Check to see if an RDS option group exists.
                    
                    
                    Severity: Major
                    Found in salt/modules/boto_rds.py and 1 other location - About 4 hrs to fix
                    salt/modules/boto_rds.py on lines 141..155

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

                    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(name, allocated_storage, db_instance_class, engine,
                               master_username, master_user_password, db_name=None,
                               db_security_groups=None, vpc_security_group_ids=None,
                               vpc_security_groups=None, availability_zone=None,
                               db_subnet_group_name=None, preferred_maintenance_window=None,
                    Severity: Major
                    Found in salt/modules/boto_rds.py and 1 other location - About 4 hrs to fix
                    salt/states/boto_rds.py on lines 94..136

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

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

                    try:
                        #pylint: disable=unused-import
                        import boto
                        import boto3
                        #pylint: enable=unused-import
                    Severity: Major
                    Found in salt/modules/boto_rds.py and 2 other locations - About 2 hrs to fix
                    salt/modules/boto_cognitoidentity.py on lines 92..102
                    salt/modules/boto_elasticsearch_domain.py on lines 93..103

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                            for param_key in keys.intersection(boto_params):
                                val = locals()[param_key]
                                if val is not None:
                                    mapped = boto3_param_map[param_key]
                                    kwargs[mapped[0]] = mapped[1](val)
                    Severity: Major
                    Found in salt/modules/boto_rds.py and 1 other location - About 2 hrs to fix
                    salt/modules/boto_rds.py on lines 936..940

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                            for key in keys.intersection(boto_params).difference(excluded):
                                val = locals()[key]
                                if val is not None:
                                    mapped = boto3_param_map[key]
                                    kwargs[mapped[0]] = mapped[1](val)
                    Severity: Major
                    Found in salt/modules/boto_rds.py and 1 other location - About 2 hrs to fix
                    salt/modules/boto_rds.py on lines 281..285

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

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

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

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

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

                    Refactorings

                    Further Reading

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

                            for key in ('MonitoringInterval', 'Iops', 'Port'):
                                if locals()[key] is not None:
                                    kwargs[key] = int(locals()[key])
                    Severity: Major
                    Found in salt/modules/boto_rds.py and 1 other location - About 1 hr to fix
                    salt/modules/boto_lambda.py on lines 520..522

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

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

                            for key in ('Marker', 'Filters'):
                                if locals()[key] is not None:
                                    kwargs[key] = str(locals()[key])  # future lint: disable=blacklisted-function
                    Severity: Major
                    Found in salt/modules/boto_rds.py and 3 other locations - About 1 hr to fix
                    salt/modules/boto_rds.py on lines 352..354
                    salt/modules/boto_rds.py on lines 360..362
                    salt/modules/boto_rds.py on lines 847..849

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

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

                            for key in ('Marker', 'Source'):
                                if locals()[key] is not None:
                                    kwargs[key] = str(locals()[key])  # future lint: disable=blacklisted-function
                    Severity: Major
                    Found in salt/modules/boto_rds.py and 3 other locations - About 1 hr to fix
                    salt/modules/boto_rds.py on lines 352..354
                    salt/modules/boto_rds.py on lines 360..362
                    salt/modules/boto_rds.py on lines 802..804

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

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

                            for key in ('CopyTagsToSnapshot', 'AutoMinorVersionUpgrade'):
                                if locals()[key] is not None:
                                    kwargs[key] = bool(locals()[key])
                    Severity: Major
                    Found in salt/modules/boto_rds.py and 3 other locations - About 1 hr to fix
                    salt/modules/boto_rds.py on lines 352..354
                    salt/modules/boto_rds.py on lines 802..804
                    salt/modules/boto_rds.py on lines 847..849

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

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

                            for key in ('OptionGroupName', 'MonitoringRoleArn'):
                                if locals()[key] is not None:
                                    kwargs[key] = str(locals()[key])  # future lint: disable=blacklisted-function
                    Severity: Major
                    Found in salt/modules/boto_rds.py and 3 other locations - About 1 hr to fix
                    salt/modules/boto_rds.py on lines 360..362
                    salt/modules/boto_rds.py on lines 802..804
                    salt/modules/boto_rds.py on lines 847..849

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

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

                            if locals()['final_db_snapshot_identifier'] is not None:
                                kwargs['FinalDBSnapshotIdentifier'] = str(locals()['final_db_snapshot_identifier'])  # future lint: disable=blacklisted-function
                    Severity: Major
                    Found in salt/modules/boto_rds.py and 3 other locations - About 35 mins to fix
                    salt/modules/boto_rds.py on lines 679..680
                    salt/modules/boto_rds.py on lines 806..807
                    salt/modules/boto_rds.py on lines 851..852

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

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

                            if locals()['MaxRecords'] is not None:
                                kwargs['MaxRecords'] = int(locals()['MaxRecords'])
                    Severity: Major
                    Found in salt/modules/boto_rds.py and 3 other locations - About 35 mins to fix
                    salt/modules/boto_rds.py on lines 679..680
                    salt/modules/boto_rds.py on lines 682..683
                    salt/modules/boto_rds.py on lines 851..852

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

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

                            if locals()['MaxRecords'] is not None:
                                kwargs['MaxRecords'] = int(locals()['MaxRecords'])
                    Severity: Major
                    Found in salt/modules/boto_rds.py and 3 other locations - About 35 mins to fix
                    salt/modules/boto_rds.py on lines 679..680
                    salt/modules/boto_rds.py on lines 682..683
                    salt/modules/boto_rds.py on lines 806..807

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

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

                            if locals()['skip_final_snapshot'] is not None:
                                kwargs['SkipFinalSnapshot'] = bool(locals()['skip_final_snapshot'])
                    Severity: Major
                    Found in salt/modules/boto_rds.py and 3 other locations - About 35 mins to fix
                    salt/modules/boto_rds.py on lines 682..683
                    salt/modules/boto_rds.py on lines 806..807
                    salt/modules/boto_rds.py on lines 851..852

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

                    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

                    There are no issues that match your filters.

                    Category
                    Status