Continued correcting doc strings by using the new doc string checker.

Sun, 29 Sep 2013 14:12:38 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 29 Sep 2013 14:12:38 +0200
changeset 2960
9453efa25fd5
parent 2959
86ad8854361b
child 2961
e4e2efb4846a

Continued correcting doc strings by using the new doc string checker.

MultiProject/AddProjectDialog.py file | annotate | diff | comparison | revisions
MultiProject/MultiProjectBrowser.py file | annotate | diff | comparison | revisions
Network/IRC/IrcChannelEditDialog.py file | annotate | diff | comparison | revisions
Network/IRC/IrcChannelWidget.py file | annotate | diff | comparison | revisions
Network/IRC/IrcIdentitiesEditDialog.py file | annotate | diff | comparison | revisions
Network/IRC/IrcMessageEdit.py file | annotate | diff | comparison | revisions
Network/IRC/IrcNetworkListDialog.py file | annotate | diff | comparison | revisions
Network/IRC/IrcNetworkManager.py file | annotate | diff | comparison | revisions
Network/IRC/IrcNetworkWidget.py file | annotate | diff | comparison | revisions
Network/IRC/IrcWidget.py file | annotate | diff | comparison | revisions
PluginManager/PluginInstallDialog.py file | annotate | diff | comparison | revisions
PluginManager/PluginManager.py file | annotate | diff | comparison | revisions
PluginManager/PluginRepositoryDialog.py file | annotate | diff | comparison | revisions
Plugins/CheckerPlugins/Pep8/Pep8Dialog.py file | annotate | diff | comparison | revisions
Plugins/CheckerPlugins/Pep8/Pep8Fixer.py file | annotate | diff | comparison | revisions
--- a/MultiProject/AddProjectDialog.py	Sun Sep 29 12:04:35 2013 +0200
+++ b/MultiProject/AddProjectDialog.py	Sun Sep 29 14:12:38 2013 +0200
@@ -82,16 +82,20 @@
                 self.descriptionEdit.toPlainText())
     
     @pyqtSlot(str)
-    def on_nameEdit_textChanged(self, p0):
+    def on_nameEdit_textChanged(self, txt):
         """
         Private slot called when the project name has changed.
+        
+        @param txt text of the edit (string)
         """
         self.__updateUi()
     
     @pyqtSlot(str)
-    def on_filenameEdit_textChanged(self, p0):
+    def on_filenameEdit_textChanged(self, txt):
         """
         Private slot called when the project filename has changed.
+        
+        @param txt text of the edit (string)
         """
         self.__updateUi()
     
--- a/MultiProject/MultiProjectBrowser.py	Sun Sep 29 12:04:35 2013 +0200
+++ b/MultiProject/MultiProjectBrowser.py	Sun Sep 29 14:12:38 2013 +0200
@@ -23,7 +23,7 @@
         """
         Constructor
         
-        @param project reference to the multi project object
+        @param multiProject reference to the multi project object
         @param parent parent widget (QWidget)
         """
         super().__init__(parent)
