CiscoUcs/ucsmsdk

View on GitHub

Showing 127 of 492 total issues

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

        for childf in l_filter.child:
            if isinstance(childf, AbstractFilter):
                if child_filter.child_count() == max_components:
                    child_filter = OrFilter()
                    parent_filter.child_add(child_filter)
Severity: Major
Found in ucsmsdk/ucsfilter.py and 1 other location - About 2 hrs to fix
ucsmsdk/ucsfilter.py on lines 209..214

Duplicated Code

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

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

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

Tuning

This issue has a mass of 56.

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

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

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

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

Refactorings

Further Reading

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

        flag_exp = pp.Group(pp.Literal("flag") + pp.Literal(
            "=") + quote + flags + quote).setResultsName("flag_exp")
Severity: Major
Found in ucsmsdk/ucsfilter.py and 1 other location - About 2 hrs to fix
ucsmsdk/ucsfilter.py on lines 134..135

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

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

        out_str += ("-" * len("ClassId")).ljust(ts * 4) + "-" * len(
            self.class_id) + "\n"
Severity: Major
Found in ucsmsdk/ucscoreutils.py and 1 other location - About 2 hrs to fix
ucsmsdk/ucscoremeta.py on lines 340..341

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

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

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

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

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

Refactorings

Further Reading

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

        if "\\" in val:
            value = 'r"' + str(val) + '"'
        else:
            value = '"' + str(val) + '"'
Severity: Major
Found in ucsmsdk/utils/converttopython.py and 1 other location - About 2 hrs to fix
ucsmsdk/utils/converttopython.py on lines 334..337

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

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

        type_exp = pp.Group(pp.Literal("type") + pp.Literal(
            "=") + quote + types_ + quote).setResultsName("type_exp")
Severity: Major
Found in ucsmsdk/ucsfilter.py and 1 other location - About 2 hrs to fix
ucsmsdk/ucsfilter.py on lines 136..137

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

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

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

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

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

Refactorings

Further Reading

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

                    if "\\" in val:
                        value = 'r"' + str(val) + '"'
                    else:
                        value = '"' + str(val) + '"'
Severity: Major
Found in ucsmsdk/utils/converttopython.py and 1 other location - About 2 hrs to fix
ucsmsdk/utils/converttopython.py on lines 320..323

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

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

        out_str += ("-" * len("Property")).ljust(ts * 4) + "-" * len(
            self.name) + "\n"
Severity: Major
Found in ucsmsdk/ucscoremeta.py and 1 other location - About 2 hrs to fix
ucsmsdk/ucscoreutils.py on lines 542..543

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

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

    @staticmethod
    def and_operator(toks):
        """
        method to support logical 'and' operator expression
        """
Severity: Major
Found in ucsmsdk/ucsfilter.py and 1 other location - About 2 hrs to fix
ucsmsdk/ucsfilter.py on lines 97..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 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 2 locations. Consider refactoring.
Open

    @staticmethod
    def or_operator(toks):
        """
        method to support logical 'or' operator expression
        """
Severity: Major
Found in ucsmsdk/ucsfilter.py and 1 other location - About 2 hrs to fix
ucsmsdk/ucsfilter.py on lines 86..95

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

        out_str += str("pattern").ljust(ts * 4) + ':' + str(
            self.restriction.pattern) + "\n"
Severity: Major
Found in ucsmsdk/ucscoremeta.py and 3 other locations - About 1 hr to fix
ucsmsdk/ucscoremeta.py on lines 350..351
ucsmsdk/ucscoremeta.py on lines 352..353
ucsmsdk/ucscoremeta.py on lines 356..357

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

def sp_deassoc_wait(mo):
    # ###########################################
    # Create a Event handler to monitor sp assoc
    # ###########################################
    log.debug("sp_deassoc_wait")
Severity: Major
Found in samples/sp_assoc_deassoc_with_events.py and 1 other location - About 1 hr to fix
samples/sp_assoc_deassoc_with_events.py on lines 79..88

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

        out_str += str("max_length").ljust(ts * 4) + ':' + str(
            self.restriction.max_length) + "\n"
