Skip to content

Commit 5cc5a07

Browse files
fix: remove unused imports and simplify _is_user_file return
1 parent f0723e8 commit 5cc5a07

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

drift/core/communication/types.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,7 @@
4343
from typing import Any
4444

4545
from tusk.drift.core.v1 import (
46-
BranchInfo,
4746
CliMessage,
48-
CoverageSnapshotResponse,
49-
FileCoverageData,
5047
InstrumentationVersionMismatchAlert,
5148
MessageType,
5249
Runtime,

drift/core/coverage_server.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,7 @@ def _is_user_file(filename: str) -> bool:
151151
# Resolve symlinks for consistent path comparison
152152
resolved = os.path.realpath(filename)
153153
# Use trailing separator to avoid prefix collisions (/app matching /application)
154-
if _source_root and not (resolved.startswith(_source_root + os.sep) or resolved == _source_root):
155-
return False
156-
return True
154+
return not _source_root or resolved.startswith(_source_root + os.sep) or resolved == _source_root
157155

158156

159157
def _get_branch_data(data, filename: str) -> dict:

0 commit comments

Comments
 (0)