Skip to content

Commit c07769d

Browse files
committed
Fix SIM103 lint and CI git identity in parallel worktree test
1 parent ca4e8e6 commit c07769d

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

‎teaagent/cli/_handlers/_doctor.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ def _looks_like_sensitive_string(value: str) -> bool:
5252
return True
5353
if candidate.startswith(('sk-', 'rk-', 'pk-', 'ghp_', 'xoxb-', 'xoxp-')):
5454
return True
55-
if len(candidate) >= 20 and any(ch.isdigit() for ch in candidate) and any(
56-
ch.isalpha() for ch in candidate
57-
):
58-
return True
59-
return False
55+
return (
56+
len(candidate) >= 20
57+
and any(ch.isdigit() for ch in candidate)
58+
and any(ch.isalpha() for ch in candidate)
59+
)
6060

6161

6262
def _redact_sensitive_fields(

‎tests/acceptance/test_subagent_parallel_worktree_merge_flow.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,18 @@ def test_parallel_worktree_children_expose_lineage_for_parent_review(self) -> No
2424
subprocess.run(
2525
['git', 'add', 'README.md'], cwd=root, check=True, capture_output=True
2626
)
27+
env = {
28+
'GIT_AUTHOR_NAME': 'test',
29+
'GIT_AUTHOR_EMAIL': 'test@test.com',
30+
'GIT_COMMITTER_NAME': 'test',
31+
'GIT_COMMITTER_EMAIL': 'test@test.com',
32+
}
2733
subprocess.run(
2834
['git', 'commit', '-m', 'init'],
2935
cwd=root,
3036
check=True,
3137
capture_output=True,
38+
env=env,
3239
)
3340
(root / '.teaagent').mkdir()
3441
registry = ToolRegistry()

0 commit comments

Comments
 (0)