From: Harmon Date: Mon, 8 Feb 2021 08:17:47 +0000 (-0600) Subject: Log warning when API.request is passed an unexpected keyword argument X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c82d7ac1789ee9f3f1bdc2b0743376f518cdb0de;p=tweepy.git Log warning when API.request is passed an unexpected keyword argument That isn't an endpoint parameter --- diff --git a/tweepy/api.py b/tweepy/api.py index 5dfb6d0..6434846 100644 --- a/tweepy/api.py +++ b/tweepy/api.py @@ -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)