forked from VimPlug/jedi
Fix a lot of test related typing issues
This commit is contained in:
@@ -56,10 +56,10 @@ def test_generics_methods(code, expected, class_findable):
|
||||
class Reader(Generic[T]):
|
||||
@classmethod
|
||||
def read(cls) -> T:
|
||||
return cls()
|
||||
return cls() # type: ignore[return-value]
|
||||
|
||||
def method(self) -> T:
|
||||
return 1
|
||||
return 1 # type: ignore[return-value]
|
||||
|
||||
class Foo(Reader[str]):
|
||||
def transform(self) -> int:
|
||||
@@ -94,7 +94,7 @@ def test_signature():
|
||||
pass
|
||||
|
||||
from inspect import Signature, Parameter
|
||||
some_signature.__signature__ = Signature([
|
||||
some_signature.__signature__ = Signature([ # type: ignore[attr-defined]
|
||||
Parameter('bar', kind=Parameter.KEYWORD_ONLY, default=1)
|
||||
])
|
||||
|
||||
@@ -105,7 +105,7 @@ def test_signature():
|
||||
def test_compiled_signature_annotation_string():
|
||||
import typing
|
||||
|
||||
def func(x: typing.Type, y: typing.Union[typing.Type, int]):
|
||||
def func(x: typing.Type, y: typing.Union[typing.Type, int]): # type: ignore[type-arg]
|
||||
pass
|
||||
func.__name__ = 'not_func'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user