-
Notifications
You must be signed in to change notification settings - Fork 216
Closed
astral-sh/ruff
#18144Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions especially welcomeContributions especially welcomeimportsModule resolution, site-packages discovery, import-related diagnosticsModule resolution, site-packages discovery, import-related diagnostics
Description
Summary
When using Pantsbuild, I use pants export to auto-create virtualenvs for a dependency set.
The virtualenv created by it contains pyvenv.cfg like:
home = /home/joongi/.pyenv/versions/3.13.3/bin
include-system-site-packages = false
version = 3.13.3
prompt = 'python-default/3.13.3'
executable = /home/joongi/.pyenv/versions/3.13.3/bin/python3.13
command = /home/joongi/.pyenv/versions/3.13.3/bin/python3.13 -m venv --without-pip --prompt="python-default/3.13.3" /home/joongi/bai-edge/dist/export/python/virtualenvs/python-default/3.13.3After activating this virtualenv, uvx ty check currently fails with:
ty failed
Cause: Invalid search path settings
Cause: Failed to discover the site-packages directory: Failed to parse the pyvenv.cfg file at /home/joongi/bai-edge/dist/export/python/virtualenvs/python-default/3.13.3/pyvenv.cfg because line 6 has too many '=' characters
If I apply the following patch to pyvenv.cfg, replacing = with a space in the command's arguments:
@@ -3,4 +3,4 @@
version = 3.13.3
prompt = 'python-default/3.13.3'
executable = /home/joongi/.pyenv/versions/3.13.3/bin/python3.13
-command = /home/joongi/.pyenv/versions/3.13.3/bin/python3.13 -m venv --without-pip --prompt="python-default/3.13.3" /home/joongi/bai-edge/dist/export/python/virtualenvs/python-default/3.13.3
+command = /home/joongi/.pyenv/versions/3.13.3/bin/python3.13 -m venv --without-pip --prompt "python-default/3.13.3" /home/joongi/bai-edge/dist/export/python/virtualenvs/python-default/3.13.3uvx ty check runs fine.
Since Python works without any issue with this virtualenv, ty's pyvenv.cfg parsing should allow this case as well.
Version
ty 0.0.1-alpha.4
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedContributions especially welcomeContributions especially welcomeimportsModule resolution, site-packages discovery, import-related diagnosticsModule resolution, site-packages discovery, import-related diagnostics