@@ -107,6 +107,8 @@
     def __projectOpened(self, projectfile):
         """
         Private slot to handle the opening of a project.
+        
+        @param projectfile file name of the opened project file (string)
         """
         project = {
             'name': "",
--- a/Network/IRC/IrcChannelEditDialog.py	Sun Sep 29 12:04:35 2013 +0200
+++ b/Network/IRC/IrcChannelEditDialog.py	Sun Sep 29 14:12:38 2013 +0200
@@ -44,6 +44,8 @@
     def on_nameEdit_textChanged(self, txt):
         """
         Private slot to handle changes of the given name.
+        
+        @param txt text of the edit (string)
         """
         self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(txt != "")
     
--- a/Network/IRC/IrcChannelWidget.py	Sun Sep 29 12:04:35 2013 +0200
+++ b/Network/IRC/IrcChannelWidget.py	Sun Sep 29 14:12:38 2013 +0200
@@ -129,7 +129,7 @@
         Private method to convert an icon to an away icon.
         
         @param icon icon to be converted (QIcon)
-        @param away icon (QIcon)
+        @return away icon (QIcon)
         """
         pix1 = icon.pixmap(16, 16)
         pix2 = UI.PixmapCache.getPixmap("ircAway.png")
@@ -936,7 +936,7 @@
         """
         Private method to handle a CTCP channel command.
         
-        @param reference to the match object
+        @param match reference to the match object
         @return flag indicating, if the message was handled (boolean)
         """
         # group(1)   sender user name
@@ -1005,7 +1005,7 @@
         Private method to extract the user privileges out of the name.
         
         @param name user name and prefixes (string)
-        return list of privileges and user name (list of string, string)
+        @return list of privileges and user name (list of string, string)
         """
         privileges = []
         while name[0] in self.__prefixToPrivilege:
@@ -1023,7 +1023,6 @@
         
         @param indicator indicator to be shown (string)
         @param message message to be shown (string)
-        @keyparam isLocal flag indicating a message related to the local user (boolean)
         """
         if indicator == self.JoinIndicator:
             color = Preferences.getIrc("JoinChannelColour")
@@ -1038,6 +1037,8 @@
     def __appendMessage(self, message):
         """
         Private slot to append a message.
+        
+        @param message message to be appended (string)
         """
         if self.__hidden and \
            self.__markerLine == "" and \
@@ -1688,5 +1689,7 @@
     def on_messages_anchorClicked(self, url):
         """
         Private slot to open links in the default browser.
+        
+        @param url URL to be opened (QUrl)
         """
         QDesktopServices.openUrl(url)
--- a/Network/IRC/IrcIdentitiesEditDialog.py	Sun Sep 29 12:04:35 2013 +0200
+++ b/Network/IRC/IrcIdentitiesEditDialog.py	Sun Sep 29 14:12:38 2013 +0200
@@ -94,6 +94,8 @@
     def on_identitiesCombo_currentIndexChanged(self, identity):
         """
         Private slot to handle the selection of an identity.
+        
+        @param identity selected identity (string)
         """
         if identity == IrcIdentity.DefaultIdentityDisplay:
             identity = IrcIdentity.DefaultIdentityName
@@ -343,7 +345,8 @@
     
     def __updateNicknameButtons(self):
         """
-        Private slot to update the nick name buttons except the up and down buttons.
+        Private slot to update the nick name buttons except the up and
+        down buttons.
         """
         self.nicknameDeleteButton.setEnabled(
             len(self.nicknamesList.selectedItems()) != 0)
@@ -354,6 +357,8 @@
     def on_nicknameEdit_textEdited(self, nick):
         """
         Private slot handling a change of the nick name.
+        
+        @param nick new nick name (string)
         """
         sel = self.nicknamesList.selectedItems()
         if sel:
--- a/Network/IRC/IrcMessageEdit.py	Sun Sep 29 12:04:35 2013 +0200
+++ b/Network/IRC/IrcMessageEdit.py	Sun Sep 29 14:12:38 2013 +0200
@@ -69,7 +69,7 @@
         """
         Protected slot to support wheel events.
         
-        @param reference to the wheel event (QWheelEvent)
+        @param evt reference to the wheel event (QWheelEvent)
         """
         if evt.delta() > 0:
             self.__getHistory(True)
--- a/Network/IRC/IrcNetworkListDialog.py	Sun Sep 29 12:04:35 2013 +0200
+++ b/Network/IRC/IrcNetworkListDialog.py	Sun Sep 29 14:12:38 2013 +0200
@@ -156,7 +156,8 @@
             networkName = itm.text(0)
             res = E5MessageBox.yesNo(self,
                 self.trUtf8("Delete Irc Network"),
-                self.trUtf8("""Do you really want to delete IRC network <b>{0}</b>?""")\
+                self.trUtf8(
+                    """Do you really want to delete IRC network <b>{0}</b>?""")
                     .format(networkName))
             if res:
                 index = self.networksList.indexOfTopLevelItem(itm)
@@ -169,6 +170,8 @@
     def on_networksList_itemExpanded(self, item):
         """
         Private slot handling the expansion of a top level item.
+        
+        @param item reference to the expanded item (QTreeWidgetItem)
         """
         self.__resizeColumns()
     
@@ -176,6 +179,8 @@
     def on_networksList_itemCollapsed(self, item):
         """
         Private slot handling the collapse of a top level item.
+        
+        @param item reference to the collapsed item (QTreeWidgetItem)
         """
         self.__resizeColumns()
     
--- a/Network/IRC/IrcNetworkManager.py	Sun Sep 29 12:04:35 2013 +0200
+++ b/Network/IRC/IrcNetworkManager.py	Sun Sep 29 14:12:38 2013 +0200
@@ -77,17 +77,20 @@
         self.__nickNames = Preferences.toList(settings.value("NickNames", []))
         self.__serviceName = settings.value("ServiceName", "")
         self.__password = settings.value("Password", "")
-        self.__quitMessage = settings.value("QuitMessage", IrcIdentity.DefaultQuitMessage)
-        self.__partMessage = settings.value("PartMessage", IrcIdentity.DefaultPartMessage)
+        self.__quitMessage = settings.value(
+            "QuitMessage", IrcIdentity.DefaultQuitMessage)
+        self.__partMessage = settings.value(
+            "PartMessage", IrcIdentity.DefaultPartMessage)
         self.__rememberPosOnAway = Preferences.toBool(
             settings.value("RememberAwayPosition", True))
-        self.__awayMessage = settings.value("AwayMessage", IrcIdentity.DefaultAwayMessage)
+        self.__awayMessage = settings.value(
+            "AwayMessage", IrcIdentity.DefaultAwayMessage)
     
     def setName(self, name):
         """
         Public method to set the identity name.
         
-        @param identity name (string)
+        @param name identity name (string)
         """
         self.__name = name
     
@@ -135,7 +138,7 @@
         """
         Public method to set the nick names of the identity.
         
-        @param name nick names (list of string)
+        @param names nick names (list of string)
         """
         self.__nickNames = names[:]
     
@@ -340,7 +343,7 @@
         """
         Public method to set the server port number.
         
-        @param server port number (integer)
+        @param port server port number (integer)
         """
         self.__port = port
     
@@ -520,7 +523,7 @@
         """
         Public method to set the network name.
         
-        @param network name (string)
+        @param name network name (string)
         """
         self.__name = name
     
--- a/Network/IRC/IrcNetworkWidget.py	Sun Sep 29 12:04:35 2013 +0200
+++ b/Network/IRC/IrcNetworkWidget.py	Sun Sep 29 14:12:38 2013 +0200
@@ -25,7 +25,8 @@
     """
     Class implementing the network part of the IRC widget.
     
-    @signal connectNetwork(str,bool) emitted to connect or disconnect from a network
+    @signal connectNetwork(str,bool) emitted to connect or disconnect from
+        a network
     @signal editNetwork(str) emitted to edit a network configuration
     @signal joinChannel(str) emitted to join a channel
     @signal nickChanged(str) emitted to change the nick name
@@ -59,7 +60,8 @@
         self.nickCombo.setEnabled(False)
         self.awayButton.setEnabled(False)
         
-        self.channelCombo.lineEdit().returnPressed.connect(self.on_joinButton_clicked)
+        self.channelCombo.lineEdit().returnPressed.connect(
+            self.on_joinButton_clicked)
         self.nickCombo.lineEdit().returnPressed.connect(
             self.on_nickCombo_currentIndexChanged)
         
@@ -133,12 +135,15 @@
         """
         if self.__away:
             self.sendData.emit("AWAY")
-            self.awayButton.setIcon(UI.PixmapCache.getIcon("ircUserPresent.png"))
+            self.awayButton.setIcon(
+                UI.PixmapCache.getIcon("ircUserPresent.png"))
             self.__away = False
         else:
             networkName = self.networkCombo.currentText()
-            identityName = self.__manager.getNetwork(networkName).getIdentityName()
-            awayMessage = self.__manager.getIdentity(identityName).getAwayMessage()
+            identityName = self.__manager.getNetwork(networkName)\
+                .getIdentityName()
+            awayMessage = self.__manager.getIdentity(identityName)\
+                .getAwayMessage()
             self.sendData.emit("AWAY :" + awayMessage)
             self.awayButton.setIcon(UI.PixmapCache.getIcon("ircUserAway.png"))
             self.__away = True
@@ -284,11 +289,13 @@
         """
         self.__connected = connected
         if self.__connected:
-            self.connectButton.setIcon(UI.PixmapCache.getIcon("ircDisconnect.png"))
+            self.connectButton.setIcon(
+                UI.PixmapCache.getIcon("ircDisconnect.png"))
             self.connectButton.setToolTip(
                 self.trUtf8("Press to disconnect from the network"))
         else:
-            self.connectButton.setIcon(UI.PixmapCache.getIcon("ircConnect.png"))
+            self.connectButton.setIcon(
+                UI.PixmapCache.getIcon("ircConnect.png"))
             self.connectButton.setToolTip(
                 self.trUtf8("Press to connect to the selected network"))
     
@@ -304,7 +311,7 @@
         """
         Public slot to set the registered state.
         
-        @param connected flag indicating the connection state (boolean)
+        @param registered flag indicating the registration state (boolean)
         """
         self.__registered = registered
         on = bool(self.channelCombo.currentText()) and self.__registered
@@ -312,7 +319,8 @@
         self.nickCombo.setEnabled(registered)
         self.awayButton.setEnabled(registered)
         if registered:
-            self.awayButton.setIcon(UI.PixmapCache.getIcon("ircUserPresent.png"))
+            self.awayButton.setIcon(
+                UI.PixmapCache.getIcon("ircUserPresent.png"))
             self.__away = False
     
     def __clearMessages(self):
@@ -323,13 +331,15 @@
     
     def __copyMessages(self):
         """
-        Private slot to copy the selection of the messages display to the clipboard.
+        Private slot to copy the selection of the messages display to
+        the clipboard.
         """
         self.messages.copy()
     
     def __copyAllMessages(self):
         """
-        Private slot to copy the contents of the messages display to the clipboard.
+        Private slot to copy the contents of the messages display to
+        the clipboard.
         """
         txt = self.messages.toPlainText()
         if txt:
@@ -338,7 +348,8 @@
     
     def __cutAllMessages(self):
         """
-        Private slot to cut the contents of the messages display to the clipboard.
+        Private slot to cut the contents of the messages display to
+        the clipboard.
         """
         txt = self.messages.toPlainText()
         if txt:
@@ -361,8 +372,8 @@
                 self.trUtf8("Save Messages"),
                 "",
                 self.trUtf8(
-                    "HTML Files (*.{0});;Text Files (*.txt);;All Files (*)").format(
-                    htmlExtension),
+                    "HTML Files (*.{0});;Text Files (*.txt);;All Files (*)")
+                    .format(htmlExtension),
                 None,
                 E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite))
             if fname:
@@ -393,8 +404,9 @@
                 except IOError as err:
                     E5MessageBox.critical(self,
                         self.trUtf8("Error saving Messages"),
-                        self.trUtf8("""<p>The messages contents could not be written"""
-                                    """ to <b>{0}</b></p><p>Reason: {1}</p>""")\
+                        self.trUtf8(
+                            """<p>The messages contents could not be written"""
+                            """ to <b>{0}</b></p><p>Reason: {1}</p>""")\
                             .format(fname, str(err)))
     
     def __initMessagesMenu(self):
@@ -431,7 +443,8 @@
     @pyqtSlot(bool)
     def on_messages_copyAvailable(self, yes):
         """
-        Private slot to react to text selection/deselection of the messages edit.
+        Private slot to react to text selection/deselection of the
+        messages edit.
         
         @param yes flag signaling the availability of selected text (boolean)
         """
@@ -441,6 +454,8 @@
     def on_messages_customContextMenuRequested(self, pos):
         """
         Private slot to show the context menu of the messages pane.
+        
+        @param pos position the menu should be opened at (QPoint)
         """
         enable = not self.messages.document().isEmpty()
         self.__cutAllMessagesAct.setEnabled(enable)
@@ -452,5 +467,7 @@
     def on_messages_anchorClicked(self, url):
         """
         Private slot to open links in the default browser.
+        
+        @param url URL to be opened (QUrl)
         """
         QDesktopServices.openUrl(url)
--- a/Network/IRC/IrcWidget.py	Sun Sep 29 12:04:35 2013 +0200
+++ b/Network/IRC/IrcWidget.py	Sun Sep 29 14:12:38 2013 +0200
@@ -299,7 +299,7 @@
         """
         Private method to handle a new private connection.
         
-        @param reference to the match object
+        @param match reference to the match object
         @return flag indicating, if the message was handled (boolean)
         """
         # group(1)   sender user name
@@ -510,7 +510,7 @@
         """
         Private method to handle a server message containing a message name.
         
-        @param reference to the match object
+        @param match reference to the match object
         @return flag indicating, if the message was handled (boolean)
         """
         name = match.group(2)
@@ -578,7 +578,7 @@
         """
         Private method to handle a server message containing a numeric code.
         
-        @param reference to the match object
+        @param match reference to the match object
         @return flag indicating, if the message was handled (boolean)
         """
         code = int(match.group(2))
@@ -781,7 +781,7 @@
         """
         Private method to handle a PING message.
         
-        @param reference to the match object
+        @param match reference to the match object
         @return flag indicating, if the message was handled (boolean)
         """
         self.__send("PONG " + match.group(1))
@@ -791,7 +791,7 @@
         """
         Private method to handle a CTCP command.
         
-        @param reference to the match object
+        @param match reference to the match object
         @return flag indicating, if the message was handled (boolean)
         """
         # group(1)   sender user name
