source.cleaner   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

1 Function

Rating   Name   Duplication   Size   Complexity  
A cleaner() 0 12 5
1
def cleaner(source: str):
2
    lines = source.split('\n')
3
    for i in range(len(lines)):
4
        strings = lines[i].split()
5
        for string in strings:
6
            if string[0] == ';':
7
                index = strings.index(string)
8
                delete = strings[index:]
9
                for item in delete:
10
                    strings.remove(item)
11
        lines[i] = ' '.join(strings)
12
    return '\n'.join(lines)
13