I don’t know if this helps with your actual problem but if you use vscode you can enable inline typehints and all variables will show their inferred types right in the editor. I personally find it too noisy but it sounds almost like what you want to build so thought I’d mention it.