kontron/python-ipmi

View on GitHub

Showing 252 of 342 total issues

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

@register_message_class
class PartialAddSdrRsp(Message):
    __cmdid__ = constants.CMDID_PARTIAL_ADD_SDR
    __netfn__ = constants.NETFN_STORAGE | 1
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/sdr.py and 9 other locations - About 1 hr to fix
pyipmi/msgs/bmc.py on lines 182..188
pyipmi/msgs/fru.py on lines 88..94
pyipmi/msgs/sdr.py on lines 83..89
pyipmi/msgs/sdr.py on lines 126..132
pyipmi/msgs/sdr.py on lines 171..177
pyipmi/msgs/sel.py on lines 82..88
pyipmi/msgs/sel.py on lines 124..130
pyipmi/msgs/sel.py on lines 144..150
pyipmi/msgs/sensor.py on lines 85..91

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

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

@register_message_class
class ReserveDeviceSdrRepositoryRsp(Message):
    __cmdid__ = constants.CMDID_RESERVE_DEVICE_SDR_REPOSITORY
    __netfn__ = constants.NETFN_SENSOR_EVENT | 1
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/sensor.py and 9 other locations - About 1 hr to fix
pyipmi/msgs/bmc.py on lines 182..188
pyipmi/msgs/fru.py on lines 88..94
pyipmi/msgs/sdr.py on lines 83..89
pyipmi/msgs/sdr.py on lines 126..132
pyipmi/msgs/sdr.py on lines 151..157
pyipmi/msgs/sdr.py on lines 171..177
pyipmi/msgs/sel.py on lines 82..88
pyipmi/msgs/sel.py on lines 124..130
pyipmi/msgs/sel.py on lines 144..150

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

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

@register_message_class
class SetFanLevelRsp(PicmgMessage):
    __cmdid__ = constants.CMDID_SET_FAN_LEVEL
    __netfn__ = constants.NETFN_GROUP_EXTENSION | 1
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/picmg.py and 20 other locations - About 1 hr to fix
pyipmi/msgs/hpm.py on lines 95..101
pyipmi/msgs/hpm.py on lines 116..122
pyipmi/msgs/hpm.py on lines 160..166
pyipmi/msgs/hpm.py on lines 202..208
pyipmi/msgs/hpm.py on lines 263..269
pyipmi/msgs/picmg.py on lines 250..256
pyipmi/msgs/picmg.py on lines 295..301
pyipmi/msgs/picmg.py on lines 499..505
pyipmi/msgs/picmg.py on lines 576..582
pyipmi/msgs/picmg.py on lines 624..630
pyipmi/msgs/picmg.py on lines 710..716
pyipmi/msgs/picmg.py on lines 763..769
pyipmi/msgs/vita.py on lines 86..92
pyipmi/msgs/vita.py on lines 137..143
pyipmi/msgs/vita.py on lines 156..162
pyipmi/msgs/vita.py on lines 177..183
pyipmi/msgs/vita.py on lines 263..269
pyipmi/msgs/vita.py on lines 334..340
pyipmi/msgs/vita.py on lines 366..372
pyipmi/msgs/vita.py on lines 413..419

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

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

@register_message_class
class InitiateUpgradeActionRsp(PicmgMessage):
    __cmdid__ = constants.CMDID_HPM_INITIATE_UPGRADE_ACTION
    __netfn__ = constants.NETFN_GROUP_EXTENSION | 1
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/hpm.py and 20 other locations - About 1 hr to fix
pyipmi/msgs/hpm.py on lines 95..101
pyipmi/msgs/hpm.py on lines 160..166
pyipmi/msgs/hpm.py on lines 202..208
pyipmi/msgs/hpm.py on lines 263..269
pyipmi/msgs/picmg.py on lines 250..256
pyipmi/msgs/picmg.py on lines 295..301
pyipmi/msgs/picmg.py on lines 451..457
pyipmi/msgs/picmg.py on lines 499..505
pyipmi/msgs/picmg.py on lines 576..582
pyipmi/msgs/picmg.py on lines 624..630
pyipmi/msgs/picmg.py on lines 710..716
pyipmi/msgs/picmg.py on lines 763..769
pyipmi/msgs/vita.py on lines 86..92
pyipmi/msgs/vita.py on lines 137..143
pyipmi/msgs/vita.py on lines 156..162
pyipmi/msgs/vita.py on lines 177..183
pyipmi/msgs/vita.py on lines 263..269
pyipmi/msgs/vita.py on lines 334..340
pyipmi/msgs/vita.py on lines 366..372
pyipmi/msgs/vita.py on lines 413..419

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

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

