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
57bcd7ca
Commit
57bcd7ca
authored
6 years ago
by
Vincent Texier
Browse files
Options
Downloads
Patches
Plain Diff
[enh]
#91
fix code to comply with mypy and pylint
Remove one pylint alert
parent
d942d1a6
No related branches found
No related tags found
1 merge request
!60
Pylint
Pipeline
#5665
passed
6 years ago
Stage: github-sync
Stage: build
Stage: test
Stage: release
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+1
-1
1 addition, 1 deletion
Makefile
duniterpy/api/client.py
+8
-6
8 additions, 6 deletions
duniterpy/api/client.py
duniterpy/documents/transaction.py
+1
-1
1 addition, 1 deletion
duniterpy/documents/transaction.py
with
10 additions
and
8 deletions
Makefile
+
1
−
1
View file @
57bcd7ca
...
@@ -17,4 +17,4 @@ mypy:
...
@@ -17,4 +17,4 @@ mypy:
# check code errors
# check code errors
pylint
:
pylint
:
pylint
--disable
=
C,R0913,R0903,R0902,R0914,R0912,R0915
--enable
=
C0121,C0202,C0321
--jobs
=
0 duniterpy/
pylint
--disable
=
C,R0913,R0903,R0902,R0914,R0912,R0915
,W0613
--enable
=
C0121,C0202,C0321
--jobs
=
0 duniterpy/
This diff is collapsed.
Click to expand it.
duniterpy/api/client.py
+
8
−
6
View file @
57bcd7ca
...
@@ -236,12 +236,13 @@ class Client:
...
@@ -236,12 +236,13 @@ class Client:
await
parse_response
(
response
,
schema
)
await
parse_response
(
response
,
schema
)
# return the chosen type
# return the chosen type
result
=
response
# type: Any
if
rtype
==
RESPONSE_TEXT
:
if
rtype
==
RESPONSE_TEXT
:
res
ponse
=
await
response
.
text
()
res
ult
=
await
response
.
text
()
elif
rtype
==
RESPONSE_JSON
:
elif
rtype
==
RESPONSE_JSON
:
res
ponse
=
await
response
.
json
()
res
ult
=
await
response
.
json
()
return
res
ponse
return
res
ult
async
def
post
(
self
,
url_path
:
str
,
params
:
dict
=
None
,
rtype
:
str
=
RESPONSE_JSON
,
schema
:
dict
=
None
)
->
Any
:
async
def
post
(
self
,
url_path
:
str
,
params
:
dict
=
None
,
rtype
:
str
=
RESPONSE_JSON
,
schema
:
dict
=
None
)
->
Any
:
"""
"""
...
@@ -267,12 +268,13 @@ class Client:
...
@@ -267,12 +268,13 @@ class Client:
await
parse_response
(
response
,
schema
)
await
parse_response
(
response
,
schema
)
# return the chosen type
# return the chosen type
result
=
response
# type: Any
if
rtype
==
RESPONSE_TEXT
:
if
rtype
==
RESPONSE_TEXT
:
res
ponse
=
await
response
.
text
()
res
ult
=
await
response
.
text
()
elif
rtype
==
RESPONSE_JSON
:
elif
rtype
==
RESPONSE_JSON
:
res
ponse
=
await
response
.
json
()
res
ult
=
await
response
.
json
()
return
res
ponse
return
res
ult
def
connect_ws
(
self
,
path
:
str
)
->
_WSRequestContextManager
:
def
connect_ws
(
self
,
path
:
str
)
->
_WSRequestContextManager
:
"""
"""
...
...
This diff is collapsed.
Click to expand it.
duniterpy/documents/transaction.py
+
1
−
1
View file @
57bcd7ca
...
@@ -339,7 +339,7 @@ class UnlockParameter:
...
@@ -339,7 +339,7 @@ class UnlockParameter:
:param parameter: Parameter string
:param parameter: Parameter string
:return:
:return:
"""
"""
result
=
None
result
=
None
# type: Optional[Union[SIGParameter, XHXParameter]]
sig_param
=
SIGParameter
.
from_parameter
(
parameter
)
sig_param
=
SIGParameter
.
from_parameter
(
parameter
)
if
sig_param
:
if
sig_param
:
result
=
sig_param
result
=
sig_param
...
...
This diff is collapsed.
Click to expand it.
Vincent Texier
@vtexier
mentioned in issue
#63 (closed)
·
6 years ago
mentioned in issue
#63 (closed)
mentioned in issue #63
Toggle commit list
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