kontron/python-ipmi

View on GitHub

Showing 341 of 341 total issues

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

@register_message_class
class GetShelfAddressInfoRsp(PicmgMessage):
    __cmdid__ = constants.CMDID_GET_SHELF_ADDRESS_INFO
    __netfn__ = constants.NETFN_GROUP_EXTENSION | 1
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/picmg.py and 3 other locations - About 1 hr to fix
pyipmi/msgs/hpm.py on lines 75..82
pyipmi/msgs/picmg.py on lines 195..202
pyipmi/msgs/picmg.py on lines 598..605

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

        Bitfield('ipmb_capabilities', 1,
                 Bitfield.Bit('number_ipmbs', 2, default=0),
                 Bitfield.ReservedBit(2, 0),
                 Bitfield.Bit('max_frequency', 2, default=0),
                 Bitfield.ReservedBit(2, 0)),
Severity: Major
Found in pyipmi/msgs/vita.py and 1 other location - About 1 hr to fix
pyipmi/msgs/vita.py on lines 58..62

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

@register_message_class
class GetSdrRsp(Message):
    __cmdid__ = constants.CMDID_GET_SDR
    __netfn__ = constants.NETFN_STORAGE | 1

Severity: Major
Found in pyipmi/msgs/sdr.py and 2 other locations - About 1 hr to fix
pyipmi/msgs/sel.py on lines 104..111
pyipmi/msgs/sensor.py on lines 68..75

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

Function get_sel_entry has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    def get_sel_entry(self, record_id, reservation=0):
        ENTIRE_RECORD = 0xff
        req = create_request_by_name('GetSelEntry')
        req.reservation_id = reservation
        req.record_id = record_id
Severity: Minor
Found in pyipmi/sel.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 _from_response has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    def _from_response(self, res):
        self.local_state_available = bool(res.led_states.local_avail)
        self.override_enabled = bool(res.led_states.override_en)
        self.lamp_test_enabled = bool(res.led_states.lamp_test_en)

Severity: Minor
Found in pyipmi/picmg.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_and_clear_sel_entry has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

    def get_and_clear_sel_entry(self, record_id):
        """Atomically gets and clears the specified SEL record"""
        while True:
            reservation = self.get_sel_reservation_id()
            try:
Severity: Minor
Found in pyipmi/sel.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

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

@register_message_class
class FruControlReq(PicmgMessage):
    __cmdid__ = constants.CMDID_FRU_CONTROL
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/picmg.py and 13 other locations - About 1 hr to fix
pyipmi/msgs/hpm.py on lines 64..71
pyipmi/msgs/hpm.py on lines 105..112
pyipmi/msgs/hpm.py on lines 149..156
pyipmi/msgs/picmg.py on lines 284..291
pyipmi/msgs/picmg.py on lines 353..360
pyipmi/msgs/picmg.py on lines 385..392
pyipmi/msgs/picmg.py on lines 509..517
pyipmi/msgs/picmg.py on lines 720..727
pyipmi/msgs/vita.py on lines 166..173
pyipmi/msgs/vita.py on lines 209..216
pyipmi/msgs/vita.py on lines 273..280
pyipmi/msgs/vita.py on lines 402..409
pyipmi/msgs/vita.py on lines 544..551

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

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

@register_message_class
class GetFruLedStateReq(PicmgMessage):
    __cmdid__ = constants.CMDID_GET_FRU_LED_STATE
    __netfn__ = constants.NETFN_GROUP_EXTENSION

Severity: Major
Found in pyipmi/msgs/picmg.py and 13 other locations - About 1 hr to fix
pyipmi/msgs/hpm.py on lines 64..71
pyipmi/msgs/hpm.py on lines 105..112
pyipmi/msgs/hpm.py on lines 149..156
pyipmi/msgs/picmg.py on lines 184..191
pyipmi/msgs/picmg.py on lines 284..291
pyipmi/msgs/picmg.py on lines 353..360
pyipmi/msgs/picmg.py on lines 385..392
pyipmi/msgs/picmg.py on lines 720..727
pyipmi/msgs/vita.py on lines 166..173
pyipmi/msgs/vita.py on lines 209..216
pyipmi/msgs/vita.py on lines 273..280
pyipmi/msgs/vita.py on lines 402..409
pyipmi/msgs/vita.py on lines 544..551

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

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

@register_message_class
class VitaFruControlReq(VitaMessage):
    __cmdid__ = constants.CMDID_VITA_FRU_CONTROL
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/vita.py and 13 other locations - About 1 hr to fix
pyipmi/msgs/hpm.py on lines 64..71
pyipmi/msgs/hpm.py on lines 105..112
pyipmi/msgs/hpm.py on lines 149..156
pyipmi/msgs/picmg.py on lines 184..191
pyipmi/msgs/picmg.py on lines 284..291
pyipmi/msgs/picmg.py on lines 353..360
pyipmi/msgs/picmg.py on lines 385..392
pyipmi/msgs/picmg.py on lines 509..517
pyipmi/msgs/picmg.py on lines 720..727
pyipmi/msgs/vita.py on lines 209..216
pyipmi/msgs/vita.py on lines 273..280
pyipmi/msgs/vita.py on lines 402..409
pyipmi/msgs/vita.py on lines 544..551

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

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

