Skip to content
Snippets Groups Projects
Commit e74df1a8 authored by Vincent Texier's avatar Vincent Texier
Browse files

[enh] #91 fix pylint alerts in documents.block module

Remove some alerts
parent e32b6943
No related branches found
No related tags found
1 merge request!65Pylint
......@@ -17,4 +17,4 @@ mypy:
# check code errors
pylint:
pylint --disable=C,R0913,R0903,R0902,R0914 --enable=C0121,C0202,C0321 --jobs=0 duniterpy/
pylint --disable=C,R0913,R0903,R0902,R0914,R0912,R0915 --enable=C0121,C0202,C0321 --jobs=0 duniterpy/
......@@ -354,7 +354,6 @@ The class Block handles Block documents.
header_data = Transaction.re_header.match(lines[n])
if header_data is None:
raise MalformedDocumentError("Compact transaction ({0})".format(lines[n]))
tx_version = int(header_data.group(1))
issuers_num = int(header_data.group(2))
inputs_num = int(header_data.group(3))
unlocks_num = int(header_data.group(4))
......@@ -362,9 +361,9 @@ The class Block handles Block documents.
has_comment = int(header_data.group(6))
sup_lines = 2
tx_max = n + sup_lines + issuers_num * 2 + inputs_num + unlocks_num + outputs_num + has_comment
for i in range(n, tx_max):
tx_lines += lines[n]
n += 1
for index in range(n, tx_max):
tx_lines += lines[n + index]
n += (tx_max - n)
transaction = Transaction.from_compact(currency, tx_lines)
transactions.append(transaction)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment