Skip to content

Commit

Permalink
Fix code review
Browse files Browse the repository at this point in the history
  • Loading branch information
goanpeca committed Jun 10, 2020
1 parent 0916178 commit f43182d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
14 changes: 7 additions & 7 deletions spyder/plugins/breakpoints/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,26 +59,26 @@ class Breakpoints(SpyderDockablePlugin):
Parameters
----------
filename: str
The path to filename cotaining the breakpoint.
The path to filename containing the breakpoint.
line_number: int
The line number of the breakpoint.
"""

sig_edit_goto_requested = Signal(str, int, str)
"""
Send a request to open file in the editor at a given row and word.
Send a request to open a file in the editor at a given row and word.
Parameters
----------
filename: str
The path to filename cotaining the breakpoint.
The path to the filename containing the breakpoint.
line_number: int
The line number of the breakpoint.
word: str
Text `word` to select on given `line_number`.
"""

sig_set_or_edit_conditional_breakpoint_requested = Signal()
sig_conditional_breakpoint_requested = Signal()
"""
Send a request to set/edit a condition on a single selected breakpoint.
"""
Expand All @@ -105,16 +105,16 @@ def register(self):
editor.clear_all_breakpoints)
widget.sig_clear_breakpoint_requested.connect(editor.clear_breakpoint)
widget.sig_edit_goto_requested.connect(editor.load)
widget.sig_set_or_edit_conditional_breakpoint_requested.connect(
widget.sig_conditional_breakpoint_requested.connect(
editor.set_or_edit_conditional_breakpoint)

widget.sig_clear_all_breakpoints_requested.connect(
self.sig_clear_all_breakpoints_requested)
widget.sig_clear_breakpoint_requested.connect(
self.sig_clear_breakpoint_requested)
widget.sig_edit_goto_requested.connect(self.sig_edit_goto_requested)
widget.sig_set_or_edit_conditional_breakpoint_requested.connect(
self.sig_set_or_edit_conditional_breakpoint_requested)
widget.sig_conditional_breakpoint_requested.connect(
self.sig_conditional_breakpoint_requested)

list_action = self.create_action(
BreakpointsActions.ListBreakpoints,
Expand Down
21 changes: 10 additions & 11 deletions spyder/plugins/breakpoints/widgets/main_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,14 @@ def __init__(self, parent=None):

class BreakpointTableView(QTableView, SpyderWidgetMixin):
"""
Table to display editor code breakpoints.
Table to display code breakpoints.
"""

# Signals
sig_clear_all_breakpoints_requested = Signal()
sig_clear_breakpoint_requested = Signal(str, int)
sig_edit_goto_requested = Signal(str, int, str)
sig_set_or_edit_conditional_breakpoint_requested = Signal()
sig_conditional_breakpoint_requested = Signal()

def __init__(self, parent, data):
super().__init__(parent)
Expand Down Expand Up @@ -255,7 +255,7 @@ def mouseDoubleClickEvent(self, event):
filename, int(line_number_str), '')

if index_clicked.column() == COL_CONDITION:
self.sig_set_or_edit_conditional_breakpoint_requested.emit()
self.sig_conditional_breakpoint_requested.emit()

# --- API
# ------------------------------------------------------------------------
Expand Down Expand Up @@ -302,7 +302,7 @@ def edit_breakpoints(self):
lineno = int(self.model.breakpoints[c_row][COL_LINE])

self.sig_edit_goto_requested.emit(filename, lineno, '')
self.sig_set_or_edit_conditional_breakpoint_requested.emit()
self.sig_conditional_breakpoint_requested.emit()


class BreakpointWidget(PluginMainWidget):
Expand Down Expand Up @@ -334,19 +334,19 @@ class BreakpointWidget(PluginMainWidget):

sig_edit_goto_requested = Signal(str, int, str)
"""
Send a request to open file in the editor at a given row and word.
Send a request to open a file in the editor at a given row and word.
Parameters
----------
filename: str
The path to filename cotaining the breakpoint.
The path to the filename containing the breakpoint.
line_number: int
The line number of the breakpoint.
word: str
Text `word` to select on given `line_number`.
"""

sig_set_or_edit_conditional_breakpoint_requested = Signal()
sig_conditional_breakpoint_requested = Signal()
"""
Send a request to set/edit a condition on a single selected breakpoint.
"""
Expand All @@ -369,10 +369,9 @@ def __init__(self, name=None, plugin=None, parent=None,
self.sig_clear_all_breakpoints_requested)
bpt.sig_clear_breakpoint_requested.connect(
self.sig_clear_breakpoint_requested)
bpt.sig_edit_goto_requested.connect(
self.sig_edit_goto_requested)
bpt.sig_set_or_edit_conditional_breakpoint_requested.connect(
self.sig_set_or_edit_conditional_breakpoint_requested)
bpt.sig_edit_goto_requested.connect(self.sig_edit_goto_requested)
bpt.sig_conditional_breakpoint_requested.connect(
self.sig_conditional_breakpoint_requested)

# --- PluginMainWidget API
# ------------------------------------------------------------------------
Expand Down

0 comments on commit f43182d

Please sign in to comment.