Re:Ty: A fast Python type checker and language server
by _carljm on Wednesday May 07, 2025 @05:35PM
(#43920802)
The current version can handle importing pydantic without error just fine, but it probably can't find your virtualenv, so it doesn't know what third-party dependencies you have installed. Ty will discover your venv if it is in `.venv` in the project directory; otherwise you can help it out with the `--python` CLI flag.
Re:Ty: A fast Python type checker and language server
by alexwaygood on Wednesday May 07, 2025 @05:46PM
(#43920878)
We'll also discover your venv if you:
- Activate it manually (`source .venv/bin/activate`, etc.)
- Set the `VIRTUAL_ENV` environment variable
- Or use a command such as `uv run` or the equivalent from pdm/poetry/hatch to run ty (these project managers usually implicitly set the `VIRTUAL_ENV` variable to point to the project's virtual environment before executing any commands)
lint:unresolved-import: Cannot resolve imported module `pydantic` --> vartia/usr_id.py:4:6 | 2 | from typing import Optional, Any 3 | from enum import Enum 4 | from pydantic import BaseModel, ConfigDict
looking forward to the release version.