@register_message_class
class VitaSetIpmbStateRsp(VitaMessage):
    __cmdid__ = constants.CMDID_VITA_SET_IPMB_STATE
    __netfn__ = constants.NETFN_GROUP_EXTENSION | 1
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/vita.py and 20 other locations - About 1 hr to fix
pyipmi/msgs/hpm.py on lines 95..101
pyipmi/msgs/hpm.py on lines 116..122
pyipmi/msgs/hpm.py on lines 160..166
pyipmi/msgs/hpm.py on lines 202..208
pyipmi/msgs/hpm.py on lines 263..269
pyipmi/msgs/picmg.py on lines 250..256
pyipmi/msgs/picmg.py on lines 295..301
pyipmi/msgs/picmg.py on lines 451..457
pyipmi/msgs/picmg.py on lines 499..505
pyipmi/msgs/picmg.py on lines 576..582
pyipmi/msgs/picmg.py on lines 624..630
pyipmi/msgs/picmg.py on lines 710..716
pyipmi/msgs/picmg.py on lines 763..769
pyipmi/msgs/vita.py on lines 86..92
pyipmi/msgs/vita.py on lines 137..143
pyipmi/msgs/vita.py on lines 156..162
pyipmi/msgs/vita.py on lines 177..183
pyipmi/msgs/vita.py on lines 263..269
pyipmi/msgs/vita.py on lines 366..372
pyipmi/msgs/vita.py on lines 413..419

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

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

            Bitfield('config', 1,
                     Bitfield.ReservedBit(5, 0),
                     Bitfield.Bit('initial_update_in_progress', 1, 0),
                     Bitfield.Bit('sensor_scanning_disabled', 1, 0),
                     Bitfield.Bit('event_message_disabled', 1, 0),),
Severity: Major
Found in pyipmi/msgs/sensor.py and 1 other location - About 1 hr to fix
pyipmi/msgs/sensor.py on lines 209..213

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

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

@register_message_class
class ManufacturingTestOnRsp(Message):
    __cmdid__ = constants.CMDID_MANUFACTURING_TEST_ON
    __netfn__ = constants.NETFN_APP | 1
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/bmc.py and 4 other locations - About 1 hr to fix
pyipmi/msgs/device_messaging.py on lines 187..193
pyipmi/msgs/device_messaging.py on lines 203..209
pyipmi/msgs/device_messaging.py on lines 229..235
pyipmi/msgs/sel.py on lines 183..189

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

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

        Bitfield('event_receiver', 2,
                 Bitfield.ReservedBit(1, 0),
                 Bitfield.Bit('ipmb_i2c_slave_address', 7, 0),
                 Bitfield.Bit('lun', 2, 0),
                 Bitfield.ReservedBit(6, 0),),
Severity: Major
Found in pyipmi/msgs/event.py and 1 other location - About 1 hr to fix
pyipmi/msgs/event.py on lines 59..63

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

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

@register_message_class
class MasterWriteReadRsp(Message):
    __cmdid__ = constants.CMDID_MASTER_WRITE_READ
    __netfn__ = constants.NETFN_APP | 1
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/device_messaging.py and 4 other locations - About 1 hr to fix
pyipmi/msgs/bmc.py on lines 112..118
pyipmi/msgs/device_messaging.py on lines 187..193
pyipmi/msgs/device_messaging.py on lines 203..209
pyipmi/msgs/sel.py on lines 183..189

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

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('channel', 2,
                 Bitfield.Bit('number', 4, 0),
                 Bitfield.ReservedBit(4, 0),
                 Bitfield.Bit('state', 1, 0),
                 Bitfield.ReservedBit(7, 0),),
Severity: Major
Found in pyipmi/msgs/device_messaging.py and 1 other location - About 1 hr to fix
pyipmi/msgs/device_messaging.py on lines 132..136

Duplicated Code

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

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

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

Tuning

