kontron/python-ipmi

View on GitHub
pyipmi/msgs/dcmi.py

Summary

Maintainability
D
2 days
Test Coverage

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

@register_message_class
class GetPowerReadingReq(DcmiMessage):
    __cmdid__ = constants.CMDID_GET_POWER_READING
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/dcmi.py and 1 other location - About 2 hrs to fix
pyipmi/msgs/picmg.py on lines 439..447

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

@register_message_class
class GetPowerLimitRsp(DcmiMessage):
    __cmdid__ = constants.CMDID_GET_POWER_LIMIT
    __netfn__ = constants.NETFN_GROUP_EXTENSION | 1
    __not_implemented__ = True
Severity: Major
Found in pyipmi/msgs/dcmi.py and 6 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 123..130
pyipmi/msgs/dcmi.py on lines 144..151
pyipmi/msgs/dcmi.py on lines 165..172
pyipmi/msgs/dcmi.py on lines 212..219
pyipmi/msgs/dcmi.py on lines 233..240
pyipmi/msgs/dcmi.py on lines 254..261

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

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

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

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

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

Refactorings

Further Reading

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

@register_message_class
class SetAssetTagRsp(DcmiMessage):
    __cmdid__ = constants.CMDID_SET_ASSET_TAG
    __netfn__ = constants.NETFN_GROUP_EXTENSION | 1
    __not_implemented__ = True
Severity: Major
Found in pyipmi/msgs/dcmi.py and 6 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 102..109
pyipmi/msgs/dcmi.py on lines 123..130
pyipmi/msgs/dcmi.py on lines 144..151
pyipmi/msgs/dcmi.py on lines 165..172
pyipmi/msgs/dcmi.py on lines 233..240
pyipmi/msgs/dcmi.py on lines 254..261

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

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

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

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

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

Refactorings

Further Reading

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

@register_message_class
class SetPowerLimitRsp(DcmiMessage):
    __cmdid__ = constants.CMDID_SET_POWER_LIMIT
    __netfn__ = constants.NETFN_GROUP_EXTENSION | 1
    __not_implemented__ = True
Severity: Major
Found in pyipmi/msgs/dcmi.py and 6 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 102..109
pyipmi/msgs/dcmi.py on lines 144..151
pyipmi/msgs/dcmi.py on lines 165..172
pyipmi/msgs/dcmi.py on lines 212..219
pyipmi/msgs/dcmi.py on lines 233..240
pyipmi/msgs/dcmi.py on lines 254..261

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

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

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

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

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

Refactorings

Further Reading

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

@register_message_class
class GetActivateDeactivatePowerLimitRsp(DcmiMessage):
    __cmdid__ = constants.CMDID_ACTIVATE_DEACTIVATE_POWER_LIMIT
    __netfn__ = constants.NETFN_GROUP_EXTENSION | 1
    __not_implemented__ = True
Severity: Major
Found in pyipmi/msgs/dcmi.py and 6 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 102..109
pyipmi/msgs/dcmi.py on lines 123..130
pyipmi/msgs/dcmi.py on lines 165..172
pyipmi/msgs/dcmi.py on lines 212..219
pyipmi/msgs/dcmi.py on lines 233..240
pyipmi/msgs/dcmi.py on lines 254..261

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

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

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

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

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

Refactorings

Further Reading

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

@register_message_class
class GetManagementControllerIdStringRsp(DcmiMessage):
    __cmdid__ = constants.CMDID_GET_MANAGEMENT_CONTROLLER_ID_STRING
    __netfn__ = constants.NETFN_GROUP_EXTENSION | 1
    __not_implemented__ = True
Severity: Major
Found in pyipmi/msgs/dcmi.py and 6 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 102..109
pyipmi/msgs/dcmi.py on lines 123..130
pyipmi/msgs/dcmi.py on lines 144..151
pyipmi/msgs/dcmi.py on lines 165..172
pyipmi/msgs/dcmi.py on lines 212..219
pyipmi/msgs/dcmi.py on lines 254..261

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

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

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

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

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

Refactorings

Further Reading

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

@register_message_class
class GetAssetTagRsp(DcmiMessage):
    __cmdid__ = constants.CMDID_GET_ASSET_TAG
    __netfn__ = constants.NETFN_GROUP_EXTENSION | 1
    __not_implemented__ = True
Severity: Major
Found in pyipmi/msgs/dcmi.py and 6 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 102..109
pyipmi/msgs/dcmi.py on lines 123..130
pyipmi/msgs/dcmi.py on lines 144..151
pyipmi/msgs/dcmi.py on lines 212..219
pyipmi/msgs/dcmi.py on lines 233..240
pyipmi/msgs/dcmi.py on lines 254..261

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

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

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

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

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

Refactorings

Further Reading

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

@register_message_class
class SetManagementControllerIdStringRsp(DcmiMessage):
    __cmdid__ = constants.CMDID_SET_MANAGEMENT_CONTROLLER_ID_STRING
    __netfn__ = constants.NETFN_GROUP_EXTENSION | 1
    __not_implemented__ = True
Severity: Major
Found in pyipmi/msgs/dcmi.py and 6 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 102..109
pyipmi/msgs/dcmi.py on lines 123..130
pyipmi/msgs/dcmi.py on lines 144..151
pyipmi/msgs/dcmi.py on lines 165..172
pyipmi/msgs/dcmi.py on lines 212..219
pyipmi/msgs/dcmi.py on lines 233..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 46.

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

@register_message_class
class GetDcmiCapabilitiesReq(DcmiMessage):
    __cmdid__ = constants.CMDID_GET_DCMI_CAPABILITIES_INFO
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/dcmi.py and 16 other locations - About 1 hr to fix
pyipmi/msgs/picmg.py on lines 129..135
pyipmi/msgs/picmg.py on lines 206..212
pyipmi/msgs/picmg.py on lines 260..266
pyipmi/msgs/picmg.py on lines 305..311
pyipmi/msgs/picmg.py on lines 326..332
pyipmi/msgs/picmg.py on lines 413..419
pyipmi/msgs/picmg.py on lines 461..467
pyipmi/msgs/picmg.py on lines 773..779
pyipmi/msgs/vita.py on lines 96..102
pyipmi/msgs/vita.py on lines 187..193
pyipmi/msgs/vita.py on lines 376..382
pyipmi/msgs/vita.py on lines 423..429
pyipmi/msgs/vita.py on lines 444..450
pyipmi/msgs/vita.py on lines 471..477
pyipmi/msgs/vita.py on lines 499..505
pyipmi/msgs/vita.py on lines 520..526

Duplicated Code

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

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

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

Tuning

This issue has a mass of 38.

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

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

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

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

Refactorings

Further Reading

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

@register_message_class
class SetPowerLimitReq(DcmiMessage):
    __cmdid__ = constants.CMDID_SET_POWER_LIMIT
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __not_implemented__ = True
Severity: Major
Found in pyipmi/msgs/dcmi.py and 6 other locations - About 55 mins to fix
pyipmi/msgs/dcmi.py on lines 92..98
pyipmi/msgs/dcmi.py on lines 134..140
pyipmi/msgs/dcmi.py on lines 155..161
pyipmi/msgs/dcmi.py on lines 202..208
pyipmi/msgs/dcmi.py on lines 223..229
pyipmi/msgs/dcmi.py on lines 244..250

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

@register_message_class
class GetManagementControllerIdStringReq(DcmiMessage):
    __cmdid__ = constants.CMDID_GET_MANAGEMENT_CONTROLLER_ID_STRING
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __not_implemented__ = True
Severity: Major
Found in pyipmi/msgs/dcmi.py and 6 other locations - About 55 mins to fix
pyipmi/msgs/dcmi.py on lines 92..98
pyipmi/msgs/dcmi.py on lines 113..119
pyipmi/msgs/dcmi.py on lines 134..140
pyipmi/msgs/dcmi.py on lines 155..161
pyipmi/msgs/dcmi.py on lines 202..208
pyipmi/msgs/dcmi.py on lines 244..250

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

