source.compile   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 2

1 Function

Rating   Name   Duplication   Size   Complexity  
A compiler() 0 7 2
1
import struct
2
3
from source.io_library import output_writer
4
5
6
def compiler(object_dict: dict, output_path: str, mode: str):
7
    header_list = list(object_dict.keys())
8
    header_list.sort()
9
    for memory_location in header_list:
10
        integer = int(object_dict[memory_location], 16)
11
        object_dict[memory_location] = struct.pack('>i', integer)
12
    output_writer(output_path, header_list, object_dict, mode)
13