Fix pyright type errors and suppress warnings#136
Merged
Conversation
Co-authored-by: bchen <bchen@fireworks.ai>
|
Cursor Agent can help with this pull request. Just |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
name: Pull Request
about: Propose changes to the codebase
title: "Fix: Suppress Pyright warnings and resolve initial type errors"
labels: ''
assignees: ''
Description
This PR addresses initial Pyright errors by:
basedpyrightpre-commit hook to only report errors, effectively suppressing all warnings.eval_protocol/mcp/simulation_server.py,eval_protocol/utils/logs_server.py,eval_protocol/mcp_servers/tau2/*_environment/*.py, andeval_protocol/rewards/format.py.pyproject.tomlto use a validtypeCheckingModevalue ("standard"instead of"recommended").The motivation is to reduce noise from type checkers and improve the overall type-safety and maintainability of the codebase.
Fixes # (issue)
Implements # (issue)
Type of change
How Has This Been Tested?
The changes were verified by running Pyright locally:
make pre-commit(to confirm warning suppression and check for new errors)npx --yes pyright -p pyproject.toml --level error(to directly run Pyright with the same warning suppression as pre-commit)Test Configuration:
Checklist:
black .,isort .,flake8 .)Screenshots (if applicable)
N/A
Additional context
Many remaining Pyright errors are related to missing optional dependencies (e.g.,
pydantic,fastapi,httpx). These can be resolved by installing the dependencies or configuring Pyright to ignore specific directories/rules as needed.