@@ -892,8 +892,9 @@
     
     def isChannelName(self, name):
         """
-        PublicisChannelName method to check, if the given name is a channel name.
+        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)
         """
         if not name:
--- a/PluginManager/PluginInstallDialog.py	Sun Sep 29 12:04:35 2013 +0200
+++ b/PluginManager/PluginInstallDialog.py	Sun Sep 29 14:12:38 2013 +0200
@@ -188,6 +188,8 @@
     def on_buttonBox_clicked(self, button):
         """
         Private slot to handle the click of a button of the button box.
+        
+        @param button reference to the button pressed (QAbstractButton)
         """
         if button == self.__backButton:
             self.__currentIndex -= 1
--- a/PluginManager/PluginManager.py	Sun Sep 29 12:04:35 2013 +0200
+++ b/PluginManager/PluginManager.py	Sun Sep 29 14:12:38 2013 +0200
@@ -66,6 +66,7 @@
             be loaded (boolean)
         @keyparam develPlugin filename of a plugin to be loaded for
             development (string)
+        @exception PluginPathError raised to indicate an invalid plug-in path
         """
         super().__init__(parent)
         
@@ -128,6 +129,7 @@
         """
         Public method to get the path of a plugin directory.
         
+        @param key key of the plug-in directory (string)
         @return path of the requested plugin directory (string)
         """
         if key not in ["global", "user"]:
@@ -297,6 +299,8 @@
         @param name name of the module to be loaded (string)
         @param directory name of the plugin directory (string)
         @param reload_ flag indicating to reload the module (boolean)
+        @exception PluginLoadError raised to indicate an issue loading
+            the plug-in
         """
         try:
             fname = "{0}.py".format(os.path.join(directory, name))
@@ -398,13 +402,17 @@
         """
         Public method to create a plugin object for the named on demand plugin.
         
-        Note: The plugin is not activated.
+        Note: The plug-in is not activated.
+        
+        @param name name of the plug-in (string)
+        @exception PluginActivationError raised to indicate an issue during the
+            plug-in activation
         """
         try:
             try:
                 module = self.__onDemandInactiveModules[name]
             except KeyError:
-                return None
+                return
             
             if not self.__canActivatePlugin(module):
                 raise PluginActivationError(module.eric5PluginModuleName)
@@ -419,7 +427,7 @@
                 pluginObject.eric5PluginVersion = version
                 self.__onDemandInactivePlugins[name] = pluginObject
         except PluginActivationError:
-            return None
+            return
     
     def activatePlugins(self):
         """
@@ -445,6 +453,8 @@
         @keyparam onDemand flag indicating activation of an
             on demand plugin (boolean)
         @return reference to the initialized plugin object
+        @exception PluginActivationError raised to indicate an issue during the
+            plug-in activation
         """
         try:
             try:
@@ -513,6 +523,10 @@
         @param module reference to the module to be activated
         @return flag indicating, if the module satisfies all requirements
             for being activated (boolean)
+        @exception PluginModuleFormatError raised to indicate an invalid
+            plug-in module format
+        @exception PluginClassFormatError raised to indicate an invalid
+            plug-in class format
         """
         try:
             if not hasattr(module, "version"):
@@ -855,6 +869,8 @@
           <dt>reference to configuration page</dt>
           <dd>This will be used by the configuration dialog and must always be None</dd>
         </dl>
+        
+        @return plug-in configuration data
         """
         configData = {}
         for module in list(self.__activeModules.values()) + \
--- a/PluginManager/PluginRepositoryDialog.py	Sun Sep 29 12:04:35 2013 +0200
+++ b/PluginManager/PluginRepositoryDialog.py	Sun Sep 29 14:12:38 2013 +0200
@@ -56,6 +56,8 @@
         Constructor
         
         @param parent parent of this dialog (QWidget)
+        @param external flag indicating an instatiation as a main
+            window (boolean)
         """
         super().__init__(parent)
         self.setupUi(self)
@@ -109,6 +111,8 @@
     def on_buttonBox_clicked(self, button):
         """
         Private slot to handle the click of a button of the button box.
+        
+        @param button reference to the button pressed (QAbstractButton)
         """
         if button == self.__updateButton:
             self.__updateList()
--- a/Plugins/CheckerPlugins/Pep8/Pep8Dialog.py	Sun Sep 29 12:04:35 2013 +0200
+++ b/Plugins/CheckerPlugins/Pep8/Pep8Dialog.py	Sun Sep 29 14:12:38 2013 +0200
@@ -55,6 +55,7 @@
         @param code message code (string)
         @param check reference to the checker function (function)
         @param args arguments for the message (list)
+        @return error code (string)
         """
         code = super().error_args(line_number, offset, code, check, *args)
         if code and (self.counters[code] == 1 or self.__repeat):
--- a/Plugins/CheckerPlugins/Pep8/Pep8Fixer.py	Sun Sep 29 12:04:35 2013 +0200
+++ b/Plugins/CheckerPlugins/Pep8/Pep8Fixer.py	Sun Sep 29 14:12:38 2013 +0200
@@ -251,6 +251,8 @@
     def finalize(self):
         """
         Public method to apply all deferred fixes.
+        
+        @return dictionary containing the fix results
         """
         results = {}
         
@@ -432,6 +434,7 @@
         
         @param line line number of the issue (integer)
         @param pos position inside line (integer)
+        @param logical logical line structure
         @return flag indicating a change was done (boolean)
         """
         assert logical
@@ -484,7 +487,9 @@
     
     def __fixD111(self, code, line, pos):
         """
-        Private method to fix docstring enclosed in wrong quotes (D111).
+        Private method to fix docstring enclosed in wrong quotes.
+       
+        Codes: D111
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -511,8 +516,9 @@
     
     def __fixD112(self, code, line, pos):
         """
-        Private method to fix docstring 'r' or 'u' in leading quotes
-        (D112, D113).
+        Private method to fix docstring 'r' or 'u' in leading quotes.
+        
+        Codes: D112, D113
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -540,7 +546,9 @@
     
     def __fixD121(self, code, line, pos, apply=False):
         """
-        Private method to fix a single line docstring on multiple lines (D121).
+        Private method to fix a single line docstring on multiple lines.
+       
+        Codes: D121
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -580,7 +588,9 @@
     def __fixD131(self, code, line, pos):
         """
         Private method to fix a docstring summary not ending with a
-        period (D131).
+        period.
+       
+        Codes: D131
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -613,7 +623,9 @@
     def __fixD141(self, code, line, pos, apply=False):
         """
         Private method to fix a function/method docstring preceded by a
-        blank line (D141).
+        blank line.
+       
+        Codes: D141
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -640,7 +652,9 @@
     def __fixD142(self, code, line, pos, apply=False):
         """
         Private method to fix a class docstring not preceded by a
-        blank line (D142).
+        blank line.
+       
+        Codes: D142
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -666,7 +680,9 @@
     def __fixD143(self, code, line, pos, apply=False):
         """
         Private method to fix a class docstring not followed by a
-        blank line (D143).
+        blank line.
+       
+        Codes: D143
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -692,7 +708,9 @@
     def __fixD144(self, code, line, pos, apply=False):
         """
         Private method to fix a docstring summary not followed by a
-        blank line (D144).
+        blank line.
+       
+        Codes: D144
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -722,7 +740,9 @@
     def __fixD145(self, code, line, pos, apply=False):
         """
         Private method to fix the last paragraph of a multi-line docstring
-        not followed by a blank line (D143).
+        not followed by a blank line.
+       
+        Codes: D143
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -749,7 +769,9 @@
     def __fixD221(self, code, line, pos, apply=False):
         """
         Private method to fix leading and trailing quotes of docstring
-        not on separate lines (D221, D222).
+        not on separate lines.
+       
+        Codes: D221, D222
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -789,7 +811,9 @@
     def __fixD242(self, code, line, pos, apply=False):
         """
         Private method to fix a class or function/method docstring preceded
