Skip to content

Commit ffcc7c7

Browse files
pcarletonclaude
andcommitted
Fix pyright errors in test_client_credentials.py
Add explicit None checks before accessing client_info attributes to satisfy pyright type narrowing requirements. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c22e551 commit ffcc7c7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/client/auth/extensions/test_client_credentials.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ async def test_init_with_scopes(self, mock_storage: MockTokenStorage):
208208
)
209209

210210
await provider._initialize()
211+
assert provider.context.client_info is not None
211212
assert provider.context.client_info.scope == "read write"
212213

213214
@pytest.mark.anyio
@@ -222,6 +223,7 @@ async def test_init_with_client_secret_post(self, mock_storage: MockTokenStorage
222223
)
223224

224225
await provider._initialize()
226+
assert provider.context.client_info is not None
225227
assert provider.context.client_info.token_endpoint_auth_method == "client_secret_post"
226228

227229
@pytest.mark.anyio

0 commit comments

Comments
 (0)