@register_message_class
class InitiateUpgradeActionReq(PicmgMessage):
    __cmdid__ = constants.CMDID_HPM_INITIATE_UPGRADE_ACTION
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/hpm.py and 13 other locations - About 1 hr to fix
pyipmi/msgs/hpm.py on lines 64..71
pyipmi/msgs/hpm.py on lines 149..156
pyipmi/msgs/picmg.py on lines 184..191
pyipmi/msgs/picmg.py on lines 284..291
pyipmi/msgs/picmg.py on lines 353..360
pyipmi/msgs/picmg.py on lines 385..392
pyipmi/msgs/picmg.py on lines 509..517
pyipmi/msgs/picmg.py on lines 720..727
pyipmi/msgs/vita.py on lines 166..173
pyipmi/msgs/vita.py on lines 209..216
pyipmi/msgs/vita.py on lines 273..280
pyipmi/msgs/vita.py on lines 402..409
pyipmi/msgs/vita.py on lines 544..551

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

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

@register_message_class
class VitaSetFruActivationReq(VitaMessage):
    __cmdid__ = constants.CMDID_VITA_SET_FRU_ACTIVATION
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/vita.py and 13 other locations - About 1 hr to fix
pyipmi/msgs/hpm.py on lines 64..71
pyipmi/msgs/hpm.py on lines 105..112
pyipmi/msgs/hpm.py on lines 149..156
pyipmi/msgs/picmg.py on lines 184..191
pyipmi/msgs/picmg.py on lines 284..291
pyipmi/msgs/picmg.py on lines 353..360
pyipmi/msgs/picmg.py on lines 385..392
pyipmi/msgs/picmg.py on lines 509..517
pyipmi/msgs/picmg.py on lines 720..727
pyipmi/msgs/vita.py on lines 166..173
pyipmi/msgs/vita.py on lines 209..216
pyipmi/msgs/vita.py on lines 273..280
pyipmi/msgs/vita.py on lines 544..551

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

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

@register_message_class
class SetFruActivationReq(PicmgMessage):
    __cmdid__ = constants.CMDID_SET_FRU_ACTIVATION
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/picmg.py and 13 other locations - About 1 hr to fix
pyipmi/msgs/hpm.py on lines 64..71
pyipmi/msgs/hpm.py on lines 105..112
pyipmi/msgs/hpm.py on lines 149..156
pyipmi/msgs/picmg.py on lines 184..191
pyipmi/msgs/picmg.py on lines 353..360
pyipmi/msgs/picmg.py on lines 385..392
pyipmi/msgs/picmg.py on lines 509..517
pyipmi/msgs/picmg.py on lines 720..727
pyipmi/msgs/vita.py on lines 166..173
pyipmi/msgs/vita.py on lines 209..216
pyipmi/msgs/vita.py on lines 273..280
pyipmi/msgs/vita.py on lines 402..409
pyipmi/msgs/vita.py on lines 544..551

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

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

@register_message_class
class GetPowerChannelStatusReq(PicmgMessage):
    __cmdid__ = constants.CMDID_GET_POWER_CHANNEL_STATUS
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/picmg.py and 13 other locations - About 1 hr to fix
pyipmi/msgs/hpm.py on lines 64..71
pyipmi/msgs/hpm.py on lines 105..112
pyipmi/msgs/hpm.py on lines 149..156
pyipmi/msgs/picmg.py on lines 184..191
pyipmi/msgs/picmg.py on lines 284..291
pyipmi/msgs/picmg.py on lines 353..360
pyipmi/msgs/picmg.py on lines 385..392
pyipmi/msgs/picmg.py on lines 509..517
pyipmi/msgs/vita.py on lines 166..173
pyipmi/msgs/vita.py on lines 209..216
pyipmi/msgs/vita.py on lines 273..280
pyipmi/msgs/vita.py on lines 402..409
pyipmi/msgs/vita.py on lines 544..551

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

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

@register_message_class
class VitaGetFruLedCapabilitiesReq(VitaMessage):
    __cmdid__ = constants.CMDID_VITA_GET_LED_COLOR_CAPABILITIES
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/vita.py and 13 other locations - About 1 hr to fix
pyipmi/msgs/hpm.py on lines 64..71
pyipmi/msgs/hpm.py on lines 105..112
pyipmi/msgs/hpm.py on lines 149..156
pyipmi/msgs/picmg.py on lines 184..191
pyipmi/msgs/picmg.py on lines 284..291
pyipmi/msgs/picmg.py on lines 353..360
pyipmi/msgs/picmg.py on lines 385..392
pyipmi/msgs/picmg.py on lines 509..517
pyipmi/msgs/picmg.py on lines 720..727
pyipmi/msgs/vita.py on lines 166..173
pyipmi/msgs/vita.py on lines 273..280
pyipmi/msgs/vita.py on lines 402..409
pyipmi/msgs/vita.py on lines 544..551

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

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

