Skip to content

Commit 3557544

Browse files
committed
fix: remove dead code in hamming_code.py to resolve SIM113
1 parent 840ca00 commit 3557544

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

hashes/hamming_code.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ def emitter_converter(size_par, data):
118118
data_ord.append(None)
119119

120120
# Calculates parity
121-
qtd_bp = 0 # parity bit counter
122121
for bp in range(1, size_par + 1):
123122
# Bit counter one for a given parity
124123
cont_bo = 0
@@ -133,8 +132,6 @@ def emitter_converter(size_par, data):
133132
cont_bo += 1
134133
parity.append(cont_bo % 2)
135134

136-
qtd_bp += 1
137-
138135
# Mount the message
139136
cont_bp = 0 # parity bit counter
140137
for x in range(size_par + len(data)):
@@ -208,7 +205,6 @@ def receptor_converter(size_par, data):
208205
data_ord.append(None)
209206

210207
# Calculates parity
211-
qtd_bp = 0 # parity bit counter
212208
for bp in range(1, size_par + 1):
213209
# Bit counter one for a certain parity
214210
cont_bo = 0
@@ -222,8 +218,6 @@ def receptor_converter(size_par, data):
222218
cont_bo += 1
223219
parity.append(str(cont_bo % 2))
224220

225-
qtd_bp += 1
226-
227221
# Mount the message
228222
cont_bp = 0 # Parity bit counter
229223
for x in range(size_par + len(data_output)):

0 commit comments

Comments
 (0)