Skip to content

fix: type checking and error fixes #218

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 and fix errors

501e45e  (Base revision)
f61a404  Fix arguments type in codemcp function signature
99e84c8  Add type annotation for normalize_newlines function
1babe5e  Ensure arguments passed to run_command is of type str or None
e24a52b  Ensure chat_id is not None when calling write_file_content
b49ec73  Ensure chat_id is not None when calling edit_file_content
4eb193e  Ensure chat_id is not None when calling rm_file
1327d56  Validate chmod mode parameter and ensure chat_id is not None
10dd9ad  Add parameter type annotation to configure_logging function
06944fb  Add parameter and return type annotations to ModuleFilter.filter method
efc28c8  Add parameter and return type annotations to cli function
7016544  Add parameter and return type annotations to init function
a5a85a0  Add return type annotation to run function
6db300e  Fix call_tool parameter naming to clarify types
d935379  Fix optional integer parameters in read_file function
ed70a05  Add chat_id parameter to read_file_content call
c874bf0  Add chat_id parameter to write_file_content call
82046df  Add chat_id parameter to edit_file_content call
b30b7c4  Add chat_id parameter to ls_directory call
a1a94d5  Fix grep_files call with proper types and add chat_id parameter
d29bac7  Add chat_id parameter to init_project call
32c4d58  Fix line list type issues in find_similar_lines function
cfdb062  Fix type errors with normalized parameter values
a385183  Add explicit check for chat_id in RunCommand subtool
2f7a14b  Use type casting for mode parameter in chmod call
bc96ae1  Add default return value to ensure function always returns a string
a05e6e1  Add helper function to safely get chat_id from Context and add necessary imports
bec3320  Update read_file function to use the helper function
e3110d2  Update write_file function to use the helper function
9af4d12  Update edit_file function to use the helper function
5b78250  Update ls function to use the helper function
bc12fab  Update grep function to use the helper function
1deb4ca  Update init_project_tool function to use the helper function
a9483d7  Fix default value for chat_id parameter in edit_file_content
200c345  Fix init_project function call by removing the chat_id parameter
0653554  Remove unused Optional import
fd4e907  Remove unused import in multi_entry.py
71f0bc4  Remove unused chat_id variable
6c469b6  Auto-commit format changes
HEAD     Auto-commit lint changes

codemcp-id: 228-fix-type-checking-and-error-fixes

[ghstack-poisoned]
ezyang added a commit that referenced this pull request Mar 25, 2025
Typecheck and fix errors

```git-revs
501e45e  (Base revision)
f61a404  Fix arguments type in codemcp function signature
99e84c8  Add type annotation for normalize_newlines function
1babe5e  Ensure arguments passed to run_command is of type str or None
e24a52b  Ensure chat_id is not None when calling write_file_content
b49ec73  Ensure chat_id is not None when calling edit_file_content
4eb193e  Ensure chat_id is not None when calling rm_file
1327d56  Validate chmod mode parameter and ensure chat_id is not None
10dd9ad  Add parameter type annotation to configure_logging function
06944fb  Add parameter and return type annotations to ModuleFilter.filter method
efc28c8  Add parameter and return type annotations to cli function
7016544  Add parameter and return type annotations to init function
a5a85a0  Add return type annotation to run function
6db300e  Fix call_tool parameter naming to clarify types
d935379  Fix optional integer parameters in read_file function
ed70a05  Add chat_id parameter to read_file_content call
c874bf0  Add chat_id parameter to write_file_content call
82046df  Add chat_id parameter to edit_file_content call
b30b7c4  Add chat_id parameter to ls_directory call
a1a94d5  Fix grep_files call with proper types and add chat_id parameter
d29bac7  Add chat_id parameter to init_project call
32c4d58  Fix line list type issues in find_similar_lines function
cfdb062  Fix type errors with normalized parameter values
a385183  Add explicit check for chat_id in RunCommand subtool
2f7a14b  Use type casting for mode parameter in chmod call
bc96ae1  Add default return value to ensure function always returns a string
a05e6e1  Add helper function to safely get chat_id from Context and add necessary imports
bec3320  Update read_file function to use the helper function
e3110d2  Update write_file function to use the helper function
9af4d12  Update edit_file function to use the helper function
5b78250  Update ls function to use the helper function
bc12fab  Update grep function to use the helper function
1deb4ca  Update init_project_tool function to use the helper function
a9483d7  Fix default value for chat_id parameter in edit_file_content
200c345  Fix init_project function call by removing the chat_id parameter
0653554  Remove unused Optional import
fd4e907  Remove unused import in multi_entry.py
71f0bc4  Remove unused chat_id variable
6c469b6  Auto-commit format changes
HEAD     Auto-commit lint changes
```

codemcp-id: 228-fix-type-checking-and-error-fixes
ghstack-source-id: 3b6f93f
Pull-Request-resolved: #218
[ghstack-poisoned]
ezyang added a commit that referenced this pull request Mar 25, 2025
Typecheck and fix errors

```git-revs
501e45e  (Base revision)
f61a404  Fix arguments type in codemcp function signature
99e84c8  Add type annotation for normalize_newlines function
1babe5e  Ensure arguments passed to run_command is of type str or None
e24a52b  Ensure chat_id is not None when calling write_file_content
b49ec73  Ensure chat_id is not None when calling edit_file_content
4eb193e  Ensure chat_id is not None when calling rm_file
1327d56  Validate chmod mode parameter and ensure chat_id is not None
10dd9ad  Add parameter type annotation to configure_logging function
06944fb  Add parameter and return type annotations to ModuleFilter.filter method
efc28c8  Add parameter and return type annotations to cli function
7016544  Add parameter and return type annotations to init function
a5a85a0  Add return type annotation to run function
6db300e  Fix call_tool parameter naming to clarify types
d935379  Fix optional integer parameters in read_file function
ed70a05  Add chat_id parameter to read_file_content call
c874bf0  Add chat_id parameter to write_file_content call
82046df  Add chat_id parameter to edit_file_content call
b30b7c4  Add chat_id parameter to ls_directory call
a1a94d5  Fix grep_files call with proper types and add chat_id parameter
d29bac7  Add chat_id parameter to init_project call
32c4d58  Fix line list type issues in find_similar_lines function
cfdb062  Fix type errors with normalized parameter values
a385183  Add explicit check for chat_id in RunCommand subtool
2f7a14b  Use type casting for mode parameter in chmod call
bc96ae1  Add default return value to ensure function always returns a string
a05e6e1  Add helper function to safely get chat_id from Context and add necessary imports
bec3320  Update read_file function to use the helper function
e3110d2  Update write_file function to use the helper function
9af4d12  Update edit_file function to use the helper function
5b78250  Update ls function to use the helper function
bc12fab  Update grep function to use the helper function
1deb4ca  Update init_project_tool function to use the helper function
a9483d7  Fix default value for chat_id parameter in edit_file_content
200c345  Fix init_project function call by removing the chat_id parameter
0653554  Remove unused Optional import
fd4e907  Remove unused import in multi_entry.py
71f0bc4  Remove unused chat_id variable
6c469b6  Auto-commit format changes
2eaa5ce  Auto-commit lint changes
HEAD     Update test_chmod_error_handling to accept either error message format
```

codemcp-id: 228-fix-type-checking-and-error-fixes
ghstack-source-id: 3b7c1b7
Pull-Request-resolved: #218
@ezyang ezyang closed this in 78ea12d 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