@register_message_class
class GetPowerLimitReq(DcmiMessage):
    __cmdid__ = constants.CMDID_GET_POWER_LIMIT
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __not_implemented__ = True
Severity: Major
Found in pyipmi/msgs/dcmi.py and 6 other locations - About 55 mins to fix
pyipmi/msgs/dcmi.py on lines 113..119
pyipmi/msgs/dcmi.py on lines 134..140
pyipmi/msgs/dcmi.py on lines 155..161
pyipmi/msgs/dcmi.py on lines 202..208
pyipmi/msgs/dcmi.py on lines 223..229
pyipmi/msgs/dcmi.py on lines 244..250

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

@register_message_class
class SetManagementControllerIdStringReq(DcmiMessage):
    __cmdid__ = constants.CMDID_SET_MANAGEMENT_CONTROLLER_ID_STRING
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __not_implemented__ = True
Severity: Major
Found in pyipmi/msgs/dcmi.py and 6 other locations - About 55 mins to fix
pyipmi/msgs/dcmi.py on lines 92..98
pyipmi/msgs/dcmi.py on lines 113..119
pyipmi/msgs/dcmi.py on lines 134..140
pyipmi/msgs/dcmi.py on lines 155..161
pyipmi/msgs/dcmi.py on lines 202..208
pyipmi/msgs/dcmi.py on lines 223..229

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

@register_message_class
class GetAssetTagReq(DcmiMessage):
    __cmdid__ = constants.CMDID_GET_ASSET_TAG
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __not_implemented__ = True
Severity: Major
Found in pyipmi/msgs/dcmi.py and 6 other locations - About 55 mins to fix
pyipmi/msgs/dcmi.py on lines 92..98
pyipmi/msgs/dcmi.py on lines 113..119
pyipmi/msgs/dcmi.py on lines 134..140
pyipmi/msgs/dcmi.py on lines 202..208
pyipmi/msgs/dcmi.py on lines 223..229
pyipmi/msgs/dcmi.py on lines 244..250

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

@register_message_class
class SetAssetTagReq(DcmiMessage):
    __cmdid__ = constants.CMDID_SET_ASSET_TAG
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __not_implemented__ = True
Severity: Major
Found in pyipmi/msgs/dcmi.py and 6 other locations - About 55 mins to fix
pyipmi/msgs/dcmi.py on lines 92..98
pyipmi/msgs/dcmi.py on lines 113..119
pyipmi/msgs/dcmi.py on lines 134..140
pyipmi/msgs/dcmi.py on lines 155..161
pyipmi/msgs/dcmi.py on lines 223..229
pyipmi/msgs/dcmi.py on lines 244..250

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

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

@register_message_class
class GetActivateDeactivatePowerLimitReq(DcmiMessage):
    __cmdid__ = constants.CMDID_ACTIVATE_DEACTIVATE_POWER_LIMIT
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __not_implemented__ = True
Severity: Major
Found in pyipmi/msgs/dcmi.py and 6 other locations - About 55 mins to fix
pyipmi/msgs/dcmi.py on lines 92..98
pyipmi/msgs/dcmi.py on lines 113..119
pyipmi/msgs/dcmi.py on lines 155..161
pyipmi/msgs/dcmi.py on lines 202..208
pyipmi/msgs/dcmi.py on lines 223..229
pyipmi/msgs/dcmi.py on lines 244..250

Duplicated Code

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

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

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

Tuning

This issue has a mass of 37.

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

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

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

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

Refactorings

Further Reading

There are no issues that match your filters.

Category
Status