Closed
Description
openedon May 24, 2019
Environment data
- VS Code version: 1.34.0
- Extension version (available under the Extensions sidebar): 2019.4.12954
- OS and version: macOS 10.14.5
- Python version (& distribution if applicable, e.g. Anaconda): 3.7.3
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv via Poetry
- Relevant/affected Python packages and their versions: black
Expected behaviour
Use --allow-prereleases
option from poetry when installing black (until black comes with a released version).
Actual behaviour
source /Users/kristofferb/Library/Caches/pypoetry/virtualenvs/my-project-py3.7/bin/activate
poetry add black
~/Code/my-project
% source /Users/kristofferb/Library/Caches/pypoetry/virtualenvs/my-project-py3.7/bin/activate
~/Code/my-project
my-project-py3.7 % poetry add black
[ValueError]
Could not find a matching version of package black
add [-D|--dev] [--git GIT] [--path PATH] [-E|--extras EXTRAS] [--optional] [--python PYTHON] [--platform PLATFORM] [--allow-prereleases] [--dry-run] [--] <name> (<name>)...
Steps to reproduce:
- Install poetry
poetry new my-project && code my-project
poetry install
to have it set up venv- update .vscode/settings.json python.pythonPath to the venv created by poetry
- update .vscode/settings.json
python.poetryPath
to the path to the poetry executable (which poetry
) - open my_project/init.py, run Format Document
- On prompt "Formatter autopep8 is not installed. Install?" select "Use Black"
- Notice that the extension runs a command in the terminal (as described under Actual behavior).
Logs
Not relevant, can be provided upon request though
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment