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
22a27ac9
Commit
22a27ac9
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
142deada
No related branches found
No related tags found
1 merge request
!60
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 @
22a27ac9
...
@@ -17,4 +17,4 @@ mypy:
...
@@ -17,4 +17,4 @@ mypy:
# check code errors
# check code errors
pylint
:
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 @
22a27ac9
...
@@ -339,16 +339,16 @@ class UnlockParameter:
...
@@ -339,16 +339,16 @@ class UnlockParameter:
:param parameter: Parameter string
:param parameter: Parameter string
:return:
:return:
"""
"""
result
=
None
sig_param
=
SIGParameter
.
from_parameter
(
parameter
)
sig_param
=
SIGParameter
.
from_parameter
(
parameter
)
if
sig_param
:
if
sig_param
:
re
turn
sig_param
re
sult
=
sig_param
else
:
else
:
xhx_param
=
XHXParameter
.
from_parameter
(
parameter
)
xhx_param
=
XHXParameter
.
from_parameter
(
parameter
)
if
xhx_param
:
if
xhx_param
:
re
turn
xhx_param
re
sult
=
xhx_param
return
None
return
result
def
compute
(
self
):
def
compute
(
self
):
pass
pass
...
@@ -605,23 +605,23 @@ Comment: {comment}
...
@@ -605,23 +605,23 @@ Comment: {comment}
unlocks
=
[]
unlocks
=
[]
outputs
=
[]
outputs
=
[]
signatures
=
[]
signatures
=
[]
for
i
in
range
(
0
,
issuers_num
):
for
i
ndex
in
range
(
0
,
issuers_num
):
issuer
=
Transaction
.
parse_field
(
"
Pubkey
"
,
lines
[
n
])
issuer
=
Transaction
.
parse_field
(
"
Pubkey
"
,
lines
[
n
+
index
])
issuers
.
append
(
issuer
)
issuers
.
append
(
issuer
)
n
+=
1
n
+=
issuers_num
for
i
in
range
(
0
,
inputs_num
):
for
i
ndex
in
range
(
0
,
inputs_num
):
input_source
=
InputSource
.
from_inline
(
lines
[
n
])
input_source
=
InputSource
.
from_inline
(
lines
[
n
+
index
])
inputs
.
append
(
input_source
)
inputs
.
append
(
input_source
)
n
+=
1
n
+=
inputs_num
for
i
in
range
(
0
,
unlocks_num
):
for
i
ndex
in
range
(
0
,
unlocks_num
):
unlock
=
Unlock
.
from_inline
(
lines
[
n
])
unlock
=
Unlock
.
from_inline
(
lines
[
n
+
index
])
unlocks
.
append
(
unlock
)
unlocks
.
append
(
unlock
)
n
+=
1
n
+=
unlocks_num
for
i
in
range
(
0
,
outputs_num
):
for
i
ndex
in
range
(
0
,
outputs_num
):
output_source
=
OutputSource
.
from_inline
(
lines
[
n
])
output_source
=
OutputSource
.
from_inline
(
lines
[
n
+
index
])
outputs
.
append
(
output_source
)
outputs
.
append
(
output_source
)
n
+=
1
n
+=
1
...
@@ -760,15 +760,15 @@ Currency: {1}
...
@@ -760,15 +760,15 @@ Currency: {1}
Return a transaction in its compact format from the instance
Return a transaction in its compact format from the instance
:return:
: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
PUBLIC_KEY:INDEX
...
...
INDEX
:
SOURCE
:
FINGERPRINT
:
AMOUNT
INDEX
:
SOURCE
:
FINGERPRINT
:
AMOUNT
...
...
PUBLIC_KEY
:
AMOUNT
PUBLIC_KEY
:
AMOUNT
...
...
COMMENT
COMMENT
"
"""
"""
doc =
"
TX
:{
0
}:{
1
}:{
2
}:{
3
}:{
4
}:{
5
}:{
6
}
\
n
"
.format(self.version,
doc =
"
TX
:{
0
}:{
1
}:{
2
}:{
3
}:{
4
}:{
5
}:{
6
}
\
n
"
.format(self.version,
len(self.issuers),
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