--- a/src/eric7/QScintilla/DocstringGenerator/__init__.py Wed Jul 13 11:16:20 2022 +0200 +++ b/src/eric7/QScintilla/DocstringGenerator/__init__.py Wed Jul 13 14:55:47 2022 +0200 @@ -13,38 +13,37 @@ def getDocstringGenerator(editor): """ Function to get a docstring generator for the given editor. - + @param editor reference to the editor to create a docstring generator for @type Editor @return reference to the created docstring generator @rtype BaseDocstringGenerator """ - if ( - editor.isPyFile() or - editor.getFileType() in ("Python", "Python3", "MicroPython") + if editor.isPyFile() or editor.getFileType() in ( + "Python", + "Python3", + "MicroPython", ): from .PyDocstringGenerator import PyDocstringGenerator + return PyDocstringGenerator(editor) else: from .BaseDocstringGenerator import BaseDocstringGenerator + return BaseDocstringGenerator(editor) def getSupportedDocstringTypes(): """ Function to get the supported docstring types/styles. - + @return list of tuples with supported docstring type/style and the corresponding display string @rtype tuple of (str, str) """ return [ - ("ericdoc", - QCoreApplication.translate("DocstringGenerator", "Eric")), - ("numpydoc", - QCoreApplication.translate("DocstringGenerator", "NumPy")), - ("googledoc", - QCoreApplication.translate("DocstringGenerator", "Google")), - ("sphinxdoc", - QCoreApplication.translate("DocstringGenerator", "Sphinx")), + ("ericdoc", QCoreApplication.translate("DocstringGenerator", "Eric")), + ("numpydoc", QCoreApplication.translate("DocstringGenerator", "NumPy")), + ("googledoc", QCoreApplication.translate("DocstringGenerator", "Google")), + ("sphinxdoc", QCoreApplication.translate("DocstringGenerator", "Sphinx")), ]