Pamhyr2: Fix pep8.

setup.py
Pierre-Antoine Rouby 2024-04-22 16:46:50 +02:00
parent 8dcb0a298e
commit efd8960e1e
3 changed files with 26 additions and 19 deletions

View File

@ -818,8 +818,8 @@ class GraphWidget(QGraphicsView):
# If state is "move"
if self._state == "move":
# Move on scene
if (not self.selected_item() and
(event.buttons() & Qt.LeftButton)):
if not self.selected_item():
if event.buttons() & Qt.LeftButton:
old_p = self.mapToScene(
int(self.m_origin_x), int(self.m_origin_y)
)

View File

@ -162,7 +162,10 @@ class SolverLogWindow(PamhyrWindow):
if ok:
self.run()
else:
self._log(f" *** Failed to export study to {self._solver._type}", color="red")
self._log(
f" *** Failed to export study to {self._solver._type}",
color="red"
)
def setup_action(self):
self.find(QAction, "action_start").setEnabled(False)
@ -324,7 +327,11 @@ class SolverLogWindow(PamhyrWindow):
def start(self):
if self._solver.is_stoped():
self._log(f" *** Export study {self._solver.name}", color="blue")
ok = self._solver.export(self._study, self._workdir, qlog=self._output)
ok = self._solver.export(
self._study, self._workdir, qlog=self._output
)
if not ok:
self._log(f" *** Failed to export", color="red")
self.update()

View File

@ -78,9 +78,9 @@ class PamhyrPlot(APlot):
self._auto_relim_update = False #: Auto relim axes at plot update
self._autoscale_update = False #: Auto scale at plot creation
self._highlight_data = None #: Data identifier to highlight (free type)
self._highlight_data = None #: Data identifier to highlight
self._highlight_data_update = False
self._current_data = None #: Current data identifier (free type)
self._current_data = None #: Current data identifier
self._current_data_update = False
super(PamhyrPlot, self).__init__(data=data)