Skip to content

Commit 272d384

Browse files
argiloskoslowski
authored andcommitted
grc: fix pylint C0303: Trailing whitespace
1 parent 629d885 commit 272d384

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+68
-73
lines changed

grc/__main__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77
from .main import main
88

grc/converter/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77

88
from .main import Converter

grc/converter/__main__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77

88
# TODO: implement cli
9-

grc/converter/block.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66
"""
77
Converter for legacy block definitions in XML format
88

grc/converter/block_tree.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66
"""
77
Converter for legacy block tree definitions in XML format
88
"""

grc/converter/cheetah_converter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77

88
import collections

grc/converter/flow_graph.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77

88
import ast

grc/converter/xml.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77

88
import re

grc/core/FlowGraph.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77

88
import collections
@@ -115,7 +115,7 @@ def get_snippets_dict(self, section=None):
115115
if not section or sect == section:
116116
output.append(d)
117117

118-
# Sort by descending priority
118+
# Sort by descending priority
119119
if section:
120120
output = sorted(output, key=lambda x: x['priority'], reverse=True)
121121

@@ -255,7 +255,7 @@ def renew_namespace(self):
255255
variable_block.rewrite()
256256
value = eval(variable_block.value, namespace, variable_block.namespace)
257257
namespace[variable_block.name] = value
258-
self.namespace.update(namespace) # rewrite on subsequent blocks depends on an updated self.namespace
258+
self.namespace.update(namespace) # rewrite on subsequent blocks depends on an updated self.namespace
259259
except TypeError: #Type Errors may happen, but that desn't matter as they are displayed in the gui
260260
pass
261261
except Exception:
@@ -317,7 +317,7 @@ def connect(self, porta, portb):
317317
connection = self.parent_platform.Connection(
318318
parent=self, source=porta, sink=portb)
319319
self.connections.add(connection)
320-
320+
321321
return connection
322322

323323
def disconnect(self, *ports):
@@ -411,7 +411,7 @@ def import_data(self, data):
411411

412412
block.import_data(**block_data)
413413

414-
self.rewrite()
414+
self.rewrite()
415415

416416
# build the connections
417417
def verify_and_get_port(key, block, dir):

grc/core/Messages.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77

88

grc/core/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77
import weakref
88

grc/core/blocks/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77

88
from ._flags import Flags

grc/core/blocks/_build.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77

88
import itertools

grc/core/blocks/_templates.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66
"""
77
This dict class holds a (shared) cache of compiled mako templates.
88
These

grc/core/blocks/dummy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77

88
from . import Block, register_build_in

grc/core/blocks/embedded_python.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77

88
from ast import literal_eval

grc/core/blocks/virtual.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77

88
import itertools

grc/core/errors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77

88

grc/core/generator/Generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77

88

grc/core/generator/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77
from .Generator import Generator

grc/core/generator/cpp_top_block.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,11 @@ def _variable_types(self):
272272
variables.remove(var)
273273

274274
# If the type is 'raw', we'll need to evaluate the variable to infer the type.
275-
# Create an executable fragment of code containing all 'raw' variables in
275+
# Create an executable fragment of code containing all 'raw' variables in
276276
# order to infer the lvalue types.
277277
#
278-
# Note that this differs from using ast.literal_eval() as literal_eval evaluates one
279-
# variable at a time. The code fragment below evaluates all varaibles together which
278+
# Note that this differs from using ast.literal_eval() as literal_eval evaluates one
279+
# variable at a time. The code fragment below evaluates all varaibles together which
280280
# allows the variables to reference each other (i.e. a = b * c).
281281
prog = 'def get_decl_types():\n'
282282
prog += '\tvar_types = {}\n'
@@ -314,7 +314,7 @@ def _parameter_types(self):
314314

315315
# Update the 'var_make' entry in the cpp_templates dictionary
316316
d = param.cpp_templates
317-
cpp_expr = d['var_make'].replace('${value}', cpp_cmplx)
317+
cpp_expr = d['var_make'].replace('${value}', cpp_cmplx)
318318
d.update({'var_make':cpp_expr})
319319
param.cpp_templates = d
320320

@@ -432,7 +432,7 @@ def by_domain_and_blocks(c):
432432
porta = con.source_port
433433
portb = con.sink_port
434434
fg = self._flow_graph
435-
435+
436436
if porta.dtype == 'bus' and portb.dtype == 'bus':
437437
# which bus port is this relative to the bus structure
438438
if len(porta.bus_structure) == len(portb.bus_structure):

