Pack and unpack arguments for build_parameters
authorHarmon <Harmon758@gmail.com>
Tue, 2 Feb 2021 20:56:31 +0000 (14:56 -0600)
committerHarmon <Harmon758@gmail.com>
Tue, 2 Feb 2021 20:56:31 +0000 (14:56 -0600)
tweepy/binder.py

index f742f72d3adfc35cb1e419f1de71fea4669e71bf..45816339ec1f64b8ec2f0d11376c8e59381f52a1 100644 (file)
@@ -15,7 +15,7 @@ from tweepy.models import Model
 log = logging.getLogger(__name__)
 
 
-def build_parameters(allowed_param, args, kwargs):
+def build_parameters(allowed_param, *args, **kwargs):
     params = {}
 
     for idx, arg in enumerate(args):
@@ -189,7 +189,7 @@ def bind_api(*args, **kwargs):
     use_cache = kwargs.pop('use_cache', True)
 
     allowed_param = kwargs.pop('allowed_param', [])
-    params = build_parameters(allowed_param, args, kwargs)
+    params = build_parameters(allowed_param, *args, **kwargs)
     return execute(
         api, http_method, path, params=params, headers=headers,
         json_payload=json_payload, parser=parser,