Skip to content

Add Python type checking tool (mypy) #105

@jaeyeom

Description

@jaeyeom

Summary

Add Python type checking tool. Note: ruff (formatting + linting) and pylsp (language server) are already in the playbooks. This issue adds mypy for static type checking.

Tool to Add

mypy (Type Checker)

  • Purpose: Static type checker for Python - the original and most widely used
  • Installation:
    • macOS: brew install mypy
    • Debian: uv tool install mypy or pip install mypy
    • Termux: pip install mypy
  • Usage: mypy <file.py> or mypy .
  • Config: mypy.ini, pyproject.toml, or setup.cfg

Implementation Notes

1. Add to packages_data.go

{
    command: "mypy",
    platforms: map[PlatformName]InstallMethod{
        PlatformDarwin:     BrewInstallMethod{Name: "mypy"},
        PlatformDebianLike: UvInstallMethod{Name: "mypy"},
        PlatformTermux:     PipInstallMethod{Name: "mypy"},
    },
},

2. Create setup-python-tools.yml grouping playbook

---
# setup-python-tools.yml - Python development tools
- import_playbook: ruff.yml        # Formatter + Linter (already exists)
- import_playbook: pylsp.yml       # Language server (already exists)
- import_playbook: mypy.yml        # Type checker (to be added)

3. Add to all.yml

- import_playbook: setup-python-tools.yml

Current Python Tool Coverage

Tool Purpose Status
ruff Formatting + Linting ✅ Already in playbooks
pylsp Language Server ✅ Already in playbooks
mypy Type Checking ❌ To be added

Acceptance Criteria

  • Add mypy playbook
  • Create setup-python-tools.yml grouping playbook
  • Update all.yml to import Python tools group
  • Test on macOS
  • Test on Debian/Ubuntu
  • Test on Termux

Metadata

Metadata

Assignees

Labels

julesGoogle Jules will take care of this issue.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions