Skip to content

Commit 5e0e81f

Browse files
committed
coverage: remove exclude files pragma, add ... ignoring
1 parent 85ef402 commit 5e0e81f

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

pyproject.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,12 @@ patch = ["subprocess"]
177177
concurrency = ["multiprocessing", "thread"]
178178
source = ["src", "tests"]
179179
relative_files = true
180+
omit = [
181+
"src/mcp/client/__main__.py",
182+
"src/mcp/server/__main__.py",
183+
"src/mcp/os/posix/utilities.py",
184+
"src/mcp/os/win32/utilities.py",
185+
]
180186

181187
# https://coverage.readthedocs.io/en/latest/config.html#report
182188
[tool.coverage.report]
@@ -190,9 +196,7 @@ exclude_lines = [
190196
"if TYPE_CHECKING:",
191197
"@overload",
192198
"raise NotImplementedError",
193-
]
194-
exclude_also = [
195-
'\A(?s:.*# pragma: exclude file.*)\Z'
199+
"^\\s*\\.\\.\\.\\s*$",
196200
]
197201

198202
# https://coverage.readthedocs.io/en/latest/config.html#paths
File renamed without changes.

src/mcp/cli/claude.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def update_claude_config(
7575
if not config_file.exists(): # pragma: no cover
7676
try:
7777
config_file.write_text("{}")
78-
except Exception: # pragma: no cover
78+
except Exception:
7979
logger.exception(
8080
"Failed to create Claude config file",
8181
extra={

src/mcp/client/__main__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# pragma: exclude file
21
import argparse
32
import logging
43
import sys

src/mcp/client/auth/oauth2.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,19 @@ class TokenStorage(Protocol):
6666

6767
async def get_tokens(self) -> OAuthToken | None:
6868
"""Get stored tokens."""
69-
... # pragma: no cover
69+
...
7070

7171
async def set_tokens(self, tokens: OAuthToken) -> None:
7272
"""Store tokens."""
73-
... # pragma: no cover
73+
...
7474

7575
async def get_client_info(self) -> OAuthClientInformationFull | None:
7676
"""Get stored client information."""
77-
... # pragma: no cover
77+
...
7878

7979
async def set_client_info(self, client_info: OAuthClientInformationFull) -> None:
8080
"""Store client information."""
81-
... # pragma: no cover
81+
...
8282

8383

8484
@dataclass

src/mcp/os/posix/utilities.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""
22
POSIX-specific functionality for stdio client operations.
33
"""
4-
# pragma: exclude file
54

65
import logging
76
import os

src/mcp/os/win32/utilities.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""
22
Windows-specific functionality for stdio client operations.
33
"""
4-
# pragma: exclude file
54

65
import logging
76
import shutil

src/mcp/server/__main__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# pragma: exclude file
21
import importlib.metadata
32
import logging
43
import sys

src/mcp/server/auth/provider.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ async def authorize(self, client: OAuthClientInformationFull, params: Authorizat
173173
Raises:
174174
AuthorizeError: If the authorization request is invalid.
175175
"""
176-
... # pragma: no cover
176+
...
177177

178178
async def load_authorization_code(
179179
self, client: OAuthClientInformationFull, authorization_code: str
@@ -188,7 +188,7 @@ async def load_authorization_code(
188188
Returns:
189189
The AuthorizationCode, or None if not found
190190
"""
191-
... # pragma: no cover
191+
...
192192

193193
async def exchange_authorization_code(
194194
self, client: OAuthClientInformationFull, authorization_code: AuthorizationCodeT
@@ -206,7 +206,7 @@ async def exchange_authorization_code(
206206
Raises:
207207
TokenError: If the request is invalid
208208
"""
209-
... # pragma: no cover
209+
...
210210

211211
async def load_refresh_token(self, client: OAuthClientInformationFull, refresh_token: str) -> RefreshTokenT | None:
212212
"""
@@ -219,7 +219,7 @@ async def load_refresh_token(self, client: OAuthClientInformationFull, refresh_t
219219
Returns:
220220
The RefreshToken object if found, or None if not found.
221221
"""
222-
... # pragma: no cover
222+
...
223223

224224
async def exchange_refresh_token(
225225
self,
@@ -243,7 +243,7 @@ async def exchange_refresh_token(
243243
Raises:
244244
TokenError: If the request is invalid
245245
"""
246-
... # pragma: no cover
246+
...
247247

248248
async def load_access_token(self, token: str) -> AccessTokenT | None:
249249
"""

0 commit comments

Comments
 (0)