-        by a blank line (D242, D244).
+        by a blank line.
+       
+        Codes: D242, D244
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -817,7 +841,9 @@
     def __fixD243(self, code, line, pos, apply=False):
         """
         Private method to fix a class or function/method docstring followed
-        by a blank line (D243, D245).
+        by a blank line.
+       
+        Codes: D243, D245
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -845,7 +871,9 @@
     def __fixD247(self, code, line, pos, apply=False):
         """
         Private method to fix a last paragraph of a docstring followed
-        by a blank line (D247).
+        by a blank line.
+       
+        Codes: D247
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -870,8 +898,9 @@
     
     def __fixE101(self, code, line, pos):
         """
-        Private method to fix obsolete tab usage and indentation errors
-        (E101, E111, W191).
+        Private method to fix obsolete tab usage and indentation errors.
+        
+        Codes: E101, E111, W191
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -898,7 +927,9 @@
     def __fixE121(self, code, line, pos, apply=False):
         """
         Private method to fix the indentation of continuation lines and
-        closing brackets (E121, E124).
+        closing brackets.
+       
+        Codes: E121, E124
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -930,8 +961,9 @@
     
     def __fixE122(self, code, line, pos, apply=False):
         """
-        Private method to fix a missing indentation of continuation lines
-        (E122).
+        Private method to fix a missing indentation of continuation lines.
+        
+        Codes: E122
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -967,8 +999,9 @@
     
     def __fixE123(self, code, line, pos, apply=False):
         """
-        Private method to fix the indentation of a closing bracket lines
-        (E123).
+        Private method to fix the indentation of a closing bracket lines.
+        
+        Codes: E123
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1006,7 +1039,9 @@
     def __fixE125(self, code, line, pos, apply=False):
         """
         Private method to fix the indentation of continuation lines not
-        distinguishable from next logical line (E125).
+        distinguishable from next logical line.
+       
+        Codes: E125
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1037,7 +1072,9 @@
     def __fixE126(self, code, line, pos, apply=False):
         """
         Private method to fix over-indented/under-indented hanging
-        indentation (E126, E133).
+        indentation.
+       
+        Codes: E126, E133
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1075,7 +1112,9 @@
     
     def __fixE127(self, code, line, pos, apply=False):
         """
-        Private method to fix over/under indented lines (E127, E128).
+        Private method to fix over/under indented lines.
+       
+        Codes: E127, E128
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1127,8 +1166,9 @@
     
     def __fixE201(self, code, line, pos):
         """
-        Private method to fix extraneous whitespace (E201, E202,
-        E203, E211).
+        Private method to fix extraneous whitespace.
+       
+        Codes: E201, E202, E203, E211
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1153,8 +1193,10 @@
     def __fixE221(self, code, line, pos):
         """
         Private method to fix extraneous whitespace around operator or
-        keyword (E221, E222, E223, E224, E225, E226, E227, E228, E241,
-        E242, E271, E272, E273, E274).
+        keyword.
+       
+        Codes: E221, E222, E223, E224, E225, E226, E227, E228, E241,
+               E242, E271, E272, E273, E274).
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1183,6 +1225,8 @@
         """
         Private method to fix missing whitespace after ',;:'.
         
+        Codes: E231
+        
         @param code code of the issue (string)
         @param line line number of the issue (integer)
         @param pos position inside line (integer)
@@ -1199,7 +1243,9 @@
     def __fixE251(self, code, line, pos):
         """
         Private method to fix extraneous whitespace around keyword and
-        default parameter equals (E251).
+        default parameter equals.
+       
+        Codes: E251
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1233,8 +1279,9 @@
     
     def __fixE261(self, code, line, pos):
         """
-        Private method to fix whitespace before or after inline comment
-        (E261, E262).
+        Private method to fix whitespace before or after inline comment.
+        
+        Codes: E261, E262
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1253,7 +1300,9 @@
     
     def __fixE301(self, code, line, pos, apply=False):
         """
-        Private method to fix the need for one blank line (E301).
+        Private method to fix the need for one blank line.
+       
+        Codes: E301
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1274,7 +1323,9 @@
     
     def __fixE302(self, code, line, pos, apply=False):
         """
