src/eric7/Network/IRC/IrcWidget.py

branch
eric7
changeset 10428
a071d4065202
parent 10069
435cc5875135
child 10439
21c28b0f9e41
--- a/src/eric7/Network/IRC/IrcWidget.py	Wed Dec 20 11:06:38 2023 +0100
+++ b/src/eric7/Network/IRC/IrcWidget.py	Wed Dec 20 14:58:58 2023 +0100
@@ -53,7 +53,8 @@
         """
         Constructor
 
-        @param parent reference to the parent widget (QWidget)
+        @param parent reference to the parent widget
+        @type QWidget
         """
         super().__init__(parent)
         self.setupUi(self)
@@ -133,7 +134,8 @@
         """
         Public method to shut down the widget.
 
-        @return flag indicating successful shutdown (boolean)
+        @return flag indicating successful shutdown
+        @rtype bool
         """
         if self.__server:
             if Preferences.getIrc("AskOnShutdown"):
@@ -168,9 +170,12 @@
         """
         Private slot to connect to or disconnect from the given network.
 
-        @param name name of the network to connect to (string)
-        @param connect flag indicating to connect (boolean)
-        @param silent flag indicating a silent connect/disconnect (boolean)
+        @param name name of the network to connect to
+        @type str
+        @param connect flag indicating to connect
+        @type bool
+        @param silent flag indicating a silent connect/disconnect
+        @type bool
         """
         if connect:
             network = self.__ircNetworkManager.getNetwork(name)
@@ -302,8 +307,10 @@
         """
         Public slot to join a channel.
 
-        @param name name of the channel (string)
-        @param key key of the channel (string)
+        @param name name of the channel
+        @type str
+        @param key key of the channel
+        @type str
         """
         from .IrcChannelWidget import IrcChannelWidget
 
@@ -351,7 +358,9 @@
         Private method to handle a new private connection.
 
         @param match reference to the match object
-        @return flag indicating, if the message was handled (boolean)
+        @type re.Match
+        @return flag indicating, if the message was handled
+        @rtype bool
         """
         # group(1)   sender user name
         # group(2)   sender user@host
@@ -373,7 +382,8 @@
         """
         Private slot to open a private chat with the given user.
 
-        @param name name of the user (string)
+        @param name name of the user
+        @type str
         """
         from .IrcChannelWidget import IrcChannelWidget
 
@@ -449,7 +459,8 @@
         """
         Private slot handling the closing of a channel.
 
-        @param name name of the closed channel (string)
+        @param name name of the closed channel
+        @type str
         """
         for channel in self.__channelList:
             if channel.name() == name:
@@ -469,7 +480,8 @@
         Private slot to close a channel by pressing the close button of
         the channels widget.
 
-        @param index index of the tab to be closed (integer)
+        @param index index of the tab to be closed
+        @type int
         """
         channel = self.channelsWidget.widget(index)
         channel.requestLeave()
@@ -478,7 +490,8 @@
         """
         Private slot to send data to the IRC server.
 
-        @param data data to be sent (string)
+        @param data data to be sent
+        @type str
         """
         if self.__socket:
             self.__socket.write(QByteArray("{0}\r\n".format(data).encode("utf-8")))
@@ -619,6 +632,7 @@
         Private method to handle a server message containing a CTCP reply.
 
         @param match reference to the match object
+        @type re.Match
         """
         if "!" in match.group(1):
             sender = match.group(1).split("!", 1)[0]
@@ -658,7 +672,9 @@
         Private method to handle a server message containing a message name.
 
         @param match reference to the match object
-        @return flag indicating, if the message was handled (boolean)
+        @type re.Match
+        @return flag indicating, if the message was handled
+        @rtype bool
         """
         name = match.group(2)
         if name == "NOTICE":
@@ -740,7 +756,9 @@
         Private method to handle a server message containing a numeric code.
 
         @param match reference to the match object
