Inlay Hints Variable Types Not Respected in VS Code
Summary
The "Inlay Hints: Variable Types" setting for both User and Workspace are not respected in the VS Code extension.
VS Code version 1.107.1
Example code:
import pandas as pd
temp = {}
ref_df = pd.DataFrame.from_records(
list(temp.values()),
index=list(temp.keys()),
columns=["start_date", "end_date"],
)
Version
ty 0.0.6
This setting seems to be working when I tried to reproduce it locally. Could these inlay hints be coming from pylance?
I do have pylance installed, but have my language server set to None as per the editor integration page:
The default for pylance, and my current setting, is to have variable type inlay hints off:
Updated to 0.0.8 and this is still occurring. It's definitely coming from ty or some unexpected interaction with ty.
https://github.com/user-attachments/assets/e466b5eb-a0fb-4d6d-bdf1-17b65693adec
https://github.com/user-attachments/assets/fcd04906-e04c-43a1-8254-f5e809914d7e
I just realized I also had a ty dependency in my pyproject.toml that was causing the whole thing. Thank you for your time.
No worries. I'm glad you figured it out and thanks for letting us know that it's now working. Happy holidays