Might be related to this issue.
Marking the directory with venv as "excluded"
If it still hasn't been resolved, restart (I had tried)
I first saw this method here: https://intellij-support.jetbrains.com/hc/en-us/community/posts/22639845844498-Unexpected-type-s-int-Possible-type-s-SupportsIndex-slice-with-PyCharm-2024-3