Skip to content

🏷️ types: move to ty#33

Merged
SigureMo merged 2 commits intomainfrom
copilot/move-to-ty
Apr 25, 2026
Merged

🏷️ types: move to ty#33
SigureMo merged 2 commits intomainfrom
copilot/move-to-ty

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 25, 2026

Summary

  • replace pyright with ty in the dev dependency set, lockfile, and lint task
  • remove the old pyright configuration and let Ruff enforce unused-code checks again
  • keep VS Code recommendations aligned with the remaining Pylance inlay hint settings while removing the pyright-style strict type-check setting
  • fix the color type alias so ty passes with --error-on-warning

Validation

  • python -m uv run ty check --error-on-warning src/docufix tests
  • python -m uv run ruff check .
  • python -m uv run pytest --reruns 3 --reruns-delay 1
  • python -m uv build
  • npx prettier --check '**/*.md'

References

Agent-Logs-Url: https://github.com/ShigureLab/docufix/sessions/bba5e264-e283-46f3-bfb6-70912f2ac133

Co-authored-by: SigureMo <38436475+SigureMo@users.noreply.github.com>
Comment thread .vscode/extensions.json Outdated
"recommendations": [
"ms-python.python",
"astral-sh.ty",
"ms-python.vscode-pylance",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@copilot 删 pylance

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

已移除,见 39715bf

Agent-Logs-Url: https://github.com/ShigureLab/docufix/sessions/6002ca7f-3bec-4d61-93fc-31e056cf9def

Co-authored-by: SigureMo <38436475+SigureMo@users.noreply.github.com>
Copilot AI requested a review from SigureMo April 25, 2026 19:07
@SigureMo SigureMo marked this pull request as ready for review April 25, 2026 19:10
Copilot AI review requested due to automatic review settings April 25, 2026 19:10
@SigureMo SigureMo merged commit 4008184 into main Apr 25, 2026
6 checks passed
@SigureMo SigureMo deleted the copilot/move-to-ty branch April 25, 2026 19:10
Copy link
Copy Markdown

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 migrates the project’s type-checking workflow from Pyright to Astral’s ty, updates dev dependencies/lockfile accordingly, and adjusts related lint/editor settings.

Changes:

  • Replace pyright with ty in dev dependencies, lockfile, and just lint task.
  • Remove the old Pyright configuration and re-enable Ruff’s unused import/variable checks.
  • Adjust a Color type alias so ty check --error-on-warning passes.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
uv.lock Removes pyright (+ nodeenv) and adds ty to the resolved dev dependency set.
src/docufix/utils/colorful.py Fixes Color type alias to be compatible with ty’s checks.
pyproject.toml Swaps dev dependency from Pyright to ty, removes [tool.pyright], and re-enables Ruff F401/F841.
justfile Updates lint task to run ty check --error-on-warning instead of Pyright.
.vscode/settings.json Removes the Pyright-style strict type-check mode setting.
.vscode/extensions.json Recommends the ty VS Code extension instead of Pylance.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .vscode/extensions.json
Comment on lines 3 to 6
"ms-python.python",
"ms-python.vscode-pylance",
"astral-sh.ty",
"charliermarsh.ruff",
"esbenp.prettier-vscode",
Copy link

Copilot AI Apr 25, 2026

Choose a reason for hiding this comment

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

.vscode/settings.json still contains Pylance-specific analysis/inlay-hint settings, and the PR description mentions keeping VS Code recommendations aligned with those settings, but this change removes the ms-python.vscode-pylance extension recommendation. Consider re-adding Pylance to the recommendations list (alongside astral-sh.ty), or remove the Pylance-specific settings if Pylance is no longer intended to be used.

Copilot uses AI. Check for mistakes.
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.

3 participants