summaryrefslogtreecommitdiff
path: root/grc/core/generator/FlowGraphProxy.py
diff options
context:
space:
mode:
authorJosh Morman <jmorman@gnuradio.org>2021-11-24 12:48:20 -0500
committermormj <34754695+mormj@users.noreply.github.com>2021-11-24 14:41:53 -0500
commit817fc3ce9cdc819a291e76ec324c4e748381f035 (patch)
treeed00faf5ea2c0f5a8caaba0ce41cd816dd6ca958 /grc/core/generator/FlowGraphProxy.py
parente776d673aa51b5ef19e16cfb6d22098c0b14a679 (diff)
grc: pep8 formatting
Signed-off-by: Josh Morman <jmorman@gnuradio.org>
Diffstat (limited to 'grc/core/generator/FlowGraphProxy.py')
-rw-r--r--grc/core/generator/FlowGraphProxy.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/grc/core/generator/FlowGraphProxy.py b/grc/core/generator/FlowGraphProxy.py
index 38d44e5b13..dad36c9240 100644
--- a/grc/core/generator/FlowGraphProxy.py
+++ b/grc/core/generator/FlowGraphProxy.py
@@ -8,6 +8,7 @@
from ..utils import expr_utils
from operator import methodcaller, attrgetter
+
class FlowGraphProxy(object): # TODO: move this in a refactored Generator
def __init__(self, fg):
@@ -59,8 +60,8 @@ class FlowGraphProxy(object): # TODO: move this in a refactored Generator
'label': str(pad.params['label'].get_evaluated()),
'type': str(pad.params['type'].get_evaluated()),
'vlen': str(pad.params['vlen'].get_value()),
- 'size': type_param.options.attributes[type_param.get_value()]['size'],
- 'cpp_size': type_param.options.attributes[type_param.get_value()]['cpp_size'],
+ 'size': type_param.options.attributes[type_param.get_value()]['size'],
+ 'cpp_size': type_param.options.attributes[type_param.get_value()]['cpp_size'],
'optional': bool(pad.params['optional'].get_evaluated()),
}
num_ports = pad.params['num_streams'].get_evaluated()
@@ -127,7 +128,8 @@ class FlowGraphProxy(object): # TODO: move this in a refactored Generator
Returns:
a sorted list of variable blocks in order of dependency (indep -> dep)
"""
- variables = [block for block in self.iter_enabled_blocks() if block.is_variable]
+ variables = [block for block in self.iter_enabled_blocks()
+ if block.is_variable]
return expr_utils.sort_objects(variables, attrgetter('name'), methodcaller('get_cpp_var_make'))
def includes(self):
@@ -157,6 +159,7 @@ class FlowGraphProxy(object): # TODO: move this in a refactored Generator
"""
return [block.cpp_templates.render('packages') for block in self.iter_enabled_blocks() if not (block.is_virtual_sink() or block.is_virtual_source())]
+
def get_hier_block_io(flow_graph, direction, domain=None):
"""
Get a list of io ports for this flow graph.
@@ -172,7 +175,7 @@ def get_hier_block_io(flow_graph, direction, domain=None):
'label': str(pad.params['label'].get_evaluated()),
'type': str(pad.params['type'].get_evaluated()),
'vlen': str(pad.params['vlen'].get_value()),
- 'size': type_param.options.attributes[type_param.get_value()]['size'],
+ 'size': type_param.options.attributes[type_param.get_value()]['size'],
'optional': bool(pad.params['optional'].get_evaluated()),
}
num_ports = pad.params['num_streams'].get_evaluated()