summaryrefslogtreecommitdiff
path: root/grc/core
diff options
context:
space:
mode:
Diffstat (limited to 'grc/core')
-rw-r--r--grc/core/FlowGraph.py4
-rw-r--r--grc/core/blocks/block.py6
-rw-r--r--grc/core/blocks/dummy.py2
-rw-r--r--grc/core/blocks/embedded_python.py4
-rw-r--r--grc/core/generator/cpp_hier_block.py2
-rw-r--r--grc/core/generator/cpp_top_block.py2
-rw-r--r--grc/core/generator/top_block.py2
-rw-r--r--grc/core/params/param.py4
8 files changed, 13 insertions, 13 deletions
diff --git a/grc/core/FlowGraph.py b/grc/core/FlowGraph.py
index d7a2bfeeee..f4984d608e 100644
--- a/grc/core/FlowGraph.py
+++ b/grc/core/FlowGraph.py
@@ -105,7 +105,7 @@ class FlowGraph(Element):
output = []
for snip in snippets:
- d ={}
+ d = {}
sect = snip.params['section'].value
d['section'] = sect
d['priority'] = snip.params['priority'].value
@@ -455,7 +455,7 @@ class FlowGraph(Element):
had_connect_errors = True
for block in self.blocks:
- if block.is_dummy_block :
+ if block.is_dummy_block:
block.rewrite() # Make ports visible
# Flowgraph errors depending on disabled blocks are not displayed
# in the error dialog box
diff --git a/grc/core/blocks/block.py b/grc/core/blocks/block.py
index d3c0ad833e..ba4eb6a8f6 100644
--- a/grc/core/blocks/block.py
+++ b/grc/core/blocks/block.py
@@ -78,7 +78,7 @@ class Block(Element):
if Flags.HAS_CPP in self.flags and self.enabled and not (self.is_virtual_source() or self.is_virtual_sink()):
# This is a workaround to allow embedded python blocks/modules to load as there is
# currently 'cpp' in the flags by default caused by the other built-in blocks
- if hasattr(self,'cpp_templates'):
+ if hasattr(self, 'cpp_templates'):
self.orig_cpp_templates = self.cpp_templates # The original template, in case we have to edit it when transpiling to C++
self.current_bus_structure = {'source': None, 'sink': None}
@@ -147,7 +147,7 @@ class Block(Element):
## Bus Logic
###############################
- for direc in {'source','sink'}:
+ for direc in {'source', 'sink'}:
if direc == 'source':
ports = self.sources
ports_gui = self.filter_bus_port(self.sources)
@@ -185,7 +185,7 @@ class Block(Element):
# Add the Bus Ports to the list of ports
for i in range(len(struct)):
# self.sinks = [port_factory(parent=self, **params) for params in self.inputs_data]
- port = self.parent.parent.make_port(self,direction=direc,id=str(len(ports)),label='bus',dtype='bus',bus_struct=struct[i])
+ port = self.parent.parent.make_port(self, direction=direc, id=str(len(ports)), label='bus', dtype='bus', bus_struct=struct[i])
ports.append(port)
for (saved_port, connection) in zip(removed_bus_ports, removed_bus_connections):
diff --git a/grc/core/blocks/dummy.py b/grc/core/blocks/dummy.py
index 75514fc235..5cdc05a9df 100644
--- a/grc/core/blocks/dummy.py
+++ b/grc/core/blocks/dummy.py
@@ -19,7 +19,7 @@ class DummyBlock(Block):
def __init__(self, parent, missing_block_id, parameters, **_):
self.key = missing_block_id
- self.parameters_data = build_params([],False, False,self.flags, self.key)
+ self.parameters_data = build_params([], False, False, self.flags, self.key)
super(DummyBlock, self).__init__(parent=parent)
param_factory = self.parent_platform.make_param
diff --git a/grc/core/blocks/embedded_python.py b/grc/core/blocks/embedded_python.py
index fe364f9559..f7bd2b39b6 100644
--- a/grc/core/blocks/embedded_python.py
+++ b/grc/core/blocks/embedded_python.py
@@ -150,7 +150,7 @@ class EPyBlock(Block):
param.default = str(value)
except KeyError: # need to make a new param
param = param_factory(
- parent=self, id=id_, dtype='raw', value=value,
+ parent=self, id=id_, dtype='raw', value=value,
name=id_.replace('_', ' ').title(),
)
setattr(param, '__epy_param__', True)
@@ -218,7 +218,7 @@ class EPyModule(Block):
to set parameters of other blocks in your flowgraph.
""")}
- epy_flags=Block.flags
+ epy_flags = Block.flags
epy_flags.set(epy_flags.SHOW_ID)
parameters_data = build_params(
diff --git a/grc/core/generator/cpp_hier_block.py b/grc/core/generator/cpp_hier_block.py
index 9eef19cc1e..c4d98e854b 100644
--- a/grc/core/generator/cpp_hier_block.py
+++ b/grc/core/generator/cpp_hier_block.py
@@ -80,7 +80,7 @@ class CppHierBlockGenerator(CppTopBlockGenerator):
self._flow_graph.get_option('id').replace('_', ' ').title()
)
data['category'] = self._flow_graph.get_option('category')
- data['flags'] = [ 'cpp' ]
+ data['flags'] = ['cpp']
# Parameters
data['parameters'] = []
diff --git a/grc/core/generator/cpp_top_block.py b/grc/core/generator/cpp_top_block.py
index c2e31a55b0..b886736b0c 100644
--- a/grc/core/generator/cpp_top_block.py
+++ b/grc/core/generator/cpp_top_block.py
@@ -250,7 +250,7 @@ class CppTopBlockGenerator(TopBlockGenerator):
{r"gr\.sizeof_([\w_]+)": r"sizeof(\1)"}
)
for key in translations:
- make = re.sub(key.replace("\\\\", "\\"), translations[key],make)
+ make = re.sub(key.replace("\\\\", "\\"), translations[key], make)
declarations = declarations.replace(key, translations[key])
if make:
blocks_make.append((block, make, declarations))
diff --git a/grc/core/generator/top_block.py b/grc/core/generator/top_block.py
index a8a9914108..d3ad3135ab 100644
--- a/grc/core/generator/top_block.py
+++ b/grc/core/generator/top_block.py
@@ -312,7 +312,7 @@ class TopBlockGenerator(object):
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):
- for port_num_a,port_num_b in zip(porta.bus_structure,portb.bus_structure):
+ for port_num_a, port_num_b in zip(porta.bus_structure, portb.bus_structure):
hidden_porta = porta.parent.sources[port_num_a]
hidden_portb = portb.parent.sinks[port_num_b]
connection = fg.parent_platform.Connection(
diff --git a/grc/core/params/param.py b/grc/core/params/param.py
index 841a290b5d..f753683090 100644
--- a/grc/core/params/param.py
+++ b/grc/core/params/param.py
@@ -193,7 +193,7 @@ class Param(Element):
#########################
# ID and Enum types (not evaled)
#########################
- if dtype in ('id', 'stream_id','name') or self.is_enum():
+ if dtype in ('id', 'stream_id', 'name') or self.is_enum():
if self.options.attributes:
expr = attributed_str(expr)
for key, value in self.options.attributes[expr].items():
@@ -242,7 +242,7 @@ class Param(Element):
# Do not check if file/directory exists, that is a runtime issue
try:
# Do not evaluate multiline strings (code snippets or comments)
- if dtype not in ['_multiline','_multiline_python_external']:
+ if dtype not in ['_multiline', '_multiline_python_external']:
value = self.parent_flowgraph.evaluate(expr)
if not isinstance(value, str):
raise Exception()