Alternatively you could append the following to the end of the line that is generating the error:
# type: ignore
That will silence any Pylance errors on that line only