Skip to content

Conversation

@corv89
Copy link
Owner

@corv89 corv89 commented Dec 24, 2025

Summary

  • Fix all 97 basedpyright type errors (reduced to 0)
  • Re-enable type checking in pre-commit hooks and CI workflow
  • Create shared execute.py module for sandbox execution

Changes

New Files

  • shannot/_protocols.py - Protocol types for mixin pattern typing
  • shannot/execute.py - Shared sandbox execution function for CLI and MCP server

Type Fixes

  • Add FSObject.kind attribute and fix method signatures in mix_vfs.py
  • Fix Optional type annotations across approve.py, ssh.py, mix_remote.py
  • Use TYPE_CHECKING for platform-specific struct definitions in structs.py
  • Add type: ignore comments for mixin attribute accesses
  • Fix set.extend()set.update() bug in interact.py
  • Add None checks and class attribute annotations in test files
  • Update MCP server to use shared execute_script() function

CI/Pre-commit

  • Re-enable basedpyright in .pre-commit-config.yaml
  • Remove continue-on-error: true from type checker step in test.yml

Test plan

  • All 121 unit tests pass
  • uv run basedpyright reports 0 errors
  • Pre-commit hooks pass

- Add _protocols.py with Protocol types for mixin pattern
- Create execute.py with shared sandbox execution function
- Fix Optional type annotations across approve.py, ssh.py, mix_remote.py
- Add FSObject.kind attribute and fix method signatures in mix_vfs.py
- Use TYPE_CHECKING for platform-specific struct definitions
- Add type: ignore comments for mixin attribute accesses
- Fix set.extend() -> set.update() bug in interact.py
- Add None checks and class attribute annotations in test files
- Update MCP server to use shared execute_script() function

Reduces type errors from 97 to 0.
@github-actions
Copy link

CHANGELOG.md is out of date

Please update the changelog by running:

make changelog

Or manually:

git-cliff --config cliff.toml -o CHANGELOG.md

Then commit the updated CHANGELOG.md file.

@corv89 corv89 self-assigned this Dec 24, 2025
@github-actions
Copy link

CHANGELOG.md is out of date

Please update the changelog by running:

make changelog

Or manually:

git-cliff --config cliff.toml -o CHANGELOG.md

Then commit the updated CHANGELOG.md file.

@github-actions
Copy link

CHANGELOG.md is out of date

Please update the changelog by running:

make changelog

Or manually:

git-cliff --config cliff.toml -o CHANGELOG.md

Then commit the updated CHANGELOG.md file.

@github-actions
Copy link

CHANGELOG.md is out of date

Please update the changelog by running:

make changelog

Or manually:

git-cliff --config cliff.toml -o CHANGELOG.md

Then commit the updated CHANGELOG.md file.

@corv89 corv89 merged commit c5f6e98 into main Dec 24, 2025
12 of 14 checks passed
@corv89 corv89 deleted the refactor branch December 24, 2025 14:23
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.

2 participants