Skip to content

Conversation

@brandonschabell
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings December 26, 2025 15:47
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the mypy type checker with ty across the development toolchain and CI/CD pipeline.

Key changes:

  • Swaps mypy (v1.18.2+) for ty (v0.0.7) as the project's type checker
  • Updates all type checker ignore comments from type: ignore to ty: ignore syntax in test files
  • Removes the justfile "clean" recipe (appears unrelated to the main purpose)

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
uv.lock Removes mypy and its dependencies (librt, mypy-extensions, pathspec), adds ty v0.0.7 with platform-specific wheels
pyproject.toml Replaces mypy dependency and configuration with ty; removes strict type checking flags (warn_return_any, disallow_untyped_defs, etc.)
justfile Updates typecheck command from mypy . to ty check; removes "clean" recipe and its help text
docs/contributing.md Updates documentation references from mypy to ty
alphaflow/tests/test_csv_data_feed.py Converts type: ignore comments to ty: ignore[deprecated] syntax for CSVDataFeed usage
alphaflow/data_feeds/init.py Adds ty: ignore[deprecated] comment to CSVDataFeed import
CHANGELOG.md Documents the mypy-to-ty migration in the Unreleased section
.github/workflows/ci.yml Updates CI workflow to run ty check instead of mypy .

"pytest-httpx>=0.35.0",
"ruff>=0.14.0",
"rust-just>=1.45.0",
"ty>=0.0.7",
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR replaces mypy with ty, a package at version 0.0.7 which suggests it's in very early experimental stages. The extremely low version number (0.0.x) typically indicates pre-alpha software that may not be production-ready. Consider whether it's appropriate to replace a mature, well-established type checker like mypy with such an early-stage tool. If ty is genuinely intended for production use, it would be helpful to document why this change is being made and what advantages ty provides over mypy, especially given the stability risks.

Copilot uses AI. Check for mistakes.
"D203", # one-blank-line-before-class (conflicts with D211)
"D213", # multi-line-summary-second-line (conflicts with D212)
]

Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ty configuration section only includes the source directory but removes all the strict type checking flags that were configured for mypy (warn_return_any, disallow_untyped_defs, warn_redundant_casts, strict_equality, etc.). This represents a significant reduction in type checking strictness. If ty supports similar configuration options, they should be added to maintain the same level of type safety that the project previously had.

Suggested change
[tool.ty]
strict = true
warn_return_any = true
disallow_untyped_defs = true
warn_redundant_casts = true
strict_equality = true

Copilot uses AI. Check for mistakes.
Comment on lines 27 to 28
check: lint typecheck test

Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description mentions "Replace mypy with ty" but the diff shows that the "clean" recipe has also been removed from the justfile. This appears to be an unrelated change that should either be mentioned in the PR description or restored. The clean recipe was useful for removing cache files and build artifacts (.mypy_cache/, .ruff_cache/, etc.).

Copilot uses AI. Check for mistakes.
Comment on lines 9 to 11
@echo "just check - Run all checks (lint + typecheck + test)"
@echo "just clean - Remove cache files and build artifacts"
@echo "just install - Install dependencies"
@echo "just docs - Serve documentation locally"
Copy link

Copilot AI Dec 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The help text was also updated to remove the "just clean" command description. Since the clean recipe has been removed, this change is consistent, but if the clean recipe removal was unintentional, this line should be restored as well.

Copilot uses AI. Check for mistakes.
@brandonschabell brandonschabell merged commit 190d6ee into main Dec 26, 2025
18 checks passed
@brandonschabell brandonschabell deleted the ty-replacing-mypy branch December 26, 2025 15:54
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