Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DuniterPy
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
python
DuniterPy
Commits
e32b6943
Commit
e32b6943
authored
6 years ago
by
Vincent Texier
Browse files
Options
Downloads
Patches
Plain Diff
[enh]
#91
fix pylint alerts in documents.transaction module
Remove some alerts
parent
a011bf12
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!65
Pylint
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+1
-1
1 addition, 1 deletion
Makefile
duniterpy/documents/transaction.py
+19
-19
19 additions, 19 deletions
duniterpy/documents/transaction.py
with
20 additions
and
20 deletions
Makefile
+
1
−
1
View file @
e32b6943
...
...
@@ -17,4 +17,4 @@ mypy:
# check code errors
pylint
:
pylint
--disable
=
C,R0913,R0903
--enable
=
C0121,C0202,C0321
--jobs
=
0 duniterpy/
pylint
--disable
=
C,R0913,R0903
,R0902,R0914
--enable
=
C0121,C0202,C0321
--jobs
=
0 duniterpy/
This diff is collapsed.
Click to expand it.
duniterpy/documents/transaction.py
+
19
−
19
View file @
e32b6943
...
...
@@ -339,16 +339,16 @@ class UnlockParameter:
:param parameter: Parameter string
:return:
"""
result
=
None
sig_param
=
SIGParameter
.
from_parameter
(
parameter
)
if
sig_param
:
re
turn
sig_param
re
sult
=
sig_param
else
:
xhx_param
=
XHXParameter
.
from_parameter
(
parameter
)
if
xhx_param
:
re
turn
xhx_param
re
sult
=
xhx_param
return
None
return
result
def
compute
(
self
):
pass
...
...
@@ -605,23 +605,23 @@ Comment: {comment}
unlocks
=
[]
outputs
=
[]
signatures
=
[]
for
i
in
range
(
0
,
issuers_num
):
issuer
=
Transaction
.
parse_field
(
"
Pubkey
"
,
lines
[
n
])
for
i
ndex
in
range
(
0
,
issuers_num
):
issuer
=
Transaction
.
parse_field
(
"
Pubkey
"
,
lines
[
n
+
index
])
issuers
.
append
(
issuer
)
n
+=
1
n
+=
issuers_num
for
i
in
range
(
0
,
inputs_num
):
input_source
=
InputSource
.
from_inline
(
lines
[
n
])
for
i
ndex
in
range
(
0
,
inputs_num
):
input_source
=
InputSource
.
from_inline
(
lines
[
n
+
index
])
inputs
.
append
(
input_source
)
n
+=
1
n
+=
inputs_num
for
i
in
range
(
0
,
unlocks_num
):
unlock
=
Unlock
.
from_inline
(
lines
[
n
])
for
i
ndex
in
range
(
0
,
unlocks_num
):
unlock
=
Unlock
.
from_inline
(
lines
[
n
+
index
])
unlocks
.
append
(
unlock
)
n
+=
1
n
+=
unlocks_num
for
i
in
range
(
0
,
outputs_num
):
output_source
=
OutputSource
.
from_inline
(
lines
[
n
])
for
i
ndex
in
range
(
0
,
outputs_num
):
output_source
=
OutputSource
.
from_inline
(
lines
[
n
+
index
])
outputs
.
append
(
output_source
)
n
+=
1
...
...
@@ -760,15 +760,15 @@ Currency: {1}
Return a transaction in its compact format from the instance
:return:
"""
""
"
TX:VERSION:NB_ISSUERS:NB_INPUTS:NB_UNLOCKS:NB_OUTPUTS:HAS_COMMENT:LOCKTIME
"
TX:VERSION:NB_ISSUERS:NB_INPUTS:NB_UNLOCKS:NB_OUTPUTS:HAS_COMMENT:LOCKTIME
PUBLIC_KEY:INDEX
...
INDEX
:
SOURCE
:
FINGERPRINT
:
AMOUNT
...
PUBLIC_KEY
:
AMOUNT
...
COMMENT
COMMENT
"
"""
doc =
"
TX
:{
0
}:{
1
}:{
2
}:{
3
}:{
4
}:{
5
}:{
6
}
\
n
"
.format(self.version,
len(self.issuers),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment