does anyone know how to properly setup IntelliSens...
# python
a
does anyone know how to properly setup IntelliSense/autocomplete/code hint for pulumi python on VS Code? the built in Python Intellisense isn't giving me any code suggestion specific on pulumi or pulumi_aws
g
This is known issue (it somewhere in pulumi github) Afaik VSCode worked "okay-ish" You just need to select the correct interpreter. If you have setup new pulumi project it also created a VENV so you need to point VSCode to that
g
Also, it's worth checking into and using Pipenv if you haven't already. It's how we manage all our dependencies for the Pulumi Python implementation.
Copy code
[[source]]
name = "pypi"
url = "<https://pypi.org/simple>"
verify_ssl = true

[dev-packages]
black = ">=20.8b0"
debugpy = "*"
flake8 = "*"
pyls-black = "*"
python-language-server = "*"
rope = "*"

[packages]
pulumi = "<4.0.0,>=3.3.0"
pulumi-kubernetes = "<4.0.0,>=3.2.0"
pulumi-vault = "<5.0.0,>=4.0.1"
pulumi-aws = "<5.0.0,>=4.5.1"
pulumi-fastly = "<4.0.0,>=3.1.0"
pulumi-random = "<5.0.0,>=4.1.1"
pulumi-<ORG>-lib = { path = "./pulumi-<ORG>-lib", editable = true }
jinja2 = "*"
boto3 = "*"

[requires]
python_version = "3.8" # Aligns with the version in the official Docker image we base off of.

[pipenv]
allow_prereleases = true
VScode seems to detect pipenv's presence and subsequently you can pick an interpreter (the one for the pipenv/venv) for the project.
Then again, I'm using Pylance, so YMMV