@@ -300,7 +300,7 @@ def bar(foo):
300300# chasing coverage numbers
301301def test_repr (dm : DeviceManager ):
302302 s1 = Mock ()
303- s2 = Mock ()
303+ s2 : type [ OphydV1Device ] = Mock () # type: ignore
304304 s2 .__name__ = "S2"
305305
306306 @dm .factory
@@ -588,10 +588,10 @@ def foo():
588588
589589
590590def test_v1_device_factory (dm : DeviceManager ):
591- s1 = MagicMock (spec = OphydV1Device ) # type: ignore
591+ s1 = Mock (spec = OphydV1Device )
592592 s1 .__name__ = "S1"
593593
594- @dm .v1_init (s1 , prefix = "S1_PREFIX" )
594+ @dm .v1_init (s1 , prefix = "S1_PREFIX" ) # type: ignore
595595 def foo (_ ):
596596 pass
597597
@@ -609,20 +609,20 @@ def test_v1_v2_name_clash(dm: DeviceManager):
609609 s2 = MagicMock ()
610610
611611 @dm .factory
612- def foo ():
612+ def foo (): # type: ignore foo is overridden below
613613 return s1 ()
614614
615615 with pytest .raises (ValueError , match = "name" ):
616616
617- @dm .v1_init (s2 , prefix = "S2_PREFIX" )
617+ @dm .v1_init (s2 , prefix = "S2_PREFIX" ) # type:ignore
618618 def foo (_ ):
619619 pass
620620
621621
622622def test_v1_decorator_is_transparent (dm : DeviceManager ):
623623 s1 = MagicMock ()
624624
625- @dm .v1_init (s1 , prefix = "S1_PREFIX" )
625+ @dm .v1_init (s1 , prefix = "S1_PREFIX" ) # type: ignore
626626 def foo (s ):
627627 # arbitrary setup method
628628 s .special_init_method ()
@@ -637,7 +637,7 @@ def foo(s):
637637def test_v1_no_wait (dm : DeviceManager ):
638638 s1 = Mock ()
639639
640- @dm .v1_init (s1 , prefix = "S1_PREFIX" , wait = False )
640+ @dm .v1_init (s1 , prefix = "S1_PREFIX" , wait = False ) # type: ignore
641641 def foo (_ ):
642642 pass
643643
@@ -658,7 +658,7 @@ def test_v1_mocking(dm: DeviceManager):
658658 s1 = Mock ()
659659 s1 .return_value = Mock (spec = OphydV1Device )
660660
661- @dm .v1_init (s1 , prefix = "S1_PREFIX" , mock = True )
661+ @dm .v1_init (s1 , prefix = "S1_PREFIX" , mock = True ) # type: ignore
662662 def foo (_ ):
663663 pass
664664
@@ -677,7 +677,7 @@ def test_v1_init_params(dm: DeviceManager):
677677 def one ():
678678 return "one"
679679
680- @dm .v1_init (s1 , prefix = "S1_PREFIX" , wait = False )
680+ @dm .v1_init (s1 , prefix = "S1_PREFIX" , wait = False ) # type: ignore
681681 def foo (s , one , two ):
682682 s .set_up_with (one , two )
683683
@@ -752,7 +752,7 @@ def foo():
752752 """This is the docstring for foo"""
753753 return Mock ()
754754
755- @dm .v1_init (Mock (), prefix = "MOCK_PREFIX" )
755+ @dm .v1_init (Mock (), prefix = "MOCK_PREFIX" ) # type: ignore
756756 def bar (_ ):
757757 """This is the docstring for bar"""
758758 pass
0 commit comments