MultiHub Forum

Full Version: Why do type hints disappear for certain libraries in PyCharm?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey, has anyone else run into this weird thing where your IDE just stops showing type hints for certain libraries? I was working on a project yesterday and all of a sudden, PyCharm acted like it had no idea what types were coming back from requests, even though everything still runs fine. It’s throwing me off more than I expected.
That sounds frustrating type hints just vanish sometimes and you end up guessing what a call should return
Could be a cache issue in the IDE or a mismatch between the runtime and the stubs that makes type hints disappear until you reload
If you are on PyCharm check which interpreter and which virtual env the project uses and whether the type hints caching got out of sync
Maybe the requests library changed its typing surface in a minor version and the type hints in your env no longer line up
Rethink the framing the issue might be more about how IDEs fetch type hints than about the code itself
A quick stress test is to reset the IDE caches and force a reindex then reopen the project see if the type hints come back