-        Private method to fix the need for two blank lines (E302).
+        Private method to fix the need for two blank lines.
+       
+        Codes: E302
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1332,7 +1383,9 @@
     
     def __fixE303(self, code, line, pos, apply=False):
         """
-        Private method to fix superfluous blank lines (E303).
+        Private method to fix superfluous blank lines.
+       
+        Codes: E303
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1360,7 +1413,9 @@
     def __fixE304(self, code, line, pos, apply=False):
         """
         Private method to fix superfluous blank lines after a function
-        decorator (E304).
+        decorator.
+       
+        Codes: E304
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1389,7 +1444,9 @@
     
     def __fixE401(self, code, line, pos, apply=False):
         """
-        Private method to fix multiple imports on one line (E401).
+        Private method to fix multiple imports on one line.
+       
+        Codes: E401
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1423,7 +1480,9 @@
     
     def __fixE501(self, code, line, pos, apply=False):
         """
-        Private method to fix the long lines by breaking them (E501).
+        Private method to fix the long lines by breaking them.
+       
+        Codes: E501
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1467,7 +1526,9 @@
     
     def __fixE502(self, code, line, pos):
         """
-        Private method to fix redundant backslash within brackets (E502).
+        Private method to fix redundant backslash within brackets.
+       
+        Codes: E502
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1482,7 +1543,9 @@
     
     def __fixE701(self, code, line, pos, apply=False):
         """
-        Private method to fix colon-separated compound statements (E701).
+        Private method to fix colon-separated compound statements.
+       
+        Codes: E701
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1510,8 +1573,9 @@
     
     def __fixE702(self, code, line, pos, apply=False):
         """
-        Private method to fix semicolon-separated compound statements
-        (E702, E703).
+        Private method to fix semicolon-separated compound statements.
+        
+        Codes: E702, E703
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1544,7 +1608,9 @@
     
     def __fixE711(self, code, line, pos):
         """
-        Private method to fix comparison with None (E711, E712).
+        Private method to fix comparison with None.
+       
+        Codes: E711, E712
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1580,7 +1646,9 @@
     def __fixN804(self, code, line, pos, apply=False):
         """
         Private method to fix a wrong first argument of normal and
-        class methods (N804, N805).
+        class methods.
+       
+        Codes: N804, N805
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1620,8 +1688,9 @@
     
     def __fixN806(self, code, line, pos, apply=False):
         """
-        Private method to fix a wrong first argument of static methods
-        (N806).
+        Private method to fix a wrong first argument of static methods.
+        
+        Codes: N806
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1679,7 +1748,9 @@
     
     def __fixW291(self, code, line, pos):
         """
-        Private method to fix trailing whitespace (W291, W293).
+        Private method to fix trailing whitespace.
+       
+        Codes: W291, W293
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1694,7 +1765,9 @@
     
     def __fixW292(self, code, line, pos):
         """
-        Private method to fix a missing newline at the end of file (W292).
+        Private method to fix a missing newline at the end of file.
+       
+        Codes: W292
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1708,7 +1781,9 @@
     
     def __fixW391(self, code, line, pos):
         """
-        Private method to fix trailing blank lines (W391).
+        Private method to fix trailing blank lines.
+       
+        Codes: W391
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1729,7 +1804,9 @@
     
     def __fixW603(self, code, line, pos):
         """
-        Private method to fix the not equal notation (W603).
+        Private method to fix the not equal notation.
+       
+        Codes: W603
         
         @param code code of the issue (string)
         @param line line number of the issue (integer)
@@ -1777,6 +1854,8 @@
     def run(self):
         """
         Public method to run the re-indenter.
+        
+        @return flag indicating that a change was done (boolean)
         """
         try:
             stats = self.__genStats(tokenize.generate_tokens(self.getline))
@@ -1879,6 +1958,7 @@
         Private method to generate the re-indent statistics.
         
         @param tokens tokens generator (tokenize._tokenize)
+        @return reference to the generated statistics
         """
         find_stmt = True  # next token begins a fresh stmt?
         level = 0  # current indent level
@@ -1942,7 +2022,6 @@
 
     Each instance operates on a single logical line.
     """
-    
     SKIP_TOKENS = frozenset([
         tokenize.COMMENT, tokenize.NL, tokenize.INDENT,
         tokenize.DEDENT, tokenize.NEWLINE, tokenize.ENDMARKER

eric ide

mercurial