| Conditions | 3 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | """binary representation modes used for a StarStruct object.""" |
||
| 15 | 1 | def to_byteorder(self): |
|
| 16 | """ |
||
| 17 | Convert a Mode to a byteorder string such as required by the |
||
| 18 | to_bytes() or from_bytes() functions. |
||
| 19 | """ |
||
| 20 | 1 | if self == Mode.Native: |
|
| 21 | 1 | return sys.byteorder |
|
| 22 | 1 | elif self == Mode.Little: |
|
| 23 | 1 | return 'little' |
|
| 24 | else: # Big or Network |
||
| 25 | 1 | return 'big' |
|
| 26 | |||
| 42 |