Crazy bug where basedpyright loses its mind and finds the definition in a completely different project

Second time today: I start getting strange errors that are not real : can’t find symbols in a file that I know is right there, and it had no problem with previously.

Amazingly, if I “Go to Definition” it takes me to a file (of the same name) in a completely different project. Very strange indeed.

Eventually, some combination of:

  • restarting cursor
  • blowing away my .venv and re poetry install
  • restarting basedpyright

Strangely, this same thing happened in a different project earlier today