21
21
from sentry_sdk ._compat import iteritems
22
22
23
23
try :
24
- from tornado import version_info as TORNADO_VERSION # type: ignore
24
+ from tornado import version_info as TORNADO_VERSION
25
25
from tornado .web import RequestHandler , HTTPError
26
26
from tornado .gen import coroutine
27
27
except ImportError :
@@ -58,7 +58,7 @@ def setup_once():
58
58
59
59
ignore_logger ("tornado.access" )
60
60
61
- old_execute = RequestHandler ._execute # type: ignore
61
+ old_execute = RequestHandler ._execute
62
62
63
63
awaitable = iscoroutinefunction (old_execute )
64
64
@@ -79,16 +79,16 @@ def sentry_execute_request_handler(self, *args, **kwargs): # type: ignore
79
79
result = yield from old_execute (self , * args , ** kwargs )
80
80
return result
81
81
82
- RequestHandler ._execute = sentry_execute_request_handler # type: ignore
82
+ RequestHandler ._execute = sentry_execute_request_handler
83
83
84
84
old_log_exception = RequestHandler .log_exception
85
85
86
86
def sentry_log_exception (self , ty , value , tb , * args , ** kwargs ):
87
87
# type: (Any, type, BaseException, Any, *Any, **Any) -> Optional[Any]
88
88
_capture_exception (ty , value , tb )
89
- return old_log_exception (self , ty , value , tb , * args , ** kwargs ) # type: ignore
89
+ return old_log_exception (self , ty , value , tb , * args , ** kwargs )
90
90
91
- RequestHandler .log_exception = sentry_log_exception # type: ignore
91
+ RequestHandler .log_exception = sentry_log_exception
92
92
93
93
94
94
@contextlib .contextmanager
@@ -105,7 +105,7 @@ def _handle_request_impl(self):
105
105
with Hub (hub ) as hub :
106
106
with hub .configure_scope () as scope :
107
107
scope .clear_breadcrumbs ()
108
- processor = _make_event_processor (weak_handler ) # type: ignore
108
+ processor = _make_event_processor (weak_handler )
109
109
scope .add_event_processor (processor )
110
110
111
111
transaction = Transaction .continue_from_headers (
@@ -155,7 +155,7 @@ def tornado_processor(event, hint):
155
155
request = handler .request
156
156
157
157
with capture_internal_exceptions ():
158
- method = getattr (handler , handler .request .method .lower ()) # type: ignore
158
+ method = getattr (handler , handler .request .method .lower ())
159
159
event ["transaction" ] = transaction_from_function (method )
160
160
161
161
with capture_internal_exceptions ():
0 commit comments