File tree 1 file changed +11
-8
lines changed
1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 45
45
.. [IRC specifications] http://www.irchelp.org/irchelp/rfc/
46
46
"""
47
47
48
+ from __future__ import annotations
49
+
48
50
import abc
49
51
import base64
50
52
import bisect
60
62
import threading
61
63
import time
62
64
import warnings
65
+ from typing import Callable
63
66
64
67
import jaraco .functools
65
68
from jaraco .functools import Throttler
@@ -131,14 +134,14 @@ def __init__(self, reactor):
131
134
@jaraco .functools .save_method_args
132
135
def connect (
133
136
self ,
134
- server ,
135
- port ,
136
- nickname ,
137
- password = None ,
138
- username = None ,
139
- ircname = None ,
137
+ server : str ,
138
+ port : int ,
139
+ nickname : str ,
140
+ password : str | None = None ,
141
+ username : str | None = None ,
142
+ ircname : str | None = None ,
140
143
connect_factory = connection .Factory (),
141
- sasl_login = None ,
144
+ sasl_login : str | None = None ,
142
145
):
143
146
"""Connect/reconnect to a server.
144
147
@@ -169,7 +172,7 @@ def connect(
169
172
self .disconnect ("Changing servers" )
170
173
171
174
self .buffer = self .buffer_class ()
172
- self .handlers = {}
175
+ self .handlers : dict [ str , Callable ] = {}
173
176
self .real_server_name = ""
174
177
self .real_nickname = nickname
175
178
self .server = server
You can’t perform that action at this time.
0 commit comments