'Vscode how to disable type annotation in pylance
I recently switched to vscode for python but I'm having a bit of trouble with overzealous completions in pylance.
Specially with function overrides, pylance seems to just automatically infer the types and inject annotations everywhere. I'd like to disable the annotations completion without disabling the entire autocompletion.
is it possible?
For example, when I create new class.
class MyClass:
def __ini
this is what autocompletion does:
class MyClass:
def __init__(self) -> None:
pass
it's very annoying to have to delete text added by an autocomplete I only want this:
class MyClass:
def __init__(self):
Solution 1:[1]
This is currently a bug in the product, but a proposal to fix the behavior exists in the form of a GitHub discussion. You can see that discussion here: https://github.com/microsoft/pylance-release/discussions/2593
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Jacob J Callahan |