mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
Add type: ignore for tornado_ioloop_logging Tornado versioning code.
This commit is contained in:
@@ -10,9 +10,9 @@ from django.conf import settings
|
||||
|
||||
try:
|
||||
# Tornado 2.4
|
||||
orig_poll_impl = ioloop._poll
|
||||
orig_poll_impl = ioloop._poll # type: ignore # cross-version type variation is hard for mypy
|
||||
def instrument_tornado_ioloop():
|
||||
ioloop._poll = InstrumentedPoll
|
||||
ioloop._poll = InstrumentedPoll # type: ignore # cross-version type variation is hard for mypy
|
||||
except:
|
||||
# Tornado 3
|
||||
from tornado.ioloop import IOLoop, PollIOLoop
|
||||
@@ -21,7 +21,7 @@ except:
|
||||
# be epoll.
|
||||
orig_poll_impl = select.epoll
|
||||
class InstrumentedPollIOLoop(PollIOLoop):
|
||||
def initialize(self, **kwargs):
|
||||
def initialize(self, **kwargs): # type: ignore # TODO investigate likely buggy monkey patching here
|
||||
super(InstrumentedPollIOLoop, self).initialize(impl=InstrumentedPoll(), **kwargs)
|
||||
|
||||
def instrument_tornado_ioloop():
|
||||
|
||||
Reference in New Issue
Block a user