247 """The 'pyproject.toml' snippet was copied to the clipboard""" |
247 """The 'pyproject.toml' snippet was copied to the clipboard""" |
248 """ successfully.""" |
248 """ successfully.""" |
249 ), |
249 ), |
250 ) |
250 ) |
251 |
251 |
252 def getConfiguration(self): |
252 def getConfiguration(self, saveToProject=False): |
253 """ |
253 """ |
254 Public method to get the current configuration parameters. |
254 Public method to get the current configuration parameters. |
255 |
255 |
|
256 @param saveToProject flag indicating to save the configuration data in the |
|
257 project file (defaults to False) |
|
258 @type bool (optional) |
256 @return dictionary containing the configuration parameters |
259 @return dictionary containing the configuration parameters |
257 @rtype dict |
260 @rtype dict |
258 """ |
261 """ |
259 configuration = BlackUtilities.getDefaultConfiguration() |
262 configuration = BlackUtilities.getDefaultConfiguration() |
260 |
263 |
267 configuration[ |
270 configuration[ |
268 "skip-magic-trailing-comma" |
271 "skip-magic-trailing-comma" |
269 ] = self.skipMagicCommaCheckBox.isChecked() |
272 ] = self.skipMagicCommaCheckBox.isChecked() |
270 configuration["extend-exclude"] = self.excludeEdit.toPlainText().strip() |
273 configuration["extend-exclude"] = self.excludeEdit.toPlainText().strip() |
271 |
274 |
272 if self.__project: |
275 if saveToProject and self.__project: |
273 self.__project.setData("OTHERTOOLSPARMS", "Black", configuration) |
276 self.__project.setData("OTHERTOOLSPARMS", "Black", configuration) |
274 |
277 |
275 return configuration |
278 return configuration |