Пример #1
0
 def python_check_callback(self, *args):
     # There's a pylint bug (pylint 2.9.3, astroid 2.6.2) that causes pylint to crash
     # with an AttributeError on certain types of arguments-differ errors
     # But code in _ffi/loop depends on being able to find the watcher_ptr
     # argument is the local frame. BUT it gets invoked before the function body runs.
     # Hence the override of _find_watcher_ptr_in_traceback.
     # pylint:disable=unused-variable
     _loop, watcher_ptr, _events = args
     AbstractCallbacks.python_check_callback(self, watcher_ptr)
Пример #2
0
 def _find_watcher_ptr_in_traceback(self, tb):
     if tb is not None:
         l = tb.tb_frame.f_locals
         if 'watcher_ptr' in l:
             return l['watcher_ptr']
         if 'args' in l and len(l['args']) == 3:
             return l['args'][1]
     return AbstractCallbacks._find_watcher_ptr_in_traceback(self, tb)
Пример #3
0
 def python_prepare_callback(self, _loop_ptr, watcher_ptr, _events):
     AbstractCallbacks.python_prepare_callback(self, watcher_ptr)
Пример #4
0
 def python_prepare_callback(self, _loop_ptr, watcher_ptr, _events):
     AbstractCallbacks.python_prepare_callback(self, watcher_ptr)