Mon, 04 Jul 2022 19:44:38 +0200
Corrected some code style issues.
--- a/eric7/Plugins/WizardPlugins/SetupWizard/SetupCfgUtilities.py Mon Jul 04 17:21:56 2022 +0200 +++ b/eric7/Plugins/WizardPlugins/SetupWizard/SetupCfgUtilities.py Mon Jul 04 19:44:38 2022 +0200 @@ -17,6 +17,7 @@ # dict - list-comma where keys are separated from values by = # + def _bool2string(value): """ Function to convert a bool value to a setup.cfg string. @@ -40,6 +41,8 @@ """ if value: return "\n{0}".format("\n".join(sorted(filter(None, value)))) + + return "" def _dict2list(value): @@ -66,9 +69,10 @@ """ return _list2string(list(_dict2list(value))) + def toString(value): """ - Function to convert a value to a setup.cfg string + Function to convert a value to a setup.cfg string. @param value value to be converted @type bool, list, set, tuple or dict
--- a/eric7/Plugins/WizardPlugins/SetupWizard/SetupWizardDialog.py Mon Jul 04 17:21:56 2022 +0200 +++ b/eric7/Plugins/WizardPlugins/SetupWizard/SetupWizardDialog.py Mon Jul 04 19:44:38 2022 +0200 @@ -41,6 +41,7 @@ It displays a dialog for entering the parameters for the setup.py code generator. """ + def __init__(self, category, editor, parent=None): """ Constructor @@ -642,9 +643,9 @@ classifiers = [] if not self.licenseClassifierCheckBox.isChecked(): - license = tomlkit.table() - license["text"] = self.licenseEdit.text() - project["license"] = license + licenseTbl = tomlkit.table() + licenseTbl["text"] = self.licenseEdit.text() + project["license"] = licenseTbl else: classifiers.append( self.licenseClassifierComboBox.itemData( @@ -767,10 +768,11 @@ """ line, index = self.__editor.getCursorPosition() indLevel = self.__editor.indentation(line) // self.__editor.indentationWidth() - if self.__editor.indentationsUseTabs(): - indString = '\t' - else: - indString = self.__editor.indentationWidth() * ' ' + indString = ( + '\t' + if self.__editor.indentationsUseTabs() else + self.__editor.indentationWidth() * ' ' + ) if self.__category == "setup.py": sourceCode = self.__getSetupPyCode(indLevel, indString)