eric7.CodeFormatting.IsortConfigurationDialog

Module implementing a dialog to enter the parameters for an isort formatting run.

Global Attributes

None

Classes

IsortConfigurationDialog Class implementing a dialog to enter the parameters for an isort formatting run.

Functions

None


IsortConfigurationDialog

Class implementing a dialog to enter the parameters for an isort formatting run.

Derived from

QDialog, Ui_IsortConfigurationDialog

Class Attributes

None

Class Methods

None

Methods

IsortConfigurationDialog Constructor
__createTomlSnippet Private slot to generate a TOML snippet of the current configuration.
__getConfigurationDict Private method to assemble and return a dictionary containing the entered non-default configuration parameters.
__loadConfiguration Private method to load the configuration section with data of the given dictionary.
__populateMultiLineComboBox Private method to populate the multi line output selector.
getConfiguration Public method to get the current configuration parameters.
on_profileComboBox_editTextChanged Private slot to react upon changes of the selected/entered profile.
on_sourceComboBox_currentTextChanged Private slot to handle the selection of a configuration source.

Static Methods

None

IsortConfigurationDialog (Constructor)

IsortConfigurationDialog(withProject=True, onlyProject=False, parent=None)

Constructor

withProject (bool (optional))
flag indicating to look for project configurations (defaults to True)
onlyProject (bool (optional))
flag indicating to only look for project configurations (defaults to False)
parent (QWidget (optional))
reference to the parent widget (defaults to None)

IsortConfigurationDialog.__createTomlSnippet

__createTomlSnippet()

Private slot to generate a TOML snippet of the current configuration.

Note: Only non-default values are included in this snippet.

The code snippet is copied to the clipboard and may be placed inside the 'pyproject.toml' file.

IsortConfigurationDialog.__getConfigurationDict

__getConfigurationDict()

Private method to assemble and return a dictionary containing the entered non-default configuration parameters.

Return:
dictionary containing the non-default configuration parameters
Return Type:
dict

IsortConfigurationDialog.__loadConfiguration

__loadConfiguration(confDict)

Private method to load the configuration section with data of the given dictionary.

Note: Default values will be loaded for missing parameters.

confDict (dict)
reference to the data to be loaded

IsortConfigurationDialog.__populateMultiLineComboBox

__populateMultiLineComboBox()

Private method to populate the multi line output selector.

IsortConfigurationDialog.getConfiguration

getConfiguration(saveToProject=False)

Public method to get the current configuration parameters.

saveToProject (bool (optional))
flag indicating to save the configuration data in the project file (defaults to False)
Return:
dictionary containing the configuration parameters
Return Type:
dict

IsortConfigurationDialog.on_profileComboBox_editTextChanged

on_profileComboBox_editTextChanged(profileName)

Private slot to react upon changes of the selected/entered profile.

profileName (str)
name of the current profile

IsortConfigurationDialog.on_sourceComboBox_currentTextChanged

on_sourceComboBox_currentTextChanged(selection)

Private slot to handle the selection of a configuration source.

selection (str)
text of the currently selected item
Up