Some small typing improvements for tests

This commit is contained in:
Dave Halter
2026-02-16 21:20:27 +01:00
parent 8cbb817b12
commit ea09983566
2 changed files with 3 additions and 3 deletions

View File

@@ -136,7 +136,7 @@ def goto_or_help_or_infer(request, Script):
def do(code, *args, **kwargs):
return getattr(Script(code), request.param)(*args, **kwargs)
do.type = request.param
do.type = request.param # type: ignore[attr-defined]
return do

View File

@@ -810,11 +810,11 @@ def test_try_to_use_return_annotation_for_property(class_is_findable):
raise BaseException
@property
def with_annotation_garbage1(self) -> 'asldjflksjdfljdslkjfsl': # noqa
def with_annotation_garbage1(self) -> 'asldjflksjdfljdslkjfsl': # type: ignore[name-defined] # noqa
return Hello()
@property
def with_annotation_garbage2(self) -> 'sdf$@@$5*+8': # noqa
def with_annotation_garbage2(self) -> 'sdf & 8': # type: ignore[valid-type] # noqa
return Hello()
@property