Skip to content

Commit 3ff7353

Browse files
committed
Bfix (#41): Fixes grammatical errors in loklak.py
1 parent a1197d1 commit 3ff7353

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

loklak.py

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ def user(self, name=None, followers=None, following=None):
139139
return json.dumps(return_to_user)
140140
else:
141141
return_to_user = {}
142-
return_to_user['error'] = ('No user name given to query. Please '
143-
'check and try again')
142+
return_to_user['error'] = ('No user name given to query. Please'
143+
' check and try again')
144144
return json.dumps(return_to_user)
145145

146146
def settings(self):
@@ -152,8 +152,8 @@ def settings(self):
152152
return return_to_user.json()
153153
else:
154154
return_to_user = {}
155-
return_to_user['error'] = 'This API has access restrictions: \
156-
only localhost clients are granted.'
155+
return_to_user['error'] = 'This API has access restrictions:'
156+
' only localhost clients are granted.')
157157
return json.dumps(return_to_user)
158158

159159
def search(self, query=None, since=None, until=None, from_user=None, count=None):
@@ -181,13 +181,13 @@ def search(self, query=None, since=None, until=None, from_user=None, count=None)
181181
return return_to_user.json()
182182
else:
183183
return_to_user = {}
184-
return_to_user['error'] = ('Something went wrong, Looks like'
184+
return_to_user['error'] = ('Something went wrong, looks like'
185185
' the server is down.')
186186
return json.dumps(return_to_user)
187187
else:
188188
return_to_user = {}
189189
return_to_user['error'] = ('No Query string has been'
190-
' given to run a query for')
190+
' given to query for an account')
191191
return json.dumps(return_to_user)
192192

193193
def suggest(self, query=None, count=None, order=None, orderby=None,since=None, until=None):
@@ -211,7 +211,8 @@ def suggest(self, query=None, count=None, order=None, orderby=None,since=None, u
211211
return return_to_user.json()
212212
else :
213213
return_to_user = {}
214-
return_to_user['error'] = ('Something went wrong, looks like the server is down.')
214+
return_to_user['error'] = ('Something went wrong,'
215+
' looks like the server is down.')
215216
return json.dumps(return_to_user)
216217

217218
def aggregations(self, query=None, since=None, until=None,
@@ -245,13 +246,13 @@ def aggregations(self, query=None, since=None, until=None,
245246
return return_to_user
246247
else:
247248
return_to_user = {}
248-
return_to_user['error'] = ('Something went wrong, '
249-
'Looks like the server is down.')
249+
return_to_user['error'] = ('Something went wrong,'
250+
' looks like the server is down.')
250251
return json.dumps(return_to_user)
251252
else:
252253
return_to_user = {}
253-
return_to_user['error'] = 'No Query string has been given to run an\
254-
aggregation query for'
254+
return_to_user['error'] = ('No Query string has been given to run'
255+
'query for aggregations')
255256
return json.dumps(return_to_user)
256257

257258
def account(self, name=None, action=None, data=None):
@@ -276,8 +277,8 @@ def account(self, name=None, action=None, data=None):
276277
return return_to_user.json()
277278
else:
278279
return_to_user = {}
279-
return_to_user['error'] = ('Something went wrong, '
280-
'Looks query is wrong.')
280+
return_to_user['error'] = ('Something went wrong,'
281+
' looks like the query is wrong.')
281282
return json.dumps(return_to_user)
282283
# if action = update and data is provided, then make request
283284
elif self.action == 'update' and data:
@@ -291,10 +292,15 @@ def account(self, name=None, action=None, data=None):
291292
else:
292293
return_to_user = {}
293294
return_to_user['error'] = ('Something went wrong,'
294-
' Looks query is wrong.')
295+
' looks like the query is wrong.')
295296
return json.dumps(return_to_user)
296297
else:
297298
return_to_user = {}
298299
return_to_user['error'] = ('No Query string has been given'
299-
' to run an query for account')
300+
' given to query for an account')
301+
return json.dumps(return_to_user)
302+
else:
303+
return_to_user = {}
304+
return_to_user['error'] = ('No Query string has been given'
305+
' to query for an account')
300306
return json.dumps(return_to_user)

0 commit comments

Comments
 (0)