Log warning when API.request is passed an unexpected keyword argument
authorHarmon <Harmon758@gmail.com>
Mon, 8 Feb 2021 08:17:47 +0000 (02:17 -0600)
committerHarmon <Harmon758@gmail.com>
Mon, 8 Feb 2021 08:17:47 +0000 (02:17 -0600)
That isn't an endpoint parameter

tweepy/api.py

index 5dfb6d03a39618b2036aa930fee98dc3d44758a4..64348462ac4597b17b3fb949ae4720ab35da6e9e 100644 (file)
@@ -131,6 +131,8 @@ class API:
                 continue
             if k in params:
                 raise TweepError(f'Multiple values for parameter {k} supplied!')
+            if k not in endpoint_parameters:
+                log.warning(f'Unexpected parameter: {k}')
             params[k] = str(arg)
 
         log.debug("PARAMS: %r", params)