ci: add strict-no-cover to detect unnecessary coverage pragmas (#1897)

This commit is contained in:
Max Isbey 2026-01-23 20:00:20 +00:00 • committed by GitHub
commit a7ddfdae07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -102,7 +102,7 @@ async def test_dependent_completion_scenario():
db = context.arguments.get("database")
if db == "users_db":
return Completion(values=["users", "sessions", "permissions"], total=3, has_more=False)
elif db == "products_db": # pragma: no cover
elif db == "products_db":
return Completion(values=["products", "categories", "inventory"], total=3, has_more=False)
return Completion(values=[], total=0, has_more=False) # pragma: no cover
@ -153,7 +153,7 @@ async def test_completion_error_on_missing_context():
raise ValueError("Please select a database first to see available tables")
# Normal completion if context is provided
db = context.arguments.get("database")
if db == "test_db": # pragma: no cover
if db == "test_db":
return Completion(values=["users", "orders", "products"], total=3, has_more=False)
return Completion(values=[], total=0, has_more=False) # pragma: no cover