Severity: Major
Found in ucsmsdk/ucscoremeta.py and 3 other locations - About 1 hr to fix
ucsmsdk/ucscoremeta.py on lines 350..351
ucsmsdk/ucscoremeta.py on lines 354..355
ucsmsdk/ucscoremeta.py on lines 356..357

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

def sp_assoc_wait(mo):
    # ###########################################
    # Create a Event handler to monitor sp assoc
    # ###########################################
    log.debug("sp_assoc_wait")
Severity: Major
Found in samples/sp_assoc_deassoc_with_events.py and 1 other location - About 1 hr to fix
samples/sp_assoc_deassoc_with_events.py on lines 101..110

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

        out_str += str("value_set").ljust(ts * 4) + ':' + str(
            self.restriction.value_set) + "\n"
Severity: Major
Found in ucsmsdk/ucscoremeta.py and 3 other locations - About 1 hr to fix
ucsmsdk/ucscoremeta.py on lines 350..351
ucsmsdk/ucscoremeta.py on lines 352..353
ucsmsdk/ucscoremeta.py on lines 354..355

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

        out_str += str("min_length").ljust(ts * 4) + ':' + str(
            self.restriction.min_length) + "\n"
Severity: Major
Found in ucsmsdk/ucscoremeta.py and 3 other locations - About 1 hr to fix
ucsmsdk/ucscoremeta.py on lines 352..353
ucsmsdk/ucscoremeta.py on lines 354..355
ucsmsdk/ucscoremeta.py on lines 356..357

Duplicated Code

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

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

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

Tuning

This issue has a mass of 49.

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

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

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

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

Refactorings

Further Reading

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

        out_str += str("file_description").ljust(tab_size * 4) + ':' + str(
            self.file_description) + "\n"
Severity: Major
Found in ucsmsdk/utils/ccoimage.py and 17 other locations - About 1 hr to fix
ucsmsdk/utils/ccoimage.py on lines 68..69
ucsmsdk/utils/ccoimage.py on lines 70..71
ucsmsdk/utils/ccoimage.py on lines 72..72
ucsmsdk/utils/ccoimage.py on lines 73..74
ucsmsdk/utils/ccoimage.py on lines 75..76
ucsmsdk/utils/ccoimage.py on lines 77..78
ucsmsdk/utils/ccoimage.py on lines 81..82
ucsmsdk/utils/ccoimage.py on lines 83..84
ucsmsdk/ucscoremeta.py on lines 342..343
ucsmsdk/ucscoremeta.py on lines 344..345
ucsmsdk/ucscoremeta.py on lines 346..347
ucsmsdk/ucscoreutils.py on lines 544..545
ucsmsdk/ucscoreutils.py on lines 546..547
ucsmsdk/ucscoreutils.py on lines 548..549
ucsmsdk/ucscoreutils.py on lines 550..550
ucsmsdk/ucscoreutils.py on lines 551..552
ucsmsdk/ucscoreutils.py on lines 553..553

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

        out_str += str("access").ljust(ts * 4) + ':' + str(self.access) + "\n"
Severity: Major
Found in ucsmsdk/ucscoreutils.py and 17 other locations - About 1 hr to fix
ucsmsdk/utils/ccoimage.py on lines 68..69
ucsmsdk/utils/ccoimage.py on lines 70..71
ucsmsdk/utils/ccoimage.py on lines 72..72
ucsmsdk/utils/ccoimage.py on lines 73..74
ucsmsdk/utils/ccoimage.py on lines 75..76
ucsmsdk/utils/ccoimage.py on lines 77..78
ucsmsdk/utils/ccoimage.py on lines 79..80
ucsmsdk/utils/ccoimage.py on lines 81..82
ucsmsdk/utils/ccoimage.py on lines 83..84
ucsmsdk/ucscoremeta.py on lines 342..343
ucsmsdk/ucscoremeta.py on lines 344..345
ucsmsdk/ucscoremeta.py on lines 346..347
ucsmsdk/ucscoreutils.py on lines 544..545
ucsmsdk/ucscoreutils.py on lines 546..547
ucsmsdk/ucscoreutils.py on lines 548..549
ucsmsdk/ucscoreutils.py on lines 551..552
ucsmsdk/ucscoreutils.py on lines 553..553

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

        out_str += str("access_privilege").ljust(ts * 4) + ':' + str(
            self.access_privilege) + "\n"
