Skip to content

typecheck: Add type annotations to codemcp/testing.py #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

ezyang
Copy link
Owner

@ezyang ezyang commented Mar 25, 2025

Stack from ghstack (oldest at bottom):

typecheck codemcp/testing.py. Add stubs if necessary

59f08b8  (Base revision)
446a2ae  Add missing type imports and define type protocols for TextContent and CallToolResult
b4c027f  Add type annotations to normalize_path and extract_text_from_result methods
3729c88  Add type annotations to extract_chat_id_from_text method and remove redundant import
9423bce  Add type annotations to call_tool_assert_error method and add session null check
ac62435  Add type annotations to call_tool_assert_success method and add session null check
021442e  Add type annotations to get_chat_id method and improve error handling
7d5a7a0  Add return type annotation to _unwrap_exception_groups method
dd242dd  Add return type annotation to create_client_session method
80cd7e8  Fix git_run method with proper type annotations and null handling
85b6a23  Remove unused imports and add AsyncGenerator
16347f8  Fix return type of _unwrap_exception_groups method
7f12851  Fix create_client_session return type and remove cwd parameter
7e0a9e4  Fix error handling in git_run method and remove unused variable
2e60cdc  Add pyright ignore directives for remaining errors
bb5fc5b  Auto-commit format changes
HEAD     Auto-commit lint changes

codemcp-id: 226-typecheck-add-type-annotations-to-codemcp-testing-

[ghstack-poisoned]
ezyang added a commit that referenced this pull request Mar 25, 2025
typecheck codemcp/testing.py. Add stubs if necessary

```git-revs
59f08b8  (Base revision)
446a2ae  Add missing type imports and define type protocols for TextContent and CallToolResult
b4c027f  Add type annotations to normalize_path and extract_text_from_result methods
3729c88  Add type annotations to extract_chat_id_from_text method and remove redundant import
9423bce  Add type annotations to call_tool_assert_error method and add session null check
ac62435  Add type annotations to call_tool_assert_success method and add session null check
021442e  Add type annotations to get_chat_id method and improve error handling
7d5a7a0  Add return type annotation to _unwrap_exception_groups method
dd242dd  Add return type annotation to create_client_session method
80cd7e8  Fix git_run method with proper type annotations and null handling
85b6a23  Remove unused imports and add AsyncGenerator
16347f8  Fix return type of _unwrap_exception_groups method
7f12851  Fix create_client_session return type and remove cwd parameter
7e0a9e4  Fix error handling in git_run method and remove unused variable
2e60cdc  Add pyright ignore directives for remaining errors
bb5fc5b  Auto-commit format changes
HEAD     Auto-commit lint changes
```

codemcp-id: 226-typecheck-add-type-annotations-to-codemcp-testing-
ghstack-source-id: 55048a9
Pull-Request-resolved: #216
[ghstack-poisoned]
ezyang added a commit that referenced this pull request Mar 25, 2025
typecheck codemcp/testing.py. Add stubs if necessary

```git-revs
59f08b8  (Base revision)
446a2ae  Add missing type imports and define type protocols for TextContent and CallToolResult
b4c027f  Add type annotations to normalize_path and extract_text_from_result methods
3729c88  Add type annotations to extract_chat_id_from_text method and remove redundant import
9423bce  Add type annotations to call_tool_assert_error method and add session null check
ac62435  Add type annotations to call_tool_assert_success method and add session null check
021442e  Add type annotations to get_chat_id method and improve error handling
7d5a7a0  Add return type annotation to _unwrap_exception_groups method
dd242dd  Add return type annotation to create_client_session method
80cd7e8  Fix git_run method with proper type annotations and null handling
85b6a23  Remove unused imports and add AsyncGenerator
16347f8  Fix return type of _unwrap_exception_groups method
7f12851  Fix create_client_session return type and remove cwd parameter
7e0a9e4  Fix error handling in git_run method and remove unused variable
2e60cdc  Add pyright ignore directives for remaining errors
bb5fc5b  Auto-commit format changes
7da18b6  Auto-commit lint changes
HEAD     Fix git_run method to correctly handle empty output with text=True
```

codemcp-id: 226-typecheck-add-type-annotations-to-codemcp-testing-
ghstack-source-id: cbb46d1
Pull-Request-resolved: #216
@ezyang ezyang closed this in 92bdd67 Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant