mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
pep8: Fix all pep8 format error.
This commit is contained in:
1 parent
e99037223b
commit
e3555b2c51
36 files changed
+229
-115
No files matched your search
@@ -124,7 +124,7 @@ class Plot(PamhyrPlot):
|
||||
|
||||
@timer
|
||||
def update(self, ind=None):
|
||||
if self._init == False:
|
||||
if not self._init:
|
||||
self.draw()
|
||||
return
|
||||
|
||||
|
||||
@@ -59,12 +59,14 @@ class EditLateralContributionWindow(PamhyrWindow):
|
||||
name = self._pamhyr_name
|
||||
if self._data is not None:
|
||||
edge_name = (self._data.edge.name if self._data.edge is not None
|
||||
else _translate("LateralContribution", "Not associate"))
|
||||
else _translate("LateralContribution",
|
||||
"Not associate"))
|
||||
name = (
|
||||
_translate("Edit lateral contribution", self._pamhyr_name) +
|
||||
f" - {study.name} " +
|
||||
f" - {self._data.name} ({self._data.id}) " +
|
||||
f"({trad.get_dict('long_types')[self._data.lctype]} - {edge_name})"
|
||||
f"({trad.get_dict('long_types')[self._data.lctype]} - " +
|
||||
f"{edge_name})"
|
||||
)
|
||||
|
||||
super(EditLateralContributionWindow, self).__init__(
|
||||
|
||||
@@ -54,7 +54,8 @@ _translate = QCoreApplication.translate
|
||||
|
||||
|
||||
class ComboBoxDelegate(QItemDelegate):
|
||||
def __init__(self, data=None, mode="type", tab="", trad=None, parent=None):
|
||||
def __init__(self, data=None, mode="type", tab="",
|
||||
trad=None, parent=None):
|
||||
super(ComboBoxDelegate, self).__init__(parent)
|
||||
|
||||
self._data = data
|
||||
@@ -98,8 +99,9 @@ class ComboBoxDelegate(QItemDelegate):
|
||||
|
||||
def updateEditorGeometry(self, editor, option, index):
|
||||
r = QRect(option.rect)
|
||||
if self.editor.windowFlags() & Qt.Popup and editor.parent() is not None:
|
||||
r.setTopLeft(self.editor.parent().mapToGlobal(r.topLeft()))
|
||||
if self.editor.windowFlags() & Qt.Popup:
|
||||
if editor.parent() is not None:
|
||||
r.setTopLeft(self.editor.parent().mapToGlobal(r.topLeft()))
|
||||
editor.setGeometry(r)
|
||||
|
||||
@pyqtSlot()
|
||||
|
||||
@@ -24,7 +24,9 @@ from PyQt5.QtWidgets import (
|
||||
)
|
||||
|
||||
from Model.LateralContribution.LateralContribution import LateralContribution
|
||||
from Model.LateralContribution.LateralContributionList import LateralContributionList
|
||||
from Model.LateralContribution.LateralContributionList import (
|
||||
LateralContributionList
|
||||
)
|
||||
|
||||
|
||||
class SetNameCommand(QUndoCommand):
|
||||
|
||||
Reference in new issue
Block a user