@@ -70,7 +70,7 @@ def _handle(self, error: Exception, *args, **kwargs):
7070
7171class ErrorHandler (ABC ):
7272 @abstractmethod
73- def _handle (self , error : Exception , * args , ** kwargs ) -> None : # type: ignore
73+ def _handle (self , error : Exception , * args , ** kwargs ) -> None : # type: ignore[misc, no-untyped-def]
7474 """
7575 Handle an exception
7676 """
@@ -84,7 +84,7 @@ class _DefaultErrorHandler(ErrorHandler):
8484 """
8585
8686 # pylint: disable=useless-return
87- def _handle (self , error : Exception , * args , ** kwargs ) -> None : # type: ignore
87+ def _handle (self , error : Exception , * args , ** kwargs ) -> None : # type: ignore[no-untyped-def]
8888 logger .exception ("Error handled by default error handler: " )
8989 return None
9090
@@ -110,22 +110,22 @@ def __enter__(self) -> None:
110110 pass
111111
112112 # pylint: disable=no-self-use
113- def __exit__ (self , exc_type , exc_value , traceback ) -> Optional [bool ]: # type: ignore
113+ def __exit__ (self , exc_type , exc_value , traceback ) -> Optional [bool ]: # type: ignore[no-untyped-def]
114114 if exc_value is None : # type: ignore
115115 return None
116116
117117 plugin_handled = False
118118
119- error_handler_entry_points = entry_points ( # type: ignore
119+ error_handler_entry_points = entry_points ( # type: ignore[misc]
120120 group = "opentelemetry_error_handler"
121121 )
122122
123- for error_handler_entry_point in error_handler_entry_points :
124- error_handler_class = error_handler_entry_point .load () # type: ignore
123+ for error_handler_entry_point in error_handler_entry_points : # type: ignore[misc]
124+ error_handler_class = error_handler_entry_point .load () # type: ignore[misc]
125125
126- if issubclass (error_handler_class , exc_value .__class__ ): # type: ignore
126+ if issubclass (error_handler_class , exc_value .__class__ ): # type: ignore[misc]
127127 try :
128- error_handler_class ()._handle (exc_value ) # type: ignore
128+ error_handler_class ()._handle (exc_value ) # type: ignore[misc]
129129 plugin_handled = True
130130
131131 # pylint: disable=broad-exception-caught
@@ -134,11 +134,11 @@ def __exit__(self, exc_type, exc_value, traceback) -> Optional[bool]: # type: i
134134 "%s error while handling error"
135135 " %s by error handler %s" ,
136136 error_handling_error .__class__ .__name__ ,
137- exc_value .__class__ .__name__ , # type: ignore
138- error_handler_class .__name__ , # type: ignore
137+ exc_value .__class__ .__name__ , # type: ignore[misc]
138+ error_handler_class .__name__ , # type: ignore[misc]
139139 )
140140
141141 if not plugin_handled :
142- _DefaultErrorHandler ()._handle (exc_value ) # type: ignore
142+ _DefaultErrorHandler ()._handle (exc_value ) # type: ignore[misc]
143143
144144 return True
0 commit comments