Commit 677a31f
committed
requests-oauthlib: add **kwargs to OAuth1Session.__init__
At runtime OAuth1Session.__init__ forwards **kwargs straight through to
OAuth1(...) (see requests_oauthlib/oauth1_session.py), which already has
extra keyword-only params typed in oauth1_auth.pyi (e.g. realm). The
OAuth1Session stub was missing the passthrough, so legitimate calls like
OAuth1Session(client_key=..., realm=...) failed with a spurious
"No parameter named realm" error. Sibling methods on the same class
(authorization_url, fetch_request_token, fetch_access_token) already use
a bare **kwargs for the same reason.
Verified with tests/stubtest_third_party.py, tests/mypy_test.py (all
supported Python versions), and pre-commit (ruff/black/flake8-pyi).1 parent a7bcce8 commit 677a31f
1 file changed
Lines changed: 1 addition & 0 deletions
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
0 commit comments