Severity: Major
Found in ucsmsdk/ucscoreutils.py and 17 other locations - About 1 hr to fix
ucsmsdk/utils/ccoimage.py on lines 68..69
ucsmsdk/utils/ccoimage.py on lines 70..71
ucsmsdk/utils/ccoimage.py on lines 72..72
ucsmsdk/utils/ccoimage.py on lines 73..74
ucsmsdk/utils/ccoimage.py on lines 75..76
ucsmsdk/utils/ccoimage.py on lines 77..78
ucsmsdk/utils/ccoimage.py on lines 79..80
ucsmsdk/utils/ccoimage.py on lines 81..82
ucsmsdk/utils/ccoimage.py on lines 83..84
ucsmsdk/ucscoremeta.py on lines 342..343
ucsmsdk/ucscoremeta.py on lines 344..345
ucsmsdk/ucscoremeta.py on lines 346..347
ucsmsdk/ucscoreutils.py on lines 544..545
ucsmsdk/ucscoreutils.py on lines 546..547
ucsmsdk/ucscoreutils.py on lines 548..549
ucsmsdk/ucscoreutils.py on lines 550..550
ucsmsdk/ucscoreutils.py on lines 553..553

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

        out_str += str("min_version").ljust(ts * 4) + ':' + str(
            self.version) + "\n"
Severity: Major
Found in ucsmsdk/ucscoremeta.py and 17 other locations - About 1 hr to fix
ucsmsdk/utils/ccoimage.py on lines 68..69
ucsmsdk/utils/ccoimage.py on lines 70..71
ucsmsdk/utils/ccoimage.py on lines 72..72
ucsmsdk/utils/ccoimage.py on lines 73..74
ucsmsdk/utils/ccoimage.py on lines 75..76
ucsmsdk/utils/ccoimage.py on lines 77..78
ucsmsdk/utils/ccoimage.py on lines 79..80
ucsmsdk/utils/ccoimage.py on lines 81..82
ucsmsdk/utils/ccoimage.py on lines 83..84
ucsmsdk/ucscoremeta.py on lines 342..343
ucsmsdk/ucscoremeta.py on lines 344..345
ucsmsdk/ucscoreutils.py on lines 544..545
ucsmsdk/ucscoreutils.py on lines 546..547
ucsmsdk/ucscoreutils.py on lines 548..549
ucsmsdk/ucscoreutils.py on lines 550..550
ucsmsdk/ucscoreutils.py on lines 551..552
ucsmsdk/ucscoreutils.py on lines 553..553

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

        out_str += str("version").ljust(tab_size * 4) + ':' + str(
            self.version) + "\n"
Severity: Major
Found in ucsmsdk/utils/ccoimage.py and 17 other locations - About 1 hr to fix
ucsmsdk/utils/ccoimage.py on lines 68..69
ucsmsdk/utils/ccoimage.py on lines 72..72
ucsmsdk/utils/ccoimage.py on lines 73..74
ucsmsdk/utils/ccoimage.py on lines 75..76
ucsmsdk/utils/ccoimage.py on lines 77..78
ucsmsdk/utils/ccoimage.py on lines 79..80
ucsmsdk/utils/ccoimage.py on lines 81..82
ucsmsdk/utils/ccoimage.py on lines 83..84
ucsmsdk/ucscoremeta.py on lines 342..343
ucsmsdk/ucscoremeta.py on lines 344..345
ucsmsdk/ucscoremeta.py on lines 346..347
ucsmsdk/ucscoreutils.py on lines 544..545
ucsmsdk/ucscoreutils.py on lines 546..547
ucsmsdk/ucscoreutils.py on lines 548..549
ucsmsdk/ucscoreutils.py on lines 550..550
ucsmsdk/ucscoreutils.py on lines 551..552
ucsmsdk/ucscoreutils.py on lines 553..553

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language