Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to set --python-executable to a local python from the local venv #59

Open
kaste opened this issue Jan 29, 2025 · 0 comments
Open

Try to set --python-executable to a local python from the local venv #59

kaste opened this issue Jan 29, 2025 · 0 comments

Comments

@kaste
Copy link
Collaborator

kaste commented Jan 29, 2025

If we use a globally installed mypy, we could still point it to a local venv by setting --python-executable automatically.

SublimeLinter's layering is not ideal here, as we ant to set an argument after cmd has run. We could add it to run but then we have to mangle the complete and finished cmd (list[str]). There is also no clear extension point when a globally executable is searched for. So we would need to interfere that from the finished cmd as well. (IIRC)

Generally, there is a chicken-egg problem, where get_working_dir() is computed after cmd has been resolved. But we already want to access it in cmd(). Look like get_working_dir is a function from (context, canonical_name_of_the_linter) -> Optional[str] (but not right now) and the canonical name of the linter (e.g. mypy, ruff etc.) is nowhere stored explicitly. However, self.name typically is the name we're looking for, just implicitly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant