Skip to content

Commit 45eed51

Browse files
committed
Exclude POSIX-only fcntl lines from the Windows coverage gate
No-Verification-Needed: coverage pragmas only
1 parent 41b9faa commit 45eed51

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/mcp/server/stdio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async def run_server():
2929
from mcp.shared.message import SessionMessage
3030

3131
if sys.platform != "win32": # pragma: no branch
32-
import fcntl
32+
import fcntl # pragma: lax no cover - POSIX-only line, uncovered on Windows runners
3333

3434
# Stream-claim contract (design and attack log in PR #3117):
3535
# - _claims is the single authority for who owns fd 0/1; mutated only under the
@@ -64,7 +64,7 @@ def _dup_above_std(fd: int) -> int:
6464
os.close(duplicate)
6565
raise OSError(f"duplicate of fd {fd} landed in the standard range")
6666
return duplicate
67-
return fcntl.fcntl(fd, fcntl.F_DUPFD_CLOEXEC, 3)
67+
return fcntl.fcntl(fd, fcntl.F_DUPFD_CLOEXEC, 3) # pragma: lax no cover - POSIX-only
6868

6969

7070
def _open_stdin_diversion() -> int:

0 commit comments

Comments
 (0)