diff options
Diffstat (limited to 'grc/core')
-rw-r--r-- | grc/core/FlowGraph.py | 10 | ||||
-rw-r--r-- | grc/core/Messages.py | 2 | ||||
-rw-r--r-- | grc/core/base.py | 2 | ||||
-rw-r--r-- | grc/core/blocks/__init__.py | 2 | ||||
-rw-r--r-- | grc/core/blocks/_build.py | 2 | ||||
-rw-r--r-- | grc/core/blocks/_templates.py | 2 | ||||
-rw-r--r-- | grc/core/blocks/dummy.py | 2 | ||||
-rw-r--r-- | grc/core/blocks/embedded_python.py | 2 | ||||
-rw-r--r-- | grc/core/blocks/virtual.py | 2 | ||||
-rw-r--r-- | grc/core/errors.py | 2 | ||||
-rw-r--r-- | grc/core/generator/Generator.py | 2 | ||||
-rw-r--r-- | grc/core/generator/__init__.py | 2 | ||||
-rw-r--r-- | grc/core/generator/cpp_top_block.py | 10 | ||||
-rw-r--r-- | grc/core/generator/top_block.py | 6 | ||||
-rw-r--r-- | grc/core/io/__init__.py | 2 | ||||
-rw-r--r-- | grc/core/params/__init__.py | 2 | ||||
-rw-r--r-- | grc/core/params/template_arg.py | 2 | ||||
-rw-r--r-- | grc/core/ports/clone.py | 2 | ||||
-rw-r--r-- | grc/core/ports/port.py | 11 | ||||
-rw-r--r-- | grc/core/utils/descriptors/__init__.py | 2 | ||||
-rw-r--r-- | grc/core/utils/descriptors/_lazy.py | 2 | ||||
-rw-r--r-- | grc/core/utils/hide_bokeh_gui_options_if_not_installed.py | 2 |
22 files changed, 36 insertions, 37 deletions
diff --git a/grc/core/FlowGraph.py b/grc/core/FlowGraph.py index 93d2f932a2..d7a2bfeeee 100644 --- a/grc/core/FlowGraph.py +++ b/grc/core/FlowGraph.py @@ -2,7 +2,7 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# import collections @@ -115,7 +115,7 @@ class FlowGraph(Element): if not section or sect == section: output.append(d) - # Sort by descending priority + # Sort by descending priority if section: output = sorted(output, key=lambda x: x['priority'], reverse=True) @@ -255,7 +255,7 @@ class FlowGraph(Element): variable_block.rewrite() value = eval(variable_block.value, namespace, variable_block.namespace) namespace[variable_block.name] = value - self.namespace.update(namespace) # rewrite on subsequent blocks depends on an updated self.namespace + self.namespace.update(namespace) # rewrite on subsequent blocks depends on an updated self.namespace except TypeError: #Type Errors may happen, but that desn't matter as they are displayed in the gui pass except Exception: @@ -317,7 +317,7 @@ class FlowGraph(Element): connection = self.parent_platform.Connection( parent=self, source=porta, sink=portb) self.connections.add(connection) - + return connection def disconnect(self, *ports): @@ -411,7 +411,7 @@ class FlowGraph(Element): block.import_data(**block_data) - self.rewrite() + self.rewrite() # build the connections def verify_and_get_port(key, block, dir): diff --git a/grc/core/Messages.py b/grc/core/Messages.py index ec2221e25a..b4ec496348 100644 --- a/grc/core/Messages.py +++ b/grc/core/Messages.py @@ -2,7 +2,7 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# diff --git a/grc/core/base.py b/grc/core/base.py index a5de8837d6..e92c4f923a 100644 --- a/grc/core/base.py +++ b/grc/core/base.py @@ -2,7 +2,7 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# import weakref diff --git a/grc/core/blocks/__init__.py b/grc/core/blocks/__init__.py index 815df9f311..a80121e8bf 100644 --- a/grc/core/blocks/__init__.py +++ b/grc/core/blocks/__init__.py @@ -2,7 +2,7 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# from ._flags import Flags diff --git a/grc/core/blocks/_build.py b/grc/core/blocks/_build.py index 690f21390f..d037d82a4b 100644 --- a/grc/core/blocks/_build.py +++ b/grc/core/blocks/_build.py @@ -2,7 +2,7 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# import itertools diff --git a/grc/core/blocks/_templates.py b/grc/core/blocks/_templates.py index 7c84d1dbe7..c98e277feb 100644 --- a/grc/core/blocks/_templates.py +++ b/grc/core/blocks/_templates.py @@ -2,7 +2,7 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# """ This dict class holds a (shared) cache of compiled mako templates. These diff --git a/grc/core/blocks/dummy.py b/grc/core/blocks/dummy.py index 8445073370..75514fc235 100644 --- a/grc/core/blocks/dummy.py +++ b/grc/core/blocks/dummy.py @@ -2,7 +2,7 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# from . import Block, register_build_in diff --git a/grc/core/blocks/embedded_python.py b/grc/core/blocks/embedded_python.py index 14535fed10..fe364f9559 100644 --- a/grc/core/blocks/embedded_python.py +++ b/grc/core/blocks/embedded_python.py @@ -2,7 +2,7 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# from ast import literal_eval diff --git a/grc/core/blocks/virtual.py b/grc/core/blocks/virtual.py index 18f59f19d6..9d1387dbbb 100644 --- a/grc/core/blocks/virtual.py +++ b/grc/core/blocks/virtual.py @@ -2,7 +2,7 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# import itertools diff --git a/grc/core/errors.py b/grc/core/errors.py index 675a553ba0..59f3e0c436 100644 --- a/grc/core/errors.py +++ b/grc/core/errors.py @@ -2,7 +2,7 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# diff --git a/grc/core/generator/Generator.py b/grc/core/generator/Generator.py index 1063fc8caf..204ee7e620 100644 --- a/grc/core/generator/Generator.py +++ b/grc/core/generator/Generator.py @@ -2,7 +2,7 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# diff --git a/grc/core/generator/__init__.py b/grc/core/generator/__init__.py index cab55645be..53bf0461f7 100644 --- a/grc/core/generator/__init__.py +++ b/grc/core/generator/__init__.py @@ -2,6 +2,6 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# from .Generator import Generator diff --git a/grc/core/generator/cpp_top_block.py b/grc/core/generator/cpp_top_block.py index 9b5a8ecc1b..c2e31a55b0 100644 --- a/grc/core/generator/cpp_top_block.py +++ b/grc/core/generator/cpp_top_block.py @@ -272,11 +272,11 @@ class CppTopBlockGenerator(TopBlockGenerator): variables.remove(var) # If the type is 'raw', we'll need to evaluate the variable to infer the type. - # Create an executable fragment of code containing all 'raw' variables in + # Create an executable fragment of code containing all 'raw' variables in # order to infer the lvalue types. # - # Note that this differs from using ast.literal_eval() as literal_eval evaluates one - # variable at a time. The code fragment below evaluates all varaibles together which + # Note that this differs from using ast.literal_eval() as literal_eval evaluates one + # variable at a time. The code fragment below evaluates all varaibles together which # allows the variables to reference each other (i.e. a = b * c). prog = 'def get_decl_types():\n' prog += '\tvar_types = {}\n' @@ -314,7 +314,7 @@ class CppTopBlockGenerator(TopBlockGenerator): # Update the 'var_make' entry in the cpp_templates dictionary d = param.cpp_templates - cpp_expr = d['var_make'].replace('${value}', cpp_cmplx) + cpp_expr = d['var_make'].replace('${value}', cpp_cmplx) d.update({'var_make':cpp_expr}) param.cpp_templates = d @@ -432,7 +432,7 @@ class CppTopBlockGenerator(TopBlockGenerator): porta = con.source_port portb = con.sink_port fg = self._flow_graph - + if porta.dtype == 'bus' and portb.dtype == 'bus': # which bus port is this relative to the bus structure if len(porta.bus_structure) == len(portb.bus_structure): diff --git a/grc/core/generator/top_block.py b/grc/core/generator/top_block.py index bf7ebcc224..a8a9914108 100644 --- a/grc/core/generator/top_block.py +++ b/grc/core/generator/top_block.py @@ -308,7 +308,7 @@ class TopBlockGenerator(object): porta = con.source_port portb = con.sink_port fg = self._flow_graph - + if porta.dtype == 'bus' and portb.dtype == 'bus': # which bus port is this relative to the bus structure if len(porta.bus_structure) == len(portb.bus_structure): @@ -319,8 +319,8 @@ class TopBlockGenerator(object): parent=self, source=hidden_porta, sink=hidden_portb) code = template.render(make_port_sig=make_port_sig, source=hidden_porta, sink=hidden_portb) rendered.append(code) - - + + return rendered diff --git a/grc/core/io/__init__.py b/grc/core/io/__init__.py index 944e1c2abd..018ed9aaa2 100644 --- a/grc/core/io/__init__.py +++ b/grc/core/io/__init__.py @@ -2,4 +2,4 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# diff --git a/grc/core/params/__init__.py b/grc/core/params/__init__.py index 705d8a32e1..a43cf0aee8 100644 --- a/grc/core/params/__init__.py +++ b/grc/core/params/__init__.py @@ -2,6 +2,6 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# from .param import Param diff --git a/grc/core/params/template_arg.py b/grc/core/params/template_arg.py index cb5b1b4a76..7250a71827 100644 --- a/grc/core/params/template_arg.py +++ b/grc/core/params/template_arg.py @@ -2,7 +2,7 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# diff --git a/grc/core/ports/clone.py b/grc/core/ports/clone.py index e0eb7f71fb..1587ec02a9 100644 --- a/grc/core/ports/clone.py +++ b/grc/core/ports/clone.py @@ -2,7 +2,7 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# from .port import Port, Element diff --git a/grc/core/ports/port.py b/grc/core/ports/port.py index 91584c76da..d81004b9a7 100644 --- a/grc/core/ports/port.py +++ b/grc/core/ports/port.py @@ -2,7 +2,7 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# from . import _virtual_connections @@ -40,7 +40,7 @@ class Port(Element): busses = [p for p in self.parent.ports() if p._dir == self._dir and p.dtype == 'bus'] bus_structure = self.parent.current_bus_structure[self._dir] bus_index = len(busses) - if len(bus_structure) > bus_index: + if len(bus_structure) > bus_index: number = str(len(busses)) + '#' + str(len(bus_structure[bus_index])) label = dtype + number else: @@ -207,7 +207,7 @@ class Port(Element): for con in self.parent_flowgraph.connections: #TODO clean this up - but how to get past this validation # things don't compare simply with an x in y because - # bus ports are created differently. + # bus ports are created differently. port_in_con = False if self.dtype == 'bus': if self.is_sink: @@ -218,10 +218,10 @@ class Port(Element): if (self.parent.name == con.source_port.parent.name and self.name == con.source_port.name): port_in_con = True - + if port_in_con: yield con - + else: if self in con and (enabled is None or enabled == con.enabled): yield con @@ -243,4 +243,3 @@ class Port(Element): bus_index = busses.index(self) ports = filter(lambda a: ports.index(a) in bus_structure[bus_index], ports) return ports - diff --git a/grc/core/utils/descriptors/__init__.py b/grc/core/utils/descriptors/__init__.py index a80a3dec53..66096d327d 100644 --- a/grc/core/utils/descriptors/__init__.py +++ b/grc/core/utils/descriptors/__init__.py @@ -2,7 +2,7 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# from ._lazy import lazy_property, nop_write diff --git a/grc/core/utils/descriptors/_lazy.py b/grc/core/utils/descriptors/_lazy.py index 05d1bd9652..280b128365 100644 --- a/grc/core/utils/descriptors/_lazy.py +++ b/grc/core/utils/descriptors/_lazy.py @@ -2,7 +2,7 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# import functools diff --git a/grc/core/utils/hide_bokeh_gui_options_if_not_installed.py b/grc/core/utils/hide_bokeh_gui_options_if_not_installed.py index 2feff18b57..ecce5f2424 100644 --- a/grc/core/utils/hide_bokeh_gui_options_if_not_installed.py +++ b/grc/core/utils/hide_bokeh_gui_options_if_not_installed.py @@ -2,7 +2,7 @@ # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later -# +# def hide_bokeh_gui_options_if_not_installed(options_blk): |