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

Add option for prepending arbitrary cmd-line args #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

poppyschmo
Copy link

@poppyschmo poppyschmo commented May 13, 2020

What: offer users an escape hatch for corner cases

Rationale: people may need to adjust the options passed to mypy, and trying to accommodate everyone's needs, case-by-case, is untenable

Example: overriding options in a shared config. Suppose:

  1. pyls and mypy are installed globally
  2. your project runs in a virtual environment

Unfortunately, mypy requires the python_executable to behave correctly with this setup.
With a patch like this, a user could add something like

lsp_overrides:pyls:plugins:pyls_mypy:prepend:
  - "--python-executable"
  - /home/me/repo/.venv/bin/python

to their editor's per-project dot file. (And, for more involved changes, there's always --config-file.)

snejus pushed a commit to snejus/pyls-mypy that referenced this pull request Mar 17, 2024
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.

1 participant