@@ -32,7 +32,7 @@ def __init__(
32
32
nickserv_password : str = "" ,
33
33
port : int = 6667 ,
34
34
use_ssl : bool = True ,
35
- ssl_connection_factory : irc .connection .Factory = None
35
+ ssl_connection_factory : irc .connection .Factory = None ,
36
36
) -> None :
37
37
self .channel = channel # type: irc.bot.Channel
38
38
self .zulip_client = zulip_client
@@ -47,17 +47,21 @@ def __init__(
47
47
if ssl_connection_factory :
48
48
self .connection_factory = ssl_connection_factory
49
49
else :
50
- self .connection_factory = irc .connection .AioFactory (ssl = ssl .create_default_context ())
50
+ self .connection_factory = irc .connection .AioFactory (
51
+ ssl = ssl .create_default_context ()
52
+ )
51
53
else :
52
54
self .connection_factory = irc .connection .AioFactory ()
53
55
54
56
connect_params = {}
55
- connect_params [' connect_factory' ] = self .connection_factory
57
+ connect_params [" connect_factory" ] = self .connection_factory
56
58
57
59
# Make sure the bot is subscribed to the stream
58
60
self .check_subscription_or_die ()
59
61
# Initialize IRC bot after proper connection to Zulip server has been confirmed.
60
- irc .bot .SingleServerIRCBot .__init__ (self , [irc .bot .ServerSpec (server , port )], nickname , nickname , ** connect_params )
62
+ irc .bot .SingleServerIRCBot .__init__ (
63
+ self , [irc .bot .ServerSpec (server , port )], nickname , nickname , ** connect_params
64
+ )
61
65
62
66
def zulip_sender (self , sender_string : str ) -> str :
63
67
nick = sender_string .split ("!" )[0 ]
@@ -67,7 +71,7 @@ def connect(self, *args: Any, **kwargs: Any) -> None:
67
71
# Taken from
68
72
# https://github.com/jaraco/irc/blob/main/irc/client_aio.py,
69
73
# in particular the method of AioSimpleIRCClient
70
- kwargs [' connect_factory' ] = self .connection_factory
74
+ kwargs [" connect_factory" ] = self .connection_factory
71
75
self .c = self .reactor .loop .run_until_complete (self .connection .connect (* args , ** kwargs ))
72
76
print ("Listening now. Please send an IRC message to verify operation" )
73
77
0 commit comments