This issue has a mass of 40.

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('timer_use', 1,
                 Bitfield.Bit('timer_use', 3),
                 Bitfield.ReservedBit(3, 0),
                 Bitfield.Bit('is_running', 1, 0),
                 Bitfield.Bit('dont_log', 1, 0),),
Severity: Major
Found in pyipmi/msgs/bmc.py and 1 other location - About 1 hr to fix
pyipmi/msgs/bmc.py on lines 212..216

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

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

        Bitfield('event_receiver', 2,
                 Bitfield.ReservedBit(1, 0),
                 Bitfield.Bit('ipmb_i2c_slave_address', 7, 0),
                 Bitfield.Bit('lun', 2, 0),
                 Bitfield.ReservedBit(6, 0),),
Severity: Major
Found in pyipmi/msgs/event.py and 1 other location - About 1 hr to fix
pyipmi/msgs/event.py on lines 30..34

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

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('channel', 2,
                 Bitfield.Bit('number', 4, 0),
                 Bitfield.ReservedBit(4, 0),
                 Bitfield.Bit('state', 2, 0),
                 Bitfield.ReservedBit(6, 0),),
Severity: Major
Found in pyipmi/msgs/device_messaging.py and 1 other location - About 1 hr to fix
pyipmi/msgs/device_messaging.py on lines 146..150

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

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

@register_message_class
class SendMessageRsp(Message):
    __cmdid__ = constants.CMDID_SEND_MESSAGE
    __netfn__ = constants.NETFN_APP | 1
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/device_messaging.py and 4 other locations - About 1 hr to fix
pyipmi/msgs/bmc.py on lines 112..118
pyipmi/msgs/device_messaging.py on lines 203..209
pyipmi/msgs/device_messaging.py on lines 229..235
pyipmi/msgs/sel.py on lines 183..189

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

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

@register_message_class
class ReadEventMessageBufferRsp(Message):
    __cmdid__ = constants.CMDID_READ_EVENT_MESSAGE_BUFFER
    __netfn__ = constants.NETFN_APP | 1
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/device_messaging.py and 4 other locations - About 1 hr to fix
pyipmi/msgs/bmc.py on lines 112..118
pyipmi/msgs/device_messaging.py on lines 187..193
pyipmi/msgs/device_messaging.py on lines 229..235
pyipmi/msgs/sel.py on lines 183..189

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

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('timer_use', 1,
                 Bitfield.Bit('timer_use', 3),
                 Bitfield.ReservedBit(3, 0),
                 Bitfield.Bit('dont_stop', 1, 0),
                 Bitfield.Bit('dont_log', 1, 0),),
Severity: Major
Found in pyipmi/msgs/bmc.py and 1 other location - About 1 hr to fix
pyipmi/msgs/bmc.py on lines 249..253

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

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

@register_message_class
class GetSelTimeRsp(Message):
    __cmdid__ = constants.CMDID_GET_SEL_TIME
    __netfn__ = constants.NETFN_STORAGE | 1
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/sel.py and 4 other locations - About 1 hr to fix
pyipmi/msgs/bmc.py on lines 112..118
pyipmi/msgs/device_messaging.py on lines 187..193
pyipmi/msgs/device_messaging.py on lines 203..209
pyipmi/msgs/device_messaging.py on lines 229..235

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

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 GetFruLedPropertiesReq(PicmgMessage):
    __cmdid__ = constants.CMDID_GET_FRU_LED_PROPERTIES
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/picmg.py and 16 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 37..43
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 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 17 locations. Consider refactoring.
Open

@register_message_class
class GetFanSpeedPropertiesReq(PicmgMessage):
    __cmdid__ = constants.CMDID_GET_FAN_SPEED_PROPERTIES
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/picmg.py and 16 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 37..43
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 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 17 locations. Consider refactoring.
Open

@register_message_class
class GetFanLevelReq(PicmgMessage):
    __cmdid__ = constants.CMDID_GET_FAN_LEVEL
    __netfn__ = constants.NETFN_GROUP_EXTENSION
    __fields__ = (
Severity: Major
Found in pyipmi/msgs/picmg.py and 16 other locations - About 1 hr to fix
pyipmi/msgs/dcmi.py on lines 37..43
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 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

Severity
Category
Status
Source
Language