From c82d7ac1789ee9f3f1bdc2b0743376f518cdb0de Mon Sep 17 00:00:00 2001 From: Harmon Date: Mon, 8 Feb 2021 02:17:47 -0600 Subject: [PATCH] Log warning when API.request is passed an unexpected keyword argument That isn't an endpoint parameter --- tweepy/api.py | 2 ++ 1 file changed, 2 insertions(+) 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) -- 2.25.1