-        @return flag indicating, if the message was handled (boolean)
+        @type re.Match
+        @return flag indicating, if the message was handled
+        @rtype bool
         """
         code = int(match.group(2))
         if code < 400:
@@ -752,9 +770,12 @@
         """
         Private slot to handle a server error reply.
 
-        @param code numerical code sent by the server (integer)
-        @param message message sent by the server (string)
-        @return flag indicating, if the message was handled (boolean)
+        @param code numerical code sent by the server
+        @type int
+        @param message message sent by the server
+        @type str
+        @return flag indicating, if the message was handled
+        @rtype bool
         """
         if code == 433:
             if self.__registering:
@@ -770,10 +791,14 @@
         """
         Private slot to handle a server reply.
 
-        @param code numerical code sent by the server (integer)
-        @param server name of the server (string)
-        @param message message sent by the server (string)
-        @return flag indicating, if the message was handled (boolean)
+        @param code numerical code sent by the server
+        @type int
+        @param server name of the server
+        @type str
+        @param message message sent by the server
+        @type str
+        @return flag indicating, if the message was handled
+        @rtype bool
         """
         # determine message type
         if code in [1, 2, 3, 4]:
@@ -869,7 +894,7 @@
         Private slot to handle errors reported by the TCP socket.
 
         @param error error code reported by the socket
-            (QAbstractSocket.SocketError)
+        @type QAbstractSocket.SocketError
         """
         if error == QAbstractSocket.SocketError.RemoteHostClosedError:
             # ignore this one, it's a disconnect
@@ -919,7 +944,8 @@
         """
         Private slot to handle SSL errors.
 
-        @param errors list of SSL errors (list of QSslError)
+        @param errors list of SSL errors
+        @type list of QSslError
         """
         ignored, defaultChanged = self.__sslErrorHandler.sslErrors(
             errors, self.__server.getName(), self.__server.getPort()
@@ -956,8 +982,10 @@
         """
         Private method to set the user privilege prefix.
 
-        @param prefix1 first part of the prefix (string)
-        @param prefix2 indictors the first part gets mapped to (string)
+        @param prefix1 first part of the prefix
+        @type str
+        @param prefix2 indictors the first part gets mapped to
+        @type str
         """
         # PREFIX=(ov)@+
         # o = @ -> @ircbot , channel operator
@@ -971,7 +999,9 @@
         Private method to handle a PING message.
 
         @param match reference to the match object
-        @return flag indicating, if the message was handled (boolean)
+        @type re.Match
+        @return flag indicating, if the message was handled
+        @rtype bool
         """
         self.__send("PONG " + match.group(1))
         return True
@@ -981,7 +1011,9 @@
         Private method to handle a CTCP command.
 
         @param match reference to the match object
-        @return flag indicating, if the message was handled (boolean)
+        @type re.Match
+        @return flag indicating, if the message was handled
+        @rtype bool
         """
         # group(1)   sender user name
         # group(2)   sender user@host
@@ -1093,7 +1125,8 @@
         """
         Private slot to use a new nick name.
 
-        @param nick nick name to use (str)
+        @param nick nick name to use
+        @type str
         """
         if nick and nick != self.__nickName:
             self.__send("NICK " + nick)
@@ -1102,7 +1135,8 @@
         """
         Private method to set the channel type prefixes.
 
-        @param prefixes channel prefix characters (string)
+        @param prefixes channel prefix characters
+        @type str
         """
         self.__channelTypePrefixes = prefixes
 
@@ -1110,8 +1144,10 @@
         """
         Public method to check, if the given name is a channel name.
 
-        @param name name to check (string)
-        @return flag indicating a channel name (boolean)
+        @param name name to check
+        @type str
+        @return flag indicating a channel name
+        @rtype bool
         """
         if not name:
             return False
@@ -1125,7 +1161,8 @@
         """
         Private slot handling the change of the away state.
 
-        @param isAway flag indicating the current away state (boolean)
+        @param isAway flag indicating the current away state
+        @type bool
         """
         if isAway and self.__identityName:
             identity = self.__ircNetworkManager.getIdentity(self.__identityName)

eric ide

mercurial