-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the problem, ie expected/actual result (if it's not blatantly obvious)
test.py:21: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): # type:ignore[unsafe-variance]
^
test.py:21:26: note: Error code "misc" not covered by "type: ignore" comment
Found 2 errors 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): # type:ignore[unsafe-variance]
...
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
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working