Closes #40966 Closes #41195 Closes #40980 Release Notes: - Fixed diagnostics not working with basedpyright/pyright beyond an initial version of the document --------- Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com> Co-authored-by: Anthony Eid <hello@anthonyeid.me> Co-authored-by: dino <dinojoaocosta@gmail.com>