summaryrefslogtreecommitdiff
path: root/grc/gui
diff options
context:
space:
mode:
authorClayton Smith <argilo@gmail.com>2020-10-12 16:59:09 -0400
committerSebastian Koslowski <sebastian.koslowski@gmail.com>2020-10-20 15:16:48 +0200
commit74ae2184b1f5b025418bf57ba604f3e7a1f97523 (patch)
tree19bb952a0c3bd401216a2cc8e7b4efc27aa6d933 /grc/gui
parentff22625e3b7f745f7398a2c58cb36f7f4f138453 (diff)
grc: fix pylint C0330: wrong hanging indentation
Diffstat (limited to 'grc/gui')
-rw-r--r--grc/gui/Bars.py70
-rw-r--r--grc/gui/canvas/block.py2
-rw-r--r--grc/gui/canvas/flowgraph.py2
-rw-r--r--grc/gui/canvas/param.py3
-rw-r--r--grc/gui/external_editor.py2
5 files changed, 39 insertions, 40 deletions
diff --git a/grc/gui/Bars.py b/grc/gui/Bars.py
index 8d393db8f9..76e26537fa 100644
--- a/grc/gui/Bars.py
+++ b/grc/gui/Bars.py
@@ -53,39 +53,39 @@ TOOLBAR_LIST = [
# The list of actions and categories for the menu bar.
MENU_BAR_LIST = [
- ('_File', [
- [(Actions.FLOW_GRAPH_NEW, 'flow_graph_new_type'), Actions.FLOW_GRAPH_DUPLICATE,
- Actions.FLOW_GRAPH_OPEN, (Actions.FLOW_GRAPH_OPEN_RECENT, 'flow_graph_recent')],
- [Actions.FLOW_GRAPH_SAVE, Actions.FLOW_GRAPH_SAVE_AS, Actions.FLOW_GRAPH_SAVE_COPY],
- [Actions.FLOW_GRAPH_SCREEN_CAPTURE],
- [Actions.FLOW_GRAPH_CLOSE, Actions.APPLICATION_QUIT]
- ]),
- ('_Edit', [
- [Actions.FLOW_GRAPH_UNDO, Actions.FLOW_GRAPH_REDO],
- [Actions.BLOCK_CUT, Actions.BLOCK_COPY, Actions.BLOCK_PASTE, Actions.ELEMENT_DELETE, Actions.SELECT_ALL],
- [Actions.BLOCK_ROTATE_CCW, Actions.BLOCK_ROTATE_CW, ('_Align', Actions.BLOCK_ALIGNMENTS)],
- [Actions.BLOCK_ENABLE, Actions.BLOCK_DISABLE, Actions.BLOCK_BYPASS],
- [Actions.BLOCK_PARAM_MODIFY]
- ]),
- ('_View', [
- [Actions.TOGGLE_BLOCKS_WINDOW],
- [Actions.TOGGLE_CONSOLE_WINDOW, Actions.TOGGLE_SCROLL_LOCK, Actions.SAVE_CONSOLE, Actions.CLEAR_CONSOLE],
- [Actions.TOGGLE_HIDE_VARIABLES, Actions.TOGGLE_FLOW_GRAPH_VAR_EDITOR, Actions.TOGGLE_FLOW_GRAPH_VAR_EDITOR_SIDEBAR],
- [Actions.TOGGLE_HIDE_DISABLED_BLOCKS, Actions.TOGGLE_AUTO_HIDE_PORT_LABELS, Actions.TOGGLE_SNAP_TO_GRID, Actions.TOGGLE_SHOW_BLOCK_COMMENTS, Actions.TOGGLE_SHOW_BLOCK_IDS,],
- [Actions.TOGGLE_SHOW_CODE_PREVIEW_TAB],
- [Actions.ERRORS_WINDOW_DISPLAY, Actions.FIND_BLOCKS],
- ]),
- ('_Run', [
- Actions.FLOW_GRAPH_GEN, Actions.FLOW_GRAPH_EXEC, Actions.FLOW_GRAPH_KILL
- ]),
- ('_Tools', [
- [Actions.TOOLS_RUN_FDESIGN, Actions.FLOW_GRAPH_OPEN_QSS_THEME],
- [Actions.TOGGLE_SHOW_FLOWGRAPH_COMPLEXITY]
- ]),
- ('_Help', [
- [Actions.HELP_WINDOW_DISPLAY, Actions.TYPES_WINDOW_DISPLAY, Actions.KEYBOARD_SHORTCUTS_WINDOW_DISPLAY, Actions.XML_PARSER_ERRORS_DISPLAY],
- [Actions.GET_INVOLVED_WINDOW_DISPLAY, Actions.ABOUT_WINDOW_DISPLAY]
- ])]
+ ('_File', [
+ [(Actions.FLOW_GRAPH_NEW, 'flow_graph_new_type'), Actions.FLOW_GRAPH_DUPLICATE,
+ Actions.FLOW_GRAPH_OPEN, (Actions.FLOW_GRAPH_OPEN_RECENT, 'flow_graph_recent')],
+ [Actions.FLOW_GRAPH_SAVE, Actions.FLOW_GRAPH_SAVE_AS, Actions.FLOW_GRAPH_SAVE_COPY],
+ [Actions.FLOW_GRAPH_SCREEN_CAPTURE],
+ [Actions.FLOW_GRAPH_CLOSE, Actions.APPLICATION_QUIT]
+ ]),
+ ('_Edit', [
+ [Actions.FLOW_GRAPH_UNDO, Actions.FLOW_GRAPH_REDO],
+ [Actions.BLOCK_CUT, Actions.BLOCK_COPY, Actions.BLOCK_PASTE, Actions.ELEMENT_DELETE, Actions.SELECT_ALL],
+ [Actions.BLOCK_ROTATE_CCW, Actions.BLOCK_ROTATE_CW, ('_Align', Actions.BLOCK_ALIGNMENTS)],
+ [Actions.BLOCK_ENABLE, Actions.BLOCK_DISABLE, Actions.BLOCK_BYPASS],
+ [Actions.BLOCK_PARAM_MODIFY]
+ ]),
+ ('_View', [
+ [Actions.TOGGLE_BLOCKS_WINDOW],
+ [Actions.TOGGLE_CONSOLE_WINDOW, Actions.TOGGLE_SCROLL_LOCK, Actions.SAVE_CONSOLE, Actions.CLEAR_CONSOLE],
+ [Actions.TOGGLE_HIDE_VARIABLES, Actions.TOGGLE_FLOW_GRAPH_VAR_EDITOR, Actions.TOGGLE_FLOW_GRAPH_VAR_EDITOR_SIDEBAR],
+ [Actions.TOGGLE_HIDE_DISABLED_BLOCKS, Actions.TOGGLE_AUTO_HIDE_PORT_LABELS, Actions.TOGGLE_SNAP_TO_GRID, Actions.TOGGLE_SHOW_BLOCK_COMMENTS, Actions.TOGGLE_SHOW_BLOCK_IDS,],
+ [Actions.TOGGLE_SHOW_CODE_PREVIEW_TAB],
+ [Actions.ERRORS_WINDOW_DISPLAY, Actions.FIND_BLOCKS],
+ ]),
+ ('_Run', [
+ Actions.FLOW_GRAPH_GEN, Actions.FLOW_GRAPH_EXEC, Actions.FLOW_GRAPH_KILL
+ ]),
+ ('_Tools', [
+ [Actions.TOOLS_RUN_FDESIGN, Actions.FLOW_GRAPH_OPEN_QSS_THEME],
+ [Actions.TOGGLE_SHOW_FLOWGRAPH_COMPLEXITY]
+ ]),
+ ('_Help', [
+ [Actions.HELP_WINDOW_DISPLAY, Actions.TYPES_WINDOW_DISPLAY, Actions.KEYBOARD_SHORTCUTS_WINDOW_DISPLAY, Actions.XML_PARSER_ERRORS_DISPLAY],
+ [Actions.GET_INVOLVED_WINDOW_DISPLAY, Actions.ABOUT_WINDOW_DISPLAY]
+ ])]
# The list of actions for the context menu.
@@ -94,8 +94,8 @@ CONTEXT_MENU_LIST = [
[Actions.BLOCK_ROTATE_CCW, Actions.BLOCK_ROTATE_CW, Actions.BLOCK_ENABLE, Actions.BLOCK_DISABLE, Actions.BLOCK_BYPASS],
[("_More", [
[Actions.BLOCK_CREATE_HIER, Actions.OPEN_HIER],
- [Actions.BUSSIFY_SOURCES, Actions.BUSSIFY_SINKS]]
- )],
+ [Actions.BUSSIFY_SOURCES, Actions.BUSSIFY_SINKS]
+ ])],
[Actions.BLOCK_PARAM_MODIFY],
]
diff --git a/grc/gui/canvas/block.py b/grc/gui/canvas/block.py
index af7f2ba9ad..3b8f479413 100644
--- a/grc/gui/canvas/block.py
+++ b/grc/gui/canvas/block.py
@@ -158,7 +158,7 @@ class Block(CoreBlock, Drawable):
# update the params layout
if not self.is_dummy_block:
markups = [param.format_block_surface_markup()
- for param in self.params.values() if (param.hide not in ('all', 'part') or (param.dtype == 'id' and force_show_id))]
+ for param in self.params.values() if (param.hide not in ('all', 'part') or (param.dtype == 'id' and force_show_id))]
else:
markups = ['<span font_desc="{font}"><b>key: </b>{key}</span>'.format(font=PARAM_FONT, key=self.key)]
diff --git a/grc/gui/canvas/flowgraph.py b/grc/gui/canvas/flowgraph.py
index 65db00eaff..03cfc9cdf8 100644
--- a/grc/gui/canvas/flowgraph.py
+++ b/grc/gui/canvas/flowgraph.py
@@ -280,7 +280,7 @@ class FlowGraph(CoreFlowgraph, Drawable):
block.move((x_off, y_off))
while any(Utils.align_to_grid(block.coordinate) == Utils.align_to_grid(other.coordinate)
- for other in self.blocks if other is not block):
+ for other in self.blocks if other is not block):
block.move((Constants.CANVAS_GRID_SIZE, Constants.CANVAS_GRID_SIZE))
# shift all following blocks
x_off += Constants.CANVAS_GRID_SIZE
diff --git a/grc/gui/canvas/param.py b/grc/gui/canvas/param.py
index 2d472e1142..92d1f84941 100644
--- a/grc/gui/canvas/param.py
+++ b/grc/gui/canvas/param.py
@@ -152,5 +152,4 @@ class Param(CoreParam):
"""
return '<span {foreground} font_desc="{font}"><b>{label}:</b> {value}</span>'.format(
foreground='foreground="red"' if not self.is_valid() else '', font=Constants.PARAM_FONT,
- label=Utils.encode(self.name), value=Utils.encode(self.pretty_print().replace('\n', ' '))
- )
+ label=Utils.encode(self.name), value=Utils.encode(self.pretty_print().replace('\n', ' ')))
diff --git a/grc/gui/external_editor.py b/grc/gui/external_editor.py
index 96e0da7033..522b6dc4b9 100644
--- a/grc/gui/external_editor.py
+++ b/grc/gui/external_editor.py
@@ -28,7 +28,7 @@ class ExternalEditor(threading.Thread):
def _create_tempfile(self, name, value):
with tempfile.NamedTemporaryFile(
- mode='wb', prefix=name + '_', suffix='.py', delete=False,
+ mode='wb', prefix=name + '_', suffix='.py', delete=False,
) as fp:
fp.write(value.encode('utf-8'))
return fp.name