VSCode Pylance Errors on FastAPI Response Type that Converts
I’m using VSCode and the default Python Language Support extension from MS, whcih lints with Pylance. I have a Python 3.12 FastAPI project which uses type annotations to indicate which models should be returned as responses from the handlers using the pattern suggested by the FastAPI docs (https://fastapi.tiangolo.com/tutorial/response-model/#return-type-and-data-filtering). There are no errors when the code is run and the app works correctly, returning the correct results in the correct models. However, I get Pylance linting errors that my function return types are not compatible with my returns.