Description
Currently, there are several Pyright/Pyrefly static analysis errors and diagnostics across the Google Antigravity Python SDK workspace. This issue tracks the fixes for these problems.
We have fixed these errors on the fork branch fix-ide-type-diagnostics. Since direct pull requests to this repository are restricted to collaborators only, we would appreciate it if you could review the changes or invite us as a collaborator to submit a Pull Request.
Proposed Changes
The changes include:
- Core SDK Types (
google/antigravity/types.py):
- Imported
cast and casted return values and validation error dictionaries to prevent invariant list type errors.
- Handled
IsADirectoryError check in file reading.
- Local Connection (
google/antigravity/connections/local/local_connection.py):
- Removed redundant class-level
target attribute to resolve conflicts with parent class fields.
- Defined
_TARGET_MAP to resolve type lookups, and properly typed local connection strategy variables.
- Updated connection send method signature with
**kwargs to match parent interface.
- Local Connection Tests (
google/antigravity/connections/local/local_connection_test.py):
- Added explicit metadata imports and assertions to guarantee non-null thread and configuration variables.
- Workspace Configurations:
- Added
pyrightconfig.json and pytest configurations (conftest.py) to manage local test run contexts cleanly.
Link to fork branch with full implementation: https://github.com/DevAbdullah90/antigravity-sdk-python/tree/fix-ide-type-diagnostics
Description
Currently, there are several Pyright/Pyrefly static analysis errors and diagnostics across the Google Antigravity Python SDK workspace. This issue tracks the fixes for these problems.
We have fixed these errors on the fork branch
fix-ide-type-diagnostics. Since direct pull requests to this repository are restricted to collaborators only, we would appreciate it if you could review the changes or invite us as a collaborator to submit a Pull Request.Proposed Changes
The changes include:
google/antigravity/types.py):castand casted return values and validation error dictionaries to prevent invariant list type errors.IsADirectoryErrorcheck in file reading.google/antigravity/connections/local/local_connection.py):targetattribute to resolve conflicts with parent class fields._TARGET_MAPto resolve type lookups, and properly typed local connection strategy variables.**kwargsto match parent interface.google/antigravity/connections/local/local_connection_test.py):pyrightconfig.jsonand pytest configurations (conftest.py) to manage local test run contexts cleanly.Link to fork branch with full implementation: https://github.com/DevAbdullah90/antigravity-sdk-python/tree/fix-ide-type-diagnostics