@@ -394,13 +394,13 @@ def add_reader(self, fd, callback, *args):
394
394
else :
395
395
# this is necessary to avoid race condition-like issues
396
396
existing .setEnabled (False )
397
- existing .activated .disconnect ()
397
+ existing .activated [ 'int' ] .disconnect ()
398
398
# will get overwritten by the assignment below anyways
399
399
400
400
notifier = QtCore .QSocketNotifier (fd , QtCore .QSocketNotifier .Read )
401
401
notifier .setEnabled (True )
402
402
self ._logger .debug ('Adding reader callback for file descriptor {}' .format (fd ))
403
- notifier .activated .connect (
403
+ notifier .activated [ 'int' ] .connect (
404
404
lambda : self .__on_notifier_ready (
405
405
self ._read_notifiers , notifier , fd , callback , args ) # noqa: C812
406
406
)
@@ -430,13 +430,13 @@ def add_writer(self, fd, callback, *args):
430
430
else :
431
431
# this is necessary to avoid race condition-like issues
432
432
existing .setEnabled (False )
433
- existing .activated .disconnect ()
433
+ existing .activated [ 'int' ] .disconnect ()
434
434
# will get overwritten by the assignment below anyways
435
435
436
436
notifier = QtCore .QSocketNotifier (fd , QtCore .QSocketNotifier .Write )
437
437
notifier .setEnabled (True )
438
438
self ._logger .debug ('Adding writer callback for file descriptor {}' .format (fd ))
439
- notifier .activated .connect (
439
+ notifier .activated [ 'int' ] .connect (
440
440
lambda : self .__on_notifier_ready (
441
441
self ._write_notifiers , notifier , fd , callback , args ) # noqa: C812
442
442
)
@@ -470,7 +470,7 @@ def __notifier_cb_wrapper(self, notifiers, notifier, fd, callback, args):
470
470
if notifiers .get (fd , None ) is notifier :
471
471
notifier .setEnabled (True )
472
472
else :
473
- notifier .activated .disconnect ()
473
+ notifier .activated [ 'int' ] .disconnect ()
474
474
475
475
def __on_notifier_ready (self , notifiers , notifier , fd , callback , args ):
476
476
if fd not in notifiers :
0 commit comments