Skip to content

Commit e0ff5c4

Browse files
committed
Rename reserved word 'async' in method signatures.
1 parent 117bc18 commit e0ff5c4

6 files changed

Lines changed: 18 additions & 18 deletions

File tree

botanalytics/amazon.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class AmazonAlexa(Envoy):
99

1010
def __init__(self, debug=False, token=None, base_url='https://api.botanalytics.co/v1/',
11-
callback=None, async=False):
11+
callback=None, is_async=False):
1212
"""
1313
:param debug: bool
1414
(default False)
@@ -21,7 +21,7 @@ def __init__(self, debug=False, token=None, base_url='https://api.botanalytics.c
2121
super(AmazonAlexa, self).__init__(debug, token, base_url, callback)
2222
self.__path = 'messages/amazon-alexa/'
2323
self._inform("Logging enabled for AmazonAlexa...")
24-
self.__async = async
24+
self.__async = is_async
2525
if self.__async:
2626
self.__number_of_workers = multiprocessing.cpu_count() * 2
2727
if self.__number_of_workers == 0:
@@ -77,7 +77,7 @@ def __validate(req, resp):
7777
class AmazonAlexaLambda(Envoy):
7878

7979
def __init__(self, debug=False, token=None, base_url='https://api.botanalytics.co/v1/',
80-
async=False):
80+
is_async=False):
8181
"""
8282
:param debug: bool
8383
(default False)
@@ -92,7 +92,7 @@ def __init__(self, debug=False, token=None, base_url='https://api.botanalytics.c
9292
self.__path = 'messages/amazon-alexa/'
9393
self._inform("Logging enabled for AmazonAlexa...")
9494
self.__number_of_workers = multiprocessing.cpu_count()
95-
self.__async = async
95+
self.__async = is_async
9696
if self.__async:
9797
self._inform("Mode: Async...")
9898

botanalytics/facebook.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import time
55

66
class FacebookMessenger(Envoy):
7-
def __init__(self, debug=False, token=None, fb_token=None, base_url='https://api.botanalytics.co/v1/', callback=None, async = False):
7+
def __init__(self, debug=False, token=None, fb_token=None, base_url='https://api.botanalytics.co/v1/', callback=None, is_async=False):
88
"""
99
:param debug: bool
1010
To enable logging
@@ -20,7 +20,7 @@ def __init__(self, debug=False, token=None, fb_token=None, base_url='https://api
2020
self.__fb_token = fb_token
2121
self.__path = "messages/facebook-messenger/"
2222
self.__profile_path = "facebook-messenger/users/"
23-
self.__async = async
23+
self.__async = is_async
2424
self._inform("Debugging enabled for Facebook...")
2525
if self.__async:
2626
self.__number_of_workers = multiprocessing.cpu_count() * 2

botanalytics/generic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
class Generic(Envoy):
77

88
def __init__(self, debug=False, token=None, base_url='https://api.botanalytics.co/v1/',
9-
callback=None, async = False):
9+
callback=None, is_async=False):
1010
"""
1111
:param debug: bool
1212
(default False)
@@ -18,7 +18,7 @@ def __init__(self, debug=False, token=None, base_url='https://api.botanalytics.c
1818
"""
1919
super(Generic, self).__init__(debug, token, base_url, callback)
2020
self._inform("Logging enabled for Generic...")
21-
self.__async = async
21+
self.__async = is_async
2222
if self.__async:
2323
self.__number_of_workers = multiprocessing.cpu_count() * 2
2424
if self.__number_of_workers == 0:

botanalytics/google.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
class GoogleAssistant(Envoy):
77

88
def __init__(self, debug=False, token=None, base_url='https://api.botanalytics.co/v1/',
9-
callback=None, async = False):
9+
callback=None, is_async=False):
1010
"""
1111
:param debug: bool
1212
(default False)
@@ -19,7 +19,7 @@ def __init__(self, debug=False, token=None, base_url='https://api.botanalytics.c
1919
super(GoogleAssistant, self).__init__(debug, token, base_url, callback)
2020
self.__path = 'messages/google-assistant/'
2121
self._inform("Logging enabled for GoogleAssistant...")
22-
self.__async = async
22+
self.__async = is_async
2323
if self.__async:
2424
self.__number_of_workers = multiprocessing.cpu_count() * 2
2525
if self.__number_of_workers == 0:
@@ -87,7 +87,7 @@ def __validate(req, resp):
8787
class GoogleAssistantCloudFunctions(Envoy):
8888

8989
def __init__(self, debug=False, token=None, base_url='https://api.botanalytics.co/v1/',
90-
async=False):
90+
is_async=False):
9191
"""
9292
:param debug: bool
9393
(default False)
@@ -100,7 +100,7 @@ def __init__(self, debug=False, token=None, base_url='https://api.botanalytics.c
100100
super(GoogleAssistantCloudFunctions, self).__init__(debug, token, base_url)
101101
self.__path = 'messages/google-assistant/'
102102
self._inform("Logging enabled for GoogleAssistant...")
103-
self.__async = async
103+
self.__async = is_async
104104
if self.__async:
105105
self._inform("Mode: Async...")
106106

botanalytics/rasa.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
class Rasa(Envoy):
77

88
def __init__(self, debug=False, token=None, base_url='https://api.botanalytics.co/v1/',
9-
callback=None, async = False):
9+
callback=None, is_async=False):
1010
"""
1111
:param debug: bool
1212
(default False)
@@ -18,7 +18,7 @@ def __init__(self, debug=False, token=None, base_url='https://api.botanalytics.c
1818
"""
1919
super(Rasa, self).__init__(debug, token, base_url, callback)
2020
self.__path = "rasa/messages/"
21-
self.__async = async
21+
self.__async = is_async
2222
self._inform("Debugging enabled for Rasa...")
2323
self.last_action_dict = {}
2424
self.last_slot_dict = {}

botanalytics/slack.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class SlackRTMApi(Envoy):
1010
def __init__(self, debug=False, token=None, slack_client_instance=None, base_url='https://api.botanalytics.co/v1/',
11-
callback=None, async=False):
11+
callback=None, is_async=False):
1212
"""
1313
:param debug: bool
1414
Enables logging
@@ -29,7 +29,7 @@ def __init__(self, debug=False, token=None, slack_client_instance=None, base_url
2929
raise ValueError('Slack instance is not provided!')
3030
self.__slack_client = slack_client_instance
3131
self._inform('Logging enabled for SlackRTMApi...')
32-
self.__async = async
32+
self.__async = is_async
3333
if self.__async:
3434
self.__executor_service = ThreadPoolExecutor(max_workers=2)
3535
self.__executor_service.submit(self.__initialize)
@@ -140,7 +140,7 @@ def __validate(payload):
140140

141141
class SlackEventApi(Envoy):
142142
def __init__(self, debug=False, token=None, slack_token=None, base_url='https://api.botanalytics.co/v1/',
143-
callback=None, async = False):
143+
callback=None, is_async=False):
144144
"""
145145
:param debug: bool
146146
Enables logging
@@ -160,7 +160,7 @@ def __init__(self, debug=False, token=None, slack_token=None, base_url='https://
160160
raise ValueError('Slack token is not provided!')
161161
self.__slack_token = slack_token
162162
self._inform('Logging enabled for SlackEventApi...')
163-
self.__async = async
163+
self.__async = is_async
164164
if self.__async:
165165
self.__number_of_workers = multiprocessing.cpu_count() * 2
166166
if self.__number_of_workers == 0:

0 commit comments

Comments
 (0)