Skip to content

Commit

Permalink
Log warning when API.request is passed an unexpected keyword argument
Browse files Browse the repository at this point in the history
That isn't an endpoint parameter
  • Loading branch information
Harmon758 committed Feb 8, 2021
1 parent 3c1a397 commit c82d7ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tweepy/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ def request(
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)
Expand Down

0 comments on commit c82d7ac

Please sign in to comment.