Conversation
hayescode
force-pushed
the
codex/ty-migration
branch
from
April 7, 2026 19:27
ea402a1 to
9a26f7e
Compare
Replace mypy/dmypy with Astral ty across backend tooling, CI, docs, and tests.\n\nValidation:\n- pnpm run lint\n- cd backend && uv run pytest --cov=chainlit/\n- cd backend && uvx ty check chainlit tests --output-format concise\n- pnpm run buildUi\n\nNote: local Cypress could not start on this Windows machine because the cached Cypress.exe fails its smoke test with 'bad option: --smoke-test'.\n\nCo-Authored-By: OpenAI Codex <noreply@openai.com>
hayescode
force-pushed
the
codex/ty-migration
branch
from
April 7, 2026 19:27
9a26f7e to
c8df17d
Compare
Member
|
Hi @hayescode! Thank you for the great contribution! However, I have a few concerns:
|
Contributor
Author
|
Member
|
@hayescode I think it'll be ready within a few days - I'll do one or two more PRs with auto fixes (mostly formatting), which will shrink it down to ~30 files, and then I'll consider it ready for your review |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
mypy/dmypyto Astraltyty check chainlit testspasses cleanlyValidation
pnpm run lintcd backend && uv run pytest --cov=chainlit/cd backend && uvx ty check chainlit tests --output-format concisepnpm run buildUiNotes
Cypress.exefails its own startup smoke test with:bad option: --smoke-testbad option: --ping=...pnpm testcould not be used here to exercise the e2e job locally.Summary by cubic
Switch backend Python type checking from
mypy/dmypyto Astralty. Updates CI, docs, configs, scripts, and code typing sotypasses cleanly, with small runtime-safe tweaks.Migration
uv run ty check chainlit tests.uv sync --extra ty --extra tests --extra dev --extra custom-data.tyinpyproject.toml(tool.ty.src,environment.python-version,analysis.allowed-unresolved-imports,analysis.replace-imports-with-any).ty check --output-format github; update setup steps and docs;package.jsonlintPythonusesty; drop.mypy_cacheandbackend/.dmypy.jsonfrom.gitignore.Refactors
Sequencefor widgets/tabs; makeMessage.contentoptional; defaultlocal_stepsto[]; narrow types in middleware/emitter/server; unifyStep/LiteralAI step types; makesession.client_typeacceptstr.type: ignoreforboto3/GCS; cast clients; add runtime-safe GCS import alias; minor SQLAlchemy update toasync_sessionmaker.env_strin OAuth; cast middleware (CORSMiddleware, custom FastAPI middleware) where needed; expand MCP request types in server.from_dictparsing and casts; small fixes in SDK callbacks (LangChain, LlamaIndex, OpenAI, Mistral).Written for commit c8df17d. Summary will update on new commits.