Skip to content

Conversation

@DarkaMaul
Copy link
Collaborator

I've tried to remove our usage of mypy to use ty.
We just have some warnings when using stubs in our tests because they don't match the expected type, but I think that's expected.

- Add ty>=0.0.14 to lint dependencies
- Remove unreachable type: ignore comments in base.py (ty handles narrowing)
- Update test_verify.py to use ty: ignore syntax for pretend stubs

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@DarkaMaul DarkaMaul requested a review from facutuesca as a code owner January 28, 2026 15:38
@facutuesca
Copy link
Collaborator

Lint seems to still be failing

@DarkaMaul
Copy link
Collaborator Author

CI was failing because ty couldn't resolve pretend and pytest imports when running with INSTALL_EXTRA=lint (I don't know why mypy was not complaining though).

Interesting, I was ready to write that it was because I was running Python 3.12 on my laptop, and 3.14 on the CI, and my local tests with 3.14 (using uvx --python 3.14 ty check src test) were able also to show the CI behavior. But that's just because uvx starts from a clean env without dependencies

@facutuesca
Copy link
Collaborator

CI was failing because ty couldn't resolve pretend and pytest imports when running with INSTALL_EXTRA=lint (I don't know why mypy was not complaining though).

Looks like mypy was only running on the src directory:

[tool.mypy]
mypy_path = "src"

@DarkaMaul
Copy link
Collaborator Author

CI was failing because ty couldn't resolve pretend and pytest imports when running with INSTALL_EXTRA=lint (I don't know why mypy was not complaining though).

Looks like mypy was only running on the src directory:

[tool.mypy]
mypy_path = "src"

Good catch!

@facutuesca facutuesca self-requested a review January 29, 2026 12:05
@DarkaMaul DarkaMaul merged commit ab45f1d into main Jan 29, 2026
40 checks passed
@DarkaMaul DarkaMaul deleted the dm/migrate-to-ty branch January 29, 2026 12:47
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