Skip to content

Conversation

chris-sanders
Copy link
Owner

Summary

  • Fixed various type checking issues in the codebase that were preventing CI checks from passing
  • Added missing type annotations and handled None values more safely
  • Fixed issues with streaming, stdio mode, and YAML type stubs

Test plan

  • All existing tests have been verified to pass
  • CI checks should pass with these changes
  • The remaining type errors in bundle.py are more complex and will require a separate PR

🤖 Generated with Claude Code

chris-sanders and others added 7 commits May 5, 2025 16:01
This commit installs the actual sbctl binary from github.com/replicatedhq/sbctl in the CI environment rather than relying on the mock implementation. This ensures integration tests can run properly on GitHub Actions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Adds appropriate exclusions to the ruff configuration in pyproject.toml
to prevent linting of YAML files, which was causing CI failures.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fixes f-string without placeholders in lifecycle.py
- Adds .ruff.toml configurations to handle test fixtures properly
- Creates directory-specific ruff configurations that relax rules
  for test code and fixtures which follow different patterns

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Replaces a broken recursive symbolic link with a proper test file template.
This fixes the "Failed to create cache key" error in CI linting.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Applied Black code formatter to all test files to ensure consistent
formatting and pass CI checks.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This PR addresses type checking errors in the codebase that were preventing the CI checks from passing. Fixes include:

1. Add types-PyYAML to the dev dependencies for YAML type stubs
2. Initialize global variables in server.py properly
3. Fix missing return type annotations
4. Handle 'stream' attribute check more safely in CLI and main
5. Fix FastMCP stdio mode usage with environment variables
6. Create safe file copy helper function
7. Handle nullable types more safely in KubectlResult and KubectlError

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@chris-sanders chris-sanders deleted the fix/type-checking-issues branch May 6, 2025 20:07
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