π The fast, Pythonic way to build MCP servers and clients.
Apply pre-commit formatting fixes
Jeremiah Lowina2f406faa4ba
diff --git a/src/fastmcp/server/auth/providers/bearer.py b/src/fastmcp/server/auth/providers/bearer.pyindex a18d30b16..6ffffa909 100644--- a/src/fastmcp/server/auth/providers/bearer.py+++ b/src/fastmcp/server/auth/providers/bearer.py@@ -312,7 +312,7 @@ class BearerAuthProvider(OAuthProvider):# Validate audience if configuredif self.audience:aud = claims.get("aud")-+# Handle different combinations of audience typesif isinstance(self.audience, list):# self.audience is a list - check if any expected audience is presentdiff --git a/tests/auth/providers/test_bearer.py b/tests/auth/providers/test_bearer.pyindex ba6692c54..efed070d4 100644--- a/tests/auth/providers/test_bearer.py+++ b/tests/auth/providers/test_bearer.py@@ -446,7 +446,9 @@ class TestBearerToken:access_token = await provider.load_access_token(token)assert access_token is not None- async def test_provider_with_multiple_expected_audiences(self, rsa_key_pair: RSAKeyPair):+ async def test_provider_with_multiple_expected_audiences(+ self, rsa_key_pair: RSAKeyPair+ ):"""Test provider configured with multiple expected audiences."""provider = BearerAuthProvider(public_key=rsa_key_pair.public_key,