Why are stub files not created while using Pylance?

30 Views Asked by At

While using Python, I have my Pylance settings set to "strict", which causes it to detect missing stub files and cause an error when there is no stub file present for an import. When going to "quick fixes" and attempting to create a new stub file, nothing happens.

I attempted reinstalling it and switching to the pre-release version but both didn't work. By disabling it and installing Pyright, I am able to generate stub files but since Pylance uses Pyright, I am confused as to why this does not work. I would rather not convert to Pyright since Pylance has many more features but also am unable to use both at the same time since Pyright automatically disables itself when Pylance is present. Switching between both of them is also a hassle so I am looking for a solution to have Pylance generate stub files without using Pyright.

0

There are 0 best solutions below