@register_message_class
class GetComponentPropertiesReq(PicmgMessage):
    __cmdid__ = constants.CMDID_HPM_GET_COMPONENT_PROPERTIES
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/hpm.py and 13 other locations - About 1 hr to fix
pyipmi/msgs/hpm.py on lines 105..112
pyipmi/msgs/hpm.py on lines 149..156
pyipmi/msgs/picmg.py on lines 184..191
pyipmi/msgs/picmg.py on lines 284..291
pyipmi/msgs/picmg.py on lines 353..360
pyipmi/msgs/picmg.py on lines 385..392
pyipmi/msgs/picmg.py on lines 509..517
pyipmi/msgs/picmg.py on lines 720..727
pyipmi/msgs/vita.py on lines 166..173
pyipmi/msgs/vita.py on lines 209..216
pyipmi/msgs/vita.py on lines 273..280
pyipmi/msgs/vita.py on lines 402..409
pyipmi/msgs/vita.py on lines 544..551

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

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

@register_message_class
class GetPowerLevelReq(PicmgMessage):
    __cmdid__ = constants.CMDID_GET_POWER_LEVEL
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/picmg.py and 13 other locations - About 1 hr to fix
pyipmi/msgs/hpm.py on lines 64..71
pyipmi/msgs/hpm.py on lines 105..112
pyipmi/msgs/hpm.py on lines 149..156
pyipmi/msgs/picmg.py on lines 184..191
pyipmi/msgs/picmg.py on lines 284..291
pyipmi/msgs/picmg.py on lines 353..360
pyipmi/msgs/picmg.py on lines 509..517
pyipmi/msgs/picmg.py on lines 720..727
pyipmi/msgs/vita.py on lines 166..173
pyipmi/msgs/vita.py on lines 209..216
pyipmi/msgs/vita.py on lines 273..280
pyipmi/msgs/vita.py on lines 402..409
pyipmi/msgs/vita.py on lines 544..551

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

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

@register_message_class
class FinishFirmwareUploadReq(PicmgMessage):
    __cmdid__ = constants.CMDID_HPM_FINISH_FIRMWARE_UPLOAD
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/hpm.py and 13 other locations - About 1 hr to fix
pyipmi/msgs/hpm.py on lines 64..71
pyipmi/msgs/hpm.py on lines 105..112
pyipmi/msgs/picmg.py on lines 184..191
pyipmi/msgs/picmg.py on lines 284..291
pyipmi/msgs/picmg.py on lines 353..360
pyipmi/msgs/picmg.py on lines 385..392
pyipmi/msgs/picmg.py on lines 509..517
pyipmi/msgs/picmg.py on lines 720..727
pyipmi/msgs/vita.py on lines 166..173
pyipmi/msgs/vita.py on lines 209..216
pyipmi/msgs/vita.py on lines 273..280
pyipmi/msgs/vita.py on lines 402..409
pyipmi/msgs/vita.py on lines 544..551

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

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

@register_message_class
class VitaGetFruLedStateReq(VitaMessage):
    __cmdid__ = constants.CMDID_VITA_GET_FRU_LED_STATE
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/vita.py and 13 other locations - About 1 hr to fix
pyipmi/msgs/hpm.py on lines 64..71
pyipmi/msgs/hpm.py on lines 105..112
pyipmi/msgs/hpm.py on lines 149..156
pyipmi/msgs/picmg.py on lines 184..191
pyipmi/msgs/picmg.py on lines 284..291
pyipmi/msgs/picmg.py on lines 353..360
pyipmi/msgs/picmg.py on lines 385..392
pyipmi/msgs/picmg.py on lines 509..517
pyipmi/msgs/picmg.py on lines 720..727
pyipmi/msgs/vita.py on lines 166..173
pyipmi/msgs/vita.py on lines 209..216
pyipmi/msgs/vita.py on lines 402..409
pyipmi/msgs/vita.py on lines 544..551

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

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

@register_message_class
class VitaSetPayloadModeReq(VitaMessage):
    __cmdid__ = constants.CMDID_VITA_SET_PAYLOAD_MODE
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/vita.py and 13 other locations - About 1 hr to fix
pyipmi/msgs/hpm.py on lines 64..71
pyipmi/msgs/hpm.py on lines 105..112
pyipmi/msgs/hpm.py on lines 149..156
pyipmi/msgs/picmg.py on lines 184..191
pyipmi/msgs/picmg.py on lines 284..291
pyipmi/msgs/picmg.py on lines 353..360
pyipmi/msgs/picmg.py on lines 385..392
pyipmi/msgs/picmg.py on lines 509..517
pyipmi/msgs/picmg.py on lines 720..727
pyipmi/msgs/vita.py on lines 166..173
pyipmi/msgs/vita.py on lines 209..216
pyipmi/msgs/vita.py on lines 273..280
pyipmi/msgs/vita.py on lines 402..409

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

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