-
Analyzing Transformers seems to take a very long time, and it significantly slows down the autocompletion. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I assume that you have Another option is to generate type stubs for this library. You can either use pyright's built-in stub generation or another tool like stubgen. If you have stubs (even ones that are incomplete), pyright will use them rather than attempting to extract type information from the source code. |
Beta Was this translation helpful? Give feedback.
I assume that you have
useLibraryCodeForTypes
enabled? If so, you could disable it. By default, it's off in pyright (but on in pylance). That would explain why you're seeing poor performance because this is an untyped library, so pyright needs to do significant work to try to infer types from the source.Another option is to generate type stubs for this library. You can either use pyright's built-in stub generation or another tool like stubgen. If you have stubs (even ones that are incomplete), pyright will use them rather than attempting to extract type information from the source code.