basedmypy
basedmypy copied to clipboard
`unsafe-variance` error has newlines in it which does not display correctly in vscode
Describe the problem, ie expected/actual result (if it's not blatantly obvious)
not sure if there are other errors in mypy with newlines in them. if so, i guess this is more of an upstream issue with vscode
>mypy test.py
test.py: note: In member "foo" of class "Foo":
test.py:7:26: error: This usage of this covariant type variable is unsafe as an input parameter.
If this is intentional and you know what you are doing, you can ignore
this line with 'unsafe-variance' [misc]
def foo(self, value: T_co):
^
Found 1 error in 1 file (checked 1 source file)

Gist to reproduce
from typing import Generic
from basedtyping import T_co
class Foo(Generic[T_co]):
def foo(self, value: T_co):
...
Basedmypy version
1.4.0
Command-line flags
No response
Configuration options from pyproject.toml (and other config files)
No response
Python version used
3.10
Operating system and version
windows 10
lol, yeah sus