Commit 75dfb78e authored by Rebecca Breu's avatar Rebecca Breu

Python code checks: assigneprofiledialog, colorspace, documentttols

First batch of Python code standard compliance. Most of these are line length violations.

Differential Revision: https://phabricator.kde.org/D18708
parent ab53dc16
flake8==3.6.0
flake8==3.7.4
pytest==4.0.2
PyQt5==5.11.3
PyQt5-sip==4.19.13
......
# let's make a module
from .assignprofiledialog import *
from .assignprofiledialog import AssignProfileDialog
Scripter.addExtension(AssignProfileDialog(Application))
'''
This script is licensed CC 0 1.0, so that you can learn from it.
# This script is licensed CC 0 1.0, so that you can learn from it.
------ CC 0 1.0 ---------------
# ------ CC 0 1.0 ---------------
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
# The person who associated a work with this deed has dedicated the
# work to the public domain by waiving all of his or her rights to the
# work worldwide under copyright law, including all related and
# neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
# You can copy, modify, distribute and perform the work, even for
# commercial purposes, all without asking permission.
# https://creativecommons.org/publicdomain/zero/1.0/legalcode
https://creativecommons.org/publicdomain/zero/1.0/legalcode
'''
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import (QDialogButtonBox, QDialog,
QMessageBox, QComboBox, QVBoxLayout)
......@@ -23,20 +26,25 @@ class AssignProfileDialog(Extension):
def assignProfile(self):
doc = Application.activeDocument()
if doc is None:
QMessageBox.information(Application.activeWindow().qwindow(), i18n("Assign Profile"), i18n("There is no active document."))
QMessageBox.information(
Application.activeWindow().qwindow(),
i18n("Assign Profile"),
i18n("There is no active document."))
return
self.dialog = QDialog(Application.activeWindow().qwindow())
self.cmbProfile = QComboBox(self.dialog)
for profile in sorted(Application.profiles(doc.colorModel(), doc.colorDepth())):
for profile in sorted(
Application.profiles(doc.colorModel(), doc.colorDepth())):
self.cmbProfile.addItem(profile)
vbox = QVBoxLayout(self.dialog)
vbox.addWidget(self.cmbProfile)
self.buttonBox = QDialogButtonBox(self.dialog)
self.buttonBox.setOrientation(Qt.Horizontal)
self.buttonBox.setStandardButtons(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
self.buttonBox.setStandardButtons(
QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
self.buttonBox.accepted.connect(self.dialog.accept)
self.buttonBox.accepted.connect(self.accept)
self.buttonBox.rejected.connect(self.dialog.reject)
......@@ -53,8 +61,6 @@ class AssignProfileDialog(Extension):
pass
def createActions(self, window):
action = window.createAction("assing_profile_to_image", i18n("Assign Profile to Image"))
action = window.createAction("assing_profile_to_image",
i18n("Assign Profile to Image"))
action.triggered.connect(self.assignProfile)
Scripter.addExtension(AssignProfileDialog(Application))
'''
This script is licensed CC 0 1.0, so that you can learn from it.
# This script is licensed CC 0 1.0, so that you can learn from it.
------ CC 0 1.0 ---------------
# ------ CC 0 1.0 ---------------
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
# The person who associated a work with this deed has dedicated the
# work to the public domain by waiving all of his or her rights to the
# work worldwide under copyright law, including all related and
# neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
# You can copy, modify, distribute and perform the work, even for
# commercial purposes, all without asking permission.
https://creativecommons.org/publicdomain/zero/1.0/legalcode
'''
# let's make a module
from .colorspace import *
# https://creativecommons.org/publicdomain/zero/1.0/legalcode
import krita
from .colorspace import ColorSpaceExtension
Scripter.addExtension(ColorSpaceExtension(krita.Krita.instance()))
'''
This script is licensed CC 0 1.0, so that you can learn from it.
# This script is licensed CC 0 1.0, so that you can learn from it.
------ CC 0 1.0 ---------------
# ------ CC 0 1.0 ---------------
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
# The person who associated a work with this deed has dedicated the
# work to the public domain by waiving all of his or her rights to the
# work worldwide under copyright law, including all related and
# neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
# You can copy, modify, distribute and perform the work, even for
# commercial purposes, all without asking permission.
# https://creativecommons.org/publicdomain/zero/1.0/legalcode
https://creativecommons.org/publicdomain/zero/1.0/legalcode
'''
import krita
from . import uicolorspace
......@@ -23,12 +26,10 @@ class ColorSpaceExtension(krita.Extension):
def createActions(self, window):
action = window.createAction("color_space", i18n("Color Space"))
action.setToolTip(i18n("Plugin to change color space of selected documents."))
action.setToolTip(
i18n("Plugin to change color space of selected documents."))
action.triggered.connect(self.initialize)
def initialize(self):
self.uicolorspace = uicolorspace.UIColorSpace()
self.uicolorspace.initialize()
Scripter.addExtension(ColorSpaceExtension(krita.Krita.instance()))
'''
This script is licensed CC 0 1.0, so that you can learn from it.
# This script is licensed CC 0 1.0, so that you can learn from it.
------ CC 0 1.0 ---------------
# ------ CC 0 1.0 ---------------
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
# The person who associated a work with this deed has dedicated the
# work to the public domain by waiving all of his or her rights to the
# work worldwide under copyright law, including all related and
# neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
# You can copy, modify, distribute and perform the work, even for
# commercial purposes, all without asking permission.
# https://creativecommons.org/publicdomain/zero/1.0/legalcode
https://creativecommons.org/publicdomain/zero/1.0/legalcode
'''
from PyQt5.QtWidgets import QDialog
......
'''
This script is licensed CC 0 1.0, so that you can learn from it.
# This script is licensed CC 0 1.0, so that you can learn from it.
------ CC 0 1.0 ---------------
# ------ CC 0 1.0 ---------------
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
# The person who associated a work with this deed has dedicated the
# work to the public domain by waiving all of his or her rights to the
# work worldwide under copyright law, including all related and
# neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
# You can copy, modify, distribute and perform the work, even for
# commercial purposes, all without asking permission.
# https://creativecommons.org/publicdomain/zero/1.0/legalcode
https://creativecommons.org/publicdomain/zero/1.0/legalcode
'''
from PyQt5.QtWidgets import QComboBox
......
'''
This script is licensed CC 0 1.0, so that you can learn from it.
# This script is licensed CC 0 1.0, so that you can learn from it.
------ CC 0 1.0 ---------------
# ------ CC 0 1.0 ---------------
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
# The person who associated a work with this deed has dedicated the
# work to the public domain by waiving all of his or her rights to the
# work worldwide under copyright law, including all related and
# neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
# You can copy, modify, distribute and perform the work, even for
# commercial purposes, all without asking permission.
# https://creativecommons.org/publicdomain/zero/1.0/legalcode
https://creativecommons.org/publicdomain/zero/1.0/legalcode
'''
from PyQt5.QtWidgets import QComboBox
......
'''
This script is licensed CC 0 1.0, so that you can learn from it.
# This script is licensed CC 0 1.0, so that you can learn from it.
------ CC 0 1.0 ---------------
# ------ CC 0 1.0 ---------------
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
# The person who associated a work with this deed has dedicated the
# work to the public domain by waiving all of his or her rights to the
# work worldwide under copyright law, including all related and
# neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
# You can copy, modify, distribute and perform the work, even for
# commercial purposes, all without asking permission.
# https://creativecommons.org/publicdomain/zero/1.0/legalcode
https://creativecommons.org/publicdomain/zero/1.0/legalcode
'''
from PyQt5.QtWidgets import QComboBox
......
'''
This script is licensed CC 0 1.0, so that you can learn from it.
# This script is licensed CC 0 1.0, so that you can learn from it.
------ CC 0 1.0 ---------------
# ------ CC 0 1.0 ---------------
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
# The person who associated a work with this deed has dedicated the
# work to the public domain by waiving all of his or her rights to the
# work worldwide under copyright law, including all related and
# neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
# You can copy, modify, distribute and perform the work, even for
# commercial purposes, all without asking permission.
# https://creativecommons.org/publicdomain/zero/1.0/legalcode
https://creativecommons.org/publicdomain/zero/1.0/legalcode
'''
from . import colorspacedialog
from .components import colormodelcombobox, colordepthcombobox, colorprofilecombobox
from .components import (
colordepthcombobox,
colormodelcombobox,
colorprofilecombobox,
)
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import (QFormLayout, QListWidget, QListWidgetItem,
QAbstractItemView, QComboBox, QDialogButtonBox,
from PyQt5.QtWidgets import (QFormLayout, QListWidget,
QAbstractItemView, QDialogButtonBox,
QVBoxLayout, QFrame, QMessageBox, QPushButton,
QHBoxLayout, QAbstractScrollArea)
QAbstractScrollArea)
from PyQt5.QtGui import QIcon
import krita
from . import resources_rc
class UIColorSpace(object):
......@@ -28,12 +34,15 @@ class UIColorSpace(object):
self.mainLayout = QVBoxLayout(self.mainDialog)
self.formLayout = QFormLayout()
self.documentLayout = QVBoxLayout()
self.refreshButton = QPushButton(QIcon(':/icons/refresh.svg'), i18n("Refresh"))
self.refreshButton = QPushButton(QIcon(':/icons/refresh.svg'),
i18n("Refresh"))
self.widgetDocuments = QListWidget()
self.colorModelComboBox = colormodelcombobox.ColorModelComboBox(self)
self.colorDepthComboBox = colordepthcombobox.ColorDepthComboBox(self)
self.colorProfileComboBox = colorprofilecombobox.ColorProfileComboBox(self)
self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
self.colorProfileComboBox = \
colorprofilecombobox.ColorProfileComboBox(self)
self.buttonBox = QDialogButtonBox(
QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
self.kritaInstance = krita.Krita.instance()
self.documentsList = []
......@@ -47,7 +56,8 @@ class UIColorSpace(object):
self.mainDialog.setWindowModality(Qt.NonModal)
self.widgetDocuments.setSelectionMode(QAbstractItemView.MultiSelection)
self.widgetDocuments.setSizeAdjustPolicy(QAbstractScrollArea.AdjustToContents)
self.widgetDocuments.setSizeAdjustPolicy(
QAbstractScrollArea.AdjustToContents)
def initialize(self):
self.loadDocuments()
......@@ -61,7 +71,8 @@ class UIColorSpace(object):
self.formLayout.addRow(i18n("Documents:"), self.documentLayout)
self.formLayout.addRow(i18n("Color model:"), self.colorModelComboBox)
self.formLayout.addRow(i18n("Color depth:"), self.colorDepthComboBox)
self.formLayout.addRow(i18n("Color profile:"), self.colorProfileComboBox)
self.formLayout.addRow(i18n("Color profile:"),
self.colorProfileComboBox)
self.line = QFrame()
self.line.setFrameShape(QFrame.HLine)
......@@ -86,7 +97,8 @@ class UIColorSpace(object):
self.colorDepthComboBox.clear()
colorModel = self.colorModelComboBox.currentText()
self.colorDepthsList = sorted(self.kritaInstance.colorDepths(colorModel))
self.colorDepthsList = sorted(
self.kritaInstance.colorDepths(colorModel))
self.colorDepthComboBox.addItems(self.colorDepthsList)
......@@ -95,14 +107,18 @@ class UIColorSpace(object):
colorModel = self.colorModelComboBox.currentText()
colorDepth = self.colorDepthComboBox.currentText()
self.colorProfilesList = sorted(self.kritaInstance.profiles(colorModel, colorDepth))
self.colorProfilesList = sorted(
self.kritaInstance.profiles(colorModel, colorDepth))
self.colorProfileComboBox.addItems(self.colorProfilesList)
def loadDocuments(self):
self.widgetDocuments.clear()
self.documentsList = [document for document in self.kritaInstance.documents() if document.fileName()]
self.documentsList = [
document for document in self.kritaInstance.documents()
if document.fileName()
]
for document in self.documentsList:
self.widgetDocuments.addItem(document.fileName())
......@@ -111,13 +127,18 @@ class UIColorSpace(object):
self.loadDocuments()
def confirmButton(self):
selectedPaths = [item.text() for item in self.widgetDocuments.selectedItems()]
selectedDocuments = [document for document in self.documentsList for path in selectedPaths if path == document.fileName()]
selectedPaths = [
item.text() for item in self.widgetDocuments.selectedItems()]
selectedDocuments = [
document for document in self.documentsList
for path in selectedPaths if path == document.fileName()
]
self.msgBox = QMessageBox(self.mainDialog)
if selectedDocuments:
self.convertColorSpace(selectedDocuments)
self.msgBox.setText(i18n("The selected documents has been converted."))
self.msgBox.setText(
i18n("The selected documents has been converted."))
else:
self.msgBox.setText(i18n("Select at least one document."))
self.msgBox.exec_()
......
# let's make a module
from .documenttools import *
import krita
from .documenttools import DocumentToolsExtension
Scripter.addExtension(DocumentToolsExtension(krita.Krita.instance()))
'''
This script is licensed CC 0 1.0, so that you can learn from it.
# This script is licensed CC 0 1.0, so that you can learn from it.
------ CC 0 1.0 ---------------
# ------ CC 0 1.0 ---------------
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
# The person who associated a work with this deed has dedicated the
# work to the public domain by waiving all of his or her rights to the
# work worldwide under copyright law, including all related and
# neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
# You can copy, modify, distribute and perform the work, even for
# commercial purposes, all without asking permission.
# https://creativecommons.org/publicdomain/zero/1.0/legalcode
https://creativecommons.org/publicdomain/zero/1.0/legalcode
'''
import krita
from . import uidocumenttools
......@@ -23,12 +26,10 @@ class DocumentToolsExtension(krita.Extension):
def createActions(self, window):
action = window.createAction("document_tools", i18n("Document Tools"))
action.setToolTip(i18n("Plugin to manipulate properties of selected documents."))
action.setToolTip(
i18n("Plugin to manipulate properties of selected documents."))
action.triggered.connect(self.initialize)
def initialize(self):
self.uidocumenttools = uidocumenttools.UIDocumentTools()
self.uidocumenttools.initialize()
Scripter.addExtension(DocumentToolsExtension(krita.Krita.instance()))
'''
This script is licensed CC 0 1.0, so that you can learn from it.
# This script is licensed CC 0 1.0, so that you can learn from it.
------ CC 0 1.0 ---------------
# ------ CC 0 1.0 ---------------
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
# The person who associated a work with this deed has dedicated the
# work to the public domain by waiving all of his or her rights to the
# work worldwide under copyright law, including all related and
# neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
# You can copy, modify, distribute and perform the work, even for
# commercial purposes, all without asking permission.
# https://creativecommons.org/publicdomain/zero/1.0/legalcode
https://creativecommons.org/publicdomain/zero/1.0/legalcode
'''
from PyQt5.QtWidgets import QDialog
......
'''
This script is licensed CC 0 1.0, so that you can learn from it.
# This script is licensed CC 0 1.0, so that you can learn from it.
------ CC 0 1.0 ---------------
# ------ CC 0 1.0 ---------------
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
# The person who associated a work with this deed has dedicated the
# work to the public domain by waiving all of his or her rights to the
# work worldwide under copyright law, including all related and
# neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
# You can copy, modify, distribute and perform the work, even for
# commercial purposes, all without asking permission.
https://creativecommons.org/publicdomain/zero/1.0/legalcode
'''
from PyQt5.QtWidgets import (QWidget, QSpinBox, QHBoxLayout,
# https://creativecommons.org/publicdomain/zero/1.0/legalcode
from PyQt5.QtWidgets import (QWidget, QSpinBox,
QVBoxLayout, QFormLayout)
import krita
class CanvasSizeTool(QWidget):
......
'''
This script is licensed CC 0 1.0, so that you can learn from it.
# This script is licensed CC 0 1.0, so that you can learn from it.
------ CC 0 1.0 ---------------
# ------ CC 0 1.0 ---------------
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
# The person who associated a work with this deed has dedicated the
# work to the public domain by waiving all of his or her rights to the
# work worldwide under copyright law, including all related and
# neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
# You can copy, modify, distribute and perform the work, even for
# commercial purposes, all without asking permission.
https://creativecommons.org/publicdomain/zero/1.0/legalcode
'''
from PyQt5.QtWidgets import (QWidget, QSpinBox, QHBoxLayout,
QVBoxLayout, QFormLayout)
# https://creativecommons.org/publicdomain/zero/1.0/legalcode
from PyQt5.QtWidgets import QWidget, QSpinBox, QFormLayout
import math
import krita
class RotateTool(QWidget):
......@@ -31,7 +32,8 @@ class RotateTool(QWidget):
def initialize(self):
self.degreesSpinBox.setRange(-180, 180)
self.degreesSpinBox.setToolTip(i18n("Negative degrees will rotate the image to the left"))
self.degreesSpinBox.setToolTip(
i18n("Negative degrees will rotate the image to the left"))
self.layout.addRow(i18n("Degrees:"), self.degreesSpinBox)
......
'''
This script is licensed CC 0 1.0, so that you can learn from it.
# This script is licensed CC 0 1.0, so that you can learn from it.
------ CC 0 1.0 ---------------
# ------ CC 0 1.0 ---------------
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
# The person who associated a work with this deed has dedicated the
# work to the public domain by waiving all of his or her rights to the
# work worldwide under copyright law, including all related and
# neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
# You can copy, modify, distribute and perform the work, even for
# commercial purposes, all without asking permission.
https://creativecommons.org/publicdomain/zero/1.0/legalcode
'''
from PyQt5.QtWidgets import (QWidget, QSpinBox, QHBoxLayout,
# https://creativecommons.org/publicdomain/zero/1.0/legalcode
from PyQt5.QtWidgets import (QWidget, QSpinBox,
QVBoxLayout, QFormLayout, QComboBox)
import krita
class ScaleTool(QWidget):
......
'''
This script is licensed CC 0 1.0, so that you can learn from it.
# This script is licensed CC 0 1.0, so that you can learn from it.
------ CC 0 1.0 ---------------
# ------ CC 0 1.0 ---------------
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of his or her rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law.
# The person who associated a work with this deed has dedicated the
# work to the public domain by waiving all of his or her rights to the
# work worldwide under copyright law, including all related and
# neighboring rights, to the extent allowed by law.
You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
# You can copy, modify, distribute and perform the work, even for
# commercial purposes, all without asking permission.
# https://creativecommons.org/publicdomain/zero/1.0/legalcode
https://creativecommons.org/publicdomain/zero/1.0/legalcode
'''
from . import documenttoolsdialog
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import (QFormLayout, QListWidget, QAbstractItemView,
......@@ -28,7 +31,8 @@ class UIDocumentTools(object):
self.refreshButton = QPushButton(i18n("Refresh"))
self.widgetDocuments = QListWidget()
self.tabTools = QTabWidget()
self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
self.buttonBox = QDialogButtonBox(
QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
self.kritaInstance = krita.Krita.instance()
self.documentsList = []
......@@ -39,7 +43,8 @@ class UIDocumentTools(object):
self.mainDialog.setWindowModality(Qt.NonModal)
self.widgetDocuments.setSelectionMode(QAbstractItemView.MultiSelection)
self.widgetDocuments.setSizeAdjustPolicy(QAbstractScrollArea.AdjustToContents)
self.widgetDocuments.setSizeAdjustPolicy(
QAbstractScrollArea.AdjustToContents)
def initialize(self):
self.loadDocuments()
......@@ -85,7 +90,10 @@ class UIDocumentTools(object):
def loadDocuments(self):
self.widgetDocuments.clear()
self.documentsList = [document for document in self.kritaInstance.documents() if document.fileName()]
self.documentsList = [
document for document in self.kritaInstance.documents()
if document.fileName()
]
for document in self.documentsList:
self.widgetDocuments.addItem(document.fileName())
......@@ -94,14 +102,18 @@ class UIDocumentTools(object):
self.loadDocuments()
def confirmButton(self):
selectedPaths = [item.text() for item in self.widgetDocuments.selectedItems()]
selectedDocuments = [document for document in self.documentsList for path in selectedPaths if path == document.fileName()]
selectedPaths = [
item.text() for item in self.widgetDocuments.selectedItems()]
selectedDocuments = [
document for document in self.documentsList
for path in selectedPaths if path == document.fileName()]
self.msgBox = QMessageBox(self.mainDialog)
if selectedDocuments:
widget = self.tabTools.currentWidget()
widget.adjust(selectedDocuments)
self.msgBox.setText(i18n("The selected documents has been modified."))
self.msgBox.setText(
i18n("The selected documents has been modified."))
else:
self.msgBox.setText(i18n("Select at least one document."))
self.msgBox.exec_()
......@@ -157,8 +157,8 @@ class PluginImporter:
config.read_string(
self.archive.read(desktop_filename).decode('utf-8'))
except ConfigParserError as e:
raise PluginReadError(
'%s: %s' % (i18n('Desktop file'), str(e)))
raise PluginReadError(
'%s: %s' % (i18n('Desktop file'), str(e)))
return config
def get_plugin_info(self):
......
......@@ -2,3 +2,4 @@
[flake8]
builtins = i18n,Scripter,Application,Krita
exclude = resources_rc.py
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment