Pyright with nvim_lspconfig: weird errors about importing and exporting stuff

I have no idea why there are so many warnings as follows.
Note that the code works fine, and I can use something like cp.Variable but pyright keeps saying that
"Variable" is not exported from module cvxpy.

  1. How to make it work properly?
  2. Is there any way to configure settings to make some exceptions? For example, I wanna avoid some checks of PEPxyz, PEPabc, etc.