grc/core/generator/top_block.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ def by_domain_and_blocks(c):
308308
porta = con.source_port
309309
portb = con.sink_port
310310
fg = self._flow_graph
311-
311+
312312
if porta.dtype == 'bus' and portb.dtype == 'bus':
313313
# which bus port is this relative to the bus structure
314314
if len(porta.bus_structure) == len(portb.bus_structure):
@@ -319,8 +319,8 @@ def by_domain_and_blocks(c):
319319
parent=self, source=hidden_porta, sink=hidden_portb)
320320
code = template.render(make_port_sig=make_port_sig, source=hidden_porta, sink=hidden_portb)
321321
rendered.append(code)
322-
323322

324-
323+
324+
325325

326326
return rendered

grc/core/io/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#

grc/core/params/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77
from .param import Param

grc/core/params/template_arg.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77

88

grc/core/ports/clone.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77
from .port import Port, Element
88

grc/core/ports/port.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77

88
from . import _virtual_connections
@@ -40,7 +40,7 @@ def __init__(self, parent, direction, id, label='', domain=Constants.DEFAULT_DOM
4040
busses = [p for p in self.parent.ports() if p._dir == self._dir and p.dtype == 'bus']
4141
bus_structure = self.parent.current_bus_structure[self._dir]
4242
bus_index = len(busses)
43-
if len(bus_structure) > bus_index:
43+
if len(bus_structure) > bus_index:
4444
number = str(len(busses)) + '#' + str(len(bus_structure[bus_index]))
4545
label = dtype + number
4646
else:
@@ -207,7 +207,7 @@ def connections(self, enabled=None):
207207
for con in self.parent_flowgraph.connections:
208208
#TODO clean this up - but how to get past this validation
209209
# things don't compare simply with an x in y because
210-
# bus ports are created differently.
210+
# bus ports are created differently.
211211
port_in_con = False
212212
if self.dtype == 'bus':
213213
if self.is_sink:
@@ -218,10 +218,10 @@ def connections(self, enabled=None):
218218
if (self.parent.name == con.source_port.parent.name and
219219
self.name == con.source_port.name):
220220
port_in_con = True
221-
221+
222222
if port_in_con:
223223
yield con
224-
224+
225225
else:
226226
if self in con and (enabled is None or enabled == con.enabled):
227227
yield con
@@ -243,4 +243,3 @@ def get_associated_ports(self):
243243
bus_index = busses.index(self)
244244
ports = filter(lambda a: ports.index(a) in bus_structure[bus_index], ports)
245245
return ports
246-

grc/core/utils/descriptors/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77
from ._lazy import lazy_property, nop_write
88

grc/core/utils/descriptors/_lazy.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77
import functools
88

grc/core/utils/hide_bokeh_gui_options_if_not_installed.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# This file is part of GNU Radio
33
#
44
# SPDX-License-Identifier: GPL-2.0-or-later
5-
#
5+
#
66

77

88
def hide_bokeh_gui_options_if_not_installed(options_blk):

grc/gui/Application.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ def flow_graph_update(fg=flow_graph):
443443
elif action == Actions.TYPES_WINDOW_DISPLAY:
444444
Dialogs.show_types(main)
445445
elif action == Actions.KEYBOARD_SHORTCUTS_WINDOW_DISPLAY:
446-
Dialogs.show_keyboard_shortcuts(main)
446+
Dialogs.show_keyboard_shortcuts(main)
447447
elif action == Actions.ERRORS_WINDOW_DISPLAY:
448448
Dialogs.ErrorsDialog(main, flow_graph).run_and_destroy()
449449
elif action == Actions.TOGGLE_CONSOLE_WINDOW:
@@ -713,7 +713,7 @@ def flow_graph_update(fg=flow_graph):
713713
self.generator = generator
714714
except Exception as e:
715715
Messages.send_fail_gen(e)
716-
716+
717717

718718
elif action == Actions.FLOW_GRAPH_EXEC:
719719
if not page.process:

grc/gui/Bars.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
[Actions.TOGGLE_SHOW_FLOWGRAPH_COMPLEXITY]
8484
]),
8585
('_Help', [
86-
[Actions.HELP_WINDOW_DISPLAY, Actions.TYPES_WINDOW_DISPLAY, Actions.KEYBOARD_SHORTCUTS_WINDOW_DISPLAY, Actions.XML_PARSER_ERRORS_DISPLAY],
86+
[Actions.HELP_WINDOW_DISPLAY, Actions.TYPES_WINDOW_DISPLAY, Actions.KEYBOARD_SHORTCUTS_WINDOW_DISPLAY, Actions.XML_PARSER_ERRORS_DISPLAY],
8787
[Actions.GET_INVOLVED_WINDOW_DISPLAY, Actions.ABOUT_WINDOW_DISPLAY]
8888
])]
8989

0 commit comments

Comments
 (0)