@@ -102,7 +102,7 @@ class TimerHandle(Handle):
102
102
103
103
def __init__ (self , when , callback , args , loop , context = None ):
104
104
if when is None :
105
- raise ValueError (' when cannot be None' )
105
+ raise ValueError (" when cannot be None" )
106
106
super ().__init__ (callback , args , loop , context )
107
107
if self ._source_traceback :
108
108
del self ._source_traceback [- 1 ]
@@ -663,7 +663,7 @@ def set_event_loop(self, loop):
663
663
"""Set the event loop."""
664
664
self ._local ._set_called = True
665
665
if loop is not None and not isinstance (loop , AbstractEventLoop ):
666
- raise TypeError (f' loop must be an instance of AbstractEventLoop or None, not { type (loop )} ' )
666
+ raise TypeError (f" loop must be an instance of AbstractEventLoop or None, not ' { type (loop ). __name__ } '" )
667
667
self ._local ._loop = loop
668
668
669
669
def new_event_loop (self ):
@@ -748,7 +748,7 @@ def set_event_loop_policy(policy):
748
748
If policy is None, the default policy is restored."""
749
749
global _event_loop_policy
750
750
if policy is not None and not isinstance (policy , AbstractEventLoopPolicy ):
751
- raise TypeError (f' policy must be an instance of AbstractEventLoopPolicy or None, not { type (policy )} ' )
751
+ raise TypeError (f" policy must be an instance of AbstractEventLoopPolicy or None, not ' { type (policy ). __name__ } '" )
752
752
_event_loop_policy = policy
753
753
754
754
0 commit comments