Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

Configure ty to fail on warnings (#2804)

Jeremiah Lowinbefaad8a08a2
diff --git a/pyproject.toml b/pyproject.toml
index a6e17eada..6b41c1ae3 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -143,6 +143,9 @@ python-version = "3.10"
# Some code uses `# ty: ignore[invalid-argument-type]` for this limitation.
# TODO: Remove these ignores once ty supports union narrowing
+[tool.ty.terminal]
+error-on-warning = true
+
[tool.ruff.lint]
fixable = ["ALL"]
ignore = [
diff --git a/tests/server/auth/providers/test_supabase.py b/tests/server/auth/providers/test_supabase.py
index 70c21085f..5182ca5e5 100644
--- a/tests/server/auth/providers/test_supabase.py
+++ b/tests/server/auth/providers/test_supabase.py
@@ -135,10 +135,11 @@ class TestSupabaseProvider:
)
assert provider.auth_route == "custom/auth/route"
+ assert isinstance(provider.token_verifier, JWTVerifier)
assert (
provider.token_verifier.jwks_uri
== "https://abc123.supabase.co/custom/auth/route/.well-known/jwks.json"
- ) # type: ignore[attr-defined]
+ )
def test_custom_auth_route_trailing_slash(self):
provider = SupabaseProvider(