For example the following (silly) example will raise an error within vscode:
class Something:
def __init__(self, x):
self.x = x
def something_else(self, y) -> Something:
return Something(self.x + y)
Seen here:
Where as mypy script.py
will return no errors.
I'm not sure what the difference is here, but I'd rather mypy took priority as that's what I'm using to catch type errors.