Skip to content

Commit 979b853

Browse files
author
Kevin Hellemun
committed
Removed plural methods and constatns. (#59)
1 parent 1041e0a commit 979b853

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

bunq/sdk/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def _assert_response_success(self, response):
224224
if response.status_code != self._STATUS_CODE_OK:
225225
raise ExceptionFactory.create_exception_for_response(
226226
response.status_code,
227-
self._fetch_error_messages(response),
227+
self._fetch_all_error_message(response),
228228
self._fetch_response_id(response)
229229
)
230230

@@ -238,7 +238,7 @@ def _create_bunq_response_raw(cls, response):
238238

239239
return BunqResponseRaw(response.content, response.headers)
240240

241-
def _fetch_error_messages(self, response):
241+
def _fetch_all_error_message(self, response):
242242
"""
243243
:type response: requests.Response
244244

bunq/sdk/exception_factory.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class ExceptionFactory:
2323
_FORMAT_RESPONSE_CODE_LINE = 'HTTP Response Code: {}'
2424
_FORMAT_RESPONSE_ID_LINE = 'The response id to help bunq debug: {}'
2525
_FORMAT_ERROR_MESSAGE_LINE = 'Error message: {}'
26-
_GLUE_ERROR_MESSAGES_NEW_LINE = '\n'
27-
_GLUE_ERROR_MESSAGES_STRING_EMPTY = ''
26+
_GLUE_ERROR_MESSAGE_NEW_LINE = '\n'
27+
_GLUE_ERROR_MESSAGE_STRING_EMPTY = ''
2828

2929
@classmethod
3030
def create_exception_for_response(
@@ -111,19 +111,19 @@ def _generate_message_error(cls, response_code, messages, response_id):
111111
.format(response_code)
112112
line_response_id = cls._FORMAT_RESPONSE_ID_LINE.format(response_id)
113113
line_error_message = cls._FORMAT_ERROR_MESSAGE_LINE.format(
114-
cls._GLUE_ERROR_MESSAGES_STRING_EMPTY.join(messages)
114+
cls._GLUE_ERROR_MESSAGE_STRING_EMPTY.join(messages)
115115
)
116116

117-
return cls._glue_messages(
117+
return cls._glue_all_error_message(
118118
[line_response_code, line_response_id, line_error_message]
119119
)
120120

121121
@classmethod
122-
def _glue_messages(cls, messages):
122+
def _glue_all_error_message(cls, messages):
123123
"""
124124
:type messages: list[str]
125125
126126
:rtype: str
127127
"""
128128

129-
return cls._GLUE_ERROR_MESSAGES_NEW_LINE.join(messages)
129+
return cls._GLUE_ERROR_MESSAGE_NEW_LINE.join(messages)

0 commit comments

Comments
 (0)