We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d3b3e2 commit 1ae51deCopy full SHA for 1ae51de
1 file changed
vk_api/execute.py
@@ -41,11 +41,12 @@ def compile(self, args):
41
42
def __call__(self, vk, *args, **kwargs):
43
44
- if type(vk) not in [VkApi, VkApiMethod]:
+ if not isinstance(vk, (VkApi, VkApiMethod)):
45
raise VkFunctionException(
46
- 'The first arg should be VkApi or VkApiMethod instance')
+ 'The first arg should be VkApi or VkApiMethod instance'
47
+ )
48
- if type(vk) is VkApiMethod:
49
+ if isinstance(vk, VkApiMethod):
50
vk = vk._vk
51
52
args = parse_args(self.args, args, kwargs)
0 commit comments