diff --git a/Makefile b/Makefile index 417a348a9fd3f3b744afcd507c8f39dfd7b842b9..f8035f87252c475cf72c290281906698d9b62122 100644 --- a/Makefile +++ b/Makefile @@ -17,4 +17,4 @@ mypy: # check code errors 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/ diff --git a/duniterpy/api/client.py b/duniterpy/api/client.py index d16c0d1d8bba2e08bd46109c105ed850947c36e5..a1f102a09387e5f384122140dfc8b63f287dcb4a 100644 --- a/duniterpy/api/client.py +++ b/duniterpy/api/client.py @@ -236,12 +236,13 @@ class Client: await parse_response(response, schema) # return the chosen type + result = response # type: Any if rtype == RESPONSE_TEXT: - response = await response.text() + result = await response.text() elif rtype == RESPONSE_JSON: - response = await response.json() + result = await response.json() - return response + return result async def post(self, url_path: str, params: dict = None, rtype: str = RESPONSE_JSON, schema: dict = None) -> Any: """ @@ -267,12 +268,13 @@ class Client: await parse_response(response, schema) # return the chosen type + result = response # type: Any if rtype == RESPONSE_TEXT: - response = await response.text() + result = await response.text() elif rtype == RESPONSE_JSON: - response = await response.json() + result = await response.json() - return response + return result def connect_ws(self, path: str) -> _WSRequestContextManager: """ diff --git a/duniterpy/documents/transaction.py b/duniterpy/documents/transaction.py index 5ee294049010ffeb38e0937c6b873523e3ef7a93..bdd5075c25c8a5a8d8c74558c63ffc8b02a911d7 100644 --- a/duniterpy/documents/transaction.py +++ b/duniterpy/documents/transaction.py @@ -339,7 +339,7 @@ class UnlockParameter: :param parameter: Parameter string :return: """ - result = None + result = None # type: Optional[Union[SIGParameter, XHXParameter]] sig_param = SIGParameter.from_parameter(parameter) if sig_param: result = sig_param