• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SPF-OST / pytrnsys_gui / 11662562960

29 Oct 2024 03:09PM UTC coverage: 67.508% (-0.08%) from 67.591%
11662562960

push

github

web-flow
Merge pull request #564 from SPF-OST/560-black-change-line-length-to-pep8-standard-of-79-and-check-ci-reaction

changed line length in black to 79

1054 of 1475 new or added lines in 174 files covered. (71.46%)

150 existing lines in 74 files now uncovered.

10399 of 15404 relevant lines covered (67.51%)

0.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

47.62
/trnsysGUI/connection/deleteDoublePipeConnectionCommand.py
1
from __future__ import annotations
1✔
2

3
import typing as _tp
1✔
4

5
import PyQt5.QtWidgets as _qtw
1✔
6

7
import trnsysGUI.connection.undo as _cundo
1✔
8
import trnsysGUI.names.undo as _nu
1✔
9

10
if _tp.TYPE_CHECKING:
1✔
11
    import trnsysGUI.connection.doublePipeConnection as _dpc
×
12

13

14
class DeleteDoublePipeConnectionCommand(_qtw.QUndoCommand):
1✔
15
    def __init__(
1✔
16
        self,
17
        doublePipeConnection: _dpc.DoublePipeConnection,
18
        undoNamingHelper: _nu.UndoNamingHelper,
19
        graphicsScene: _qtw.QGraphicsScene,
20
        parentCommand: _tp.Optional[_qtw.QUndoCommand] = None,
21
    ) -> None:
22
        super().__init__("Delete double pipe connection", parentCommand)
×
23
        self._connection = doublePipeConnection
×
24
        self._undoNamingHelper = undoNamingHelper
×
25
        self._graphicsScene = graphicsScene
×
26

27
    def redo(self):
1✔
28
        self._graphicsScene.removeItem(self._connection)
×
29
        self._connection.deleteConnection()
×
NEW
30
        self._undoNamingHelper.removeNameForDelete(
×
31
            self._connection.displayName
32
        )
33

34
    def undo(self):
1✔
35
        _cundo.setDisplayNameForReAdd(self._connection, self._undoNamingHelper)
×
36
        _cundo.reAddConnection(self._connection)
×
37
        self._graphicsScene.addItem(self._connection)
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc