Commit f33add0
committed
fix: add typed Protocol for Authlib client to satisfy pyright strict mode
Define _AsyncOAuth2ClientProtocol as a minimal structural interface for
AsyncOAuth2Client's members used by AuthlibOAuthAdapter (token, scope,
code_challenge_method, fetch_token, create_authorization_url,
ensure_active_token). Annotate self._client with the Protocol and suppress
the assignment from the untyped library with # type: ignore[assignment].
This eliminates all reportUnknownMemberType / reportUnknownVariableType /
reportUnknownArgumentType errors in pyright strict mode without requiring
upstream type stubs or a proliferation of per-line ignores.1 parent b5f36e9 commit f33add0
1 file changed
+26
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
50 | 74 | | |
51 | 75 | | |
52 | 76 | | |
| |||
128 | 152 | | |
129 | 153 | | |
130 | 154 | | |
131 | | - | |
| 155 | + | |
132 | 156 | | |
133 | 157 | | |
134 | 158 | | |
| |||
0 commit comments