summaryrefslogtreecommitdiff
path: root/gr-blocks/python
diff options
context:
space:
mode:
authorTom Rondeau <tom@trondeau.com>2014-07-07 12:18:00 -0400
committerTom Rondeau <tom@trondeau.com>2014-07-07 12:18:00 -0400
commit597b93798a804cde1783d6d2ab53b348d57c44cd (patch)
treeb65e73bb0de634ff5d209b15971ebdabf369a45c /gr-blocks/python
parent1151e5502ccd440ebd89599cf7e4be4fb5ed8334 (diff)
Removing trailing/extra whitespaces before release.
We should be more careful about letting these into the code in the future. In emacs, we can use (add-hook 'before-save-hook 'delete-trailing-whitespace).
Diffstat (limited to 'gr-blocks/python')
-rw-r--r--gr-blocks/python/blocks/CMakeLists.txt2
-rw-r--r--gr-blocks/python/blocks/__init__.py2
-rw-r--r--gr-blocks/python/blocks/qa_burst_tagger.py2
-rwxr-xr-xgr-blocks/python/blocks/qa_cpp_py_binding.py4
-rwxr-xr-xgr-blocks/python/blocks/qa_cpp_py_binding_set.py2
-rw-r--r--gr-blocks/python/blocks/qa_endian_swap.py2
-rw-r--r--gr-blocks/python/blocks/qa_file_metadata.py4
-rw-r--r--gr-blocks/python/blocks/qa_hier_block2_message_connections.py4
-rwxr-xr-xgr-blocks/python/blocks/qa_message.py2
-rwxr-xr-xgr-blocks/python/blocks/qa_pack_k_bits.py2
-rwxr-xr-xgr-blocks/python/blocks/qa_patterned_interleaver.py6
-rw-r--r--gr-blocks/python/blocks/qa_python_message_passing.py16
-rw-r--r--gr-blocks/python/blocks/qa_sample_and_hold.py2
-rwxr-xr-xgr-blocks/python/blocks/qa_stretch.py2
-rwxr-xr-xgr-blocks/python/blocks/qa_tag_gate.py10
-rw-r--r--gr-blocks/python/blocks/qa_tags_strobe.py6
-rwxr-xr-xgr-blocks/python/blocks/qa_vector_insert.py10
-rw-r--r--gr-blocks/python/blocks/qa_vector_map.py6
-rw-r--r--gr-blocks/python/blocks/stream_to_vector_decimator.py8
19 files changed, 46 insertions, 46 deletions
diff --git a/gr-blocks/python/blocks/CMakeLists.txt b/gr-blocks/python/blocks/CMakeLists.txt
index 9287975730..44977313cf 100644
--- a/gr-blocks/python/blocks/CMakeLists.txt
+++ b/gr-blocks/python/blocks/CMakeLists.txt
@@ -51,7 +51,7 @@ if(ENABLE_TESTING)
${CMAKE_CURRENT_SOURCE_DIR}/qa_ctrlport_probes.py
)
endif(NOT ENABLE_GR_CTRLPORT)
-
+
foreach(py_qa_test_file ${py_qa_test_files})
get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
diff --git a/gr-blocks/python/blocks/__init__.py b/gr-blocks/python/blocks/__init__.py
index b7ba794ea2..fc4cc7ab66 100644
--- a/gr-blocks/python/blocks/__init__.py
+++ b/gr-blocks/python/blocks/__init__.py
@@ -30,7 +30,7 @@ except ImportError:
dirname, filename = os.path.split(os.path.abspath(__file__))
__path__.append(os.path.join(dirname, "..", "..", "swig"))
from blocks_swig import *
-
+
from stream_to_vector_decimator import *
#alias old add_vXX and multiply_vXX
diff --git a/gr-blocks/python/blocks/qa_burst_tagger.py b/gr-blocks/python/blocks/qa_burst_tagger.py
index 50aaf893bd..b1a4f942f1 100644
--- a/gr-blocks/python/blocks/qa_burst_tagger.py
+++ b/gr-blocks/python/blocks/qa_burst_tagger.py
@@ -43,7 +43,7 @@ class test_burst_tagger(gr_unittest.TestCase):
self.tb.connect(trg, (op,1))
self.tb.connect(op, snk)
self.tb.run()
-
+
x = snk.current_tags()
self.assertEqual(2, x[0].offset)
self.assertEqual(4, x[1].offset)
diff --git a/gr-blocks/python/blocks/qa_cpp_py_binding.py b/gr-blocks/python/blocks/qa_cpp_py_binding.py
index c15633df82..35e073d584 100755
--- a/gr-blocks/python/blocks/qa_cpp_py_binding.py
+++ b/gr-blocks/python/blocks/qa_cpp_py_binding.py
@@ -20,7 +20,7 @@
# Boston, MA 02110-1301, USA.
#
-#
+#
# This program tests mixed python and c++ ctrlport exports in a single app
#
@@ -126,7 +126,7 @@ class test_cpp_py_binding(gr_unittest.TestCase):
val = get5()
rval = v5.get()
self.assertComplexTuplesAlmostEqual(val, rval, 5)
-
+
val = get6()
rval = v6.get()
self.assertComplexTuplesAlmostEqual(val, rval, 5)
diff --git a/gr-blocks/python/blocks/qa_cpp_py_binding_set.py b/gr-blocks/python/blocks/qa_cpp_py_binding_set.py
index 2e4198c04d..69ed6d1d2b 100755
--- a/gr-blocks/python/blocks/qa_cpp_py_binding_set.py
+++ b/gr-blocks/python/blocks/qa_cpp_py_binding_set.py
@@ -20,7 +20,7 @@
# Boston, MA 02110-1301, USA.
#
-#
+#
# This program tests mixed python and c++ GRCP sets in a single app
#
diff --git a/gr-blocks/python/blocks/qa_endian_swap.py b/gr-blocks/python/blocks/qa_endian_swap.py
index ea6e10fb8f..dd6ee349b2 100644
--- a/gr-blocks/python/blocks/qa_endian_swap.py
+++ b/gr-blocks/python/blocks/qa_endian_swap.py
@@ -57,7 +57,7 @@ class test_endian_swap(gr_unittest.TestCase):
self.tb.connect(src, op, dst)
self.tb.run()
result_data = list(dst.data())
-
+
self.assertEqual(expected_result, result_data)
if __name__ == '__main__':
diff --git a/gr-blocks/python/blocks/qa_file_metadata.py b/gr-blocks/python/blocks/qa_file_metadata.py
index a36eb48fc5..0d7628bbdc 100644
--- a/gr-blocks/python/blocks/qa_file_metadata.py
+++ b/gr-blocks/python/blocks/qa_file_metadata.py
@@ -57,7 +57,7 @@ class test_file_metadata(gr_unittest.TestCase):
data = sig_source_c(samp_rate, 1000, 1, N)
src = blocks.vector_source_c(data)
fsnk = blocks.file_meta_sink(gr.sizeof_gr_complex, outfile,
- samp_rate, 1,
+ samp_rate, 1,
blocks.GR_FILE_FLOAT, True,
1000000, extras_str, detached)
fsnk.set_unbuffered(True)
@@ -136,7 +136,7 @@ class test_file_metadata(gr_unittest.TestCase):
data = sig_source_c(samp_rate, 1000, 1, N)
src = blocks.vector_source_c(data)
fsnk = blocks.file_meta_sink(gr.sizeof_gr_complex, outfile,
- samp_rate, 1,
+ samp_rate, 1,
blocks.GR_FILE_FLOAT, True,
1000000, extras_str, detached)
fsnk.set_unbuffered(True)
diff --git a/gr-blocks/python/blocks/qa_hier_block2_message_connections.py b/gr-blocks/python/blocks/qa_hier_block2_message_connections.py
index bc575b779a..0f8a4b8543 100644
--- a/gr-blocks/python/blocks/qa_hier_block2_message_connections.py
+++ b/gr-blocks/python/blocks/qa_hier_block2_message_connections.py
@@ -102,7 +102,7 @@ class test_hier_block2_message_connections(gr_unittest.TestCase):
receive_port):
"""assert that the given sender block has a subscription for the given
receiver block on the appropriate send and receive ports
-
+
:param sender: a block sptr to the message sender
:param string send_port: the port messages are being sent on
:param receiver: a block sptr to the message receiver
@@ -116,7 +116,7 @@ class test_hier_block2_message_connections(gr_unittest.TestCase):
def assert_has_num_subscriptions(self, block, port, number):
"""assert that the given block has the given number of subscriptions
on the given port
-
+
:param block: a block sptr
:param string port: the port name
:param number: the number of subscriptions expected
diff --git a/gr-blocks/python/blocks/qa_message.py b/gr-blocks/python/blocks/qa_message.py
index abfc652199..1d677007b4 100755
--- a/gr-blocks/python/blocks/qa_message.py
+++ b/gr-blocks/python/blocks/qa_message.py
@@ -143,7 +143,7 @@ class test_message(gr_unittest.TestCase):
rec_msg = snk.get_message(0)
self.assertTrue(pmt.eqv(rec_msg, msg))
-
+
if __name__ == '__main__':
gr_unittest.run(test_message, "test_message.xml")
diff --git a/gr-blocks/python/blocks/qa_pack_k_bits.py b/gr-blocks/python/blocks/qa_pack_k_bits.py
index b73bf3d5a9..ab0b638a09 100755
--- a/gr-blocks/python/blocks/qa_pack_k_bits.py
+++ b/gr-blocks/python/blocks/qa_pack_k_bits.py
@@ -62,7 +62,7 @@ class test_pack(gr_unittest.TestCase):
self.tb.connect(src,unpack,pack,snk);
self.tb.run()
self.assertEqual(list(expected_results), list(snk.data()));
-
+
if __name__ == '__main__':
gr_unittest.run(test_pack, "test_pack.xml")
diff --git a/gr-blocks/python/blocks/qa_patterned_interleaver.py b/gr-blocks/python/blocks/qa_patterned_interleaver.py
index c9fe7b123b..2d3168db40 100755
--- a/gr-blocks/python/blocks/qa_patterned_interleaver.py
+++ b/gr-blocks/python/blocks/qa_patterned_interleaver.py
@@ -40,14 +40,14 @@ class test_patterned_interleaver (gr_unittest.TestCase):
itg = blocks.patterned_interleaver(gr.sizeof_float, dst_data)
dst = blocks.vector_sink_f()
head = blocks.head(gr.sizeof_float, 8);
-
+
self.tb.connect( src0, (itg,0) );
self.tb.connect( src1, (itg,1) );
self.tb.connect( src2, (itg,2) );
self.tb.connect( itg, head, dst );
-
+
self.tb.run()
self.assertEqual(list(dst_data), list(dst.data()))
-
+
if __name__ == '__main__':
gr_unittest.run(test_patterned_interleaver, "test_patterned_interleaver.xml")
diff --git a/gr-blocks/python/blocks/qa_python_message_passing.py b/gr-blocks/python/blocks/qa_python_message_passing.py
index e391c5f952..7bb5fbe10e 100644
--- a/gr-blocks/python/blocks/qa_python_message_passing.py
+++ b/gr-blocks/python/blocks/qa_python_message_passing.py
@@ -69,7 +69,7 @@ class message_consumer(gr.sync_block):
self.msg_list.append(pmt.from_long(pmt.to_long(msg)))
class test_python_message_passing(gr_unittest.TestCase):
-
+
def setUp(self):
self.tb = gr.top_block()
@@ -90,17 +90,17 @@ class test_python_message_passing(gr_unittest.TestCase):
src = blocks.vector_source_f(src_data, False)
msg_gen = message_generator(msg_list, msg_interval)
msg_cons = message_consumer()
-
+
# Connect vector source to message gen
self.tb.connect(src, msg_gen)
-
+
# Connect message generator to message consumer
self.tb.msg_connect(msg_gen, 'out_port', msg_cons, 'in_port')
# Verify that the messgae port query functions work
self.assertEqual(pmt.to_python(msg_gen.message_ports_out())[0], 'out_port')
self.assertEqual('in_port' in pmt.to_python(msg_cons.message_ports_in()), True)
-
+
# Run to verify message passing
self.tb.start()
@@ -108,13 +108,13 @@ class test_python_message_passing(gr_unittest.TestCase):
while msg_gen.msg_ctr < num_msgs:
time.sleep(0.5)
self.tb.stop()
- self.tb.wait()
-
+ self.tb.wait()
+
# Verify that the message consumer got all the messages
self.assertEqual(num_msgs, len(msg_cons.msg_list))
for i in range(num_msgs):
self.assertTrue(pmt.equal(msg_list[i], msg_cons.msg_list[i]))
-
+
if __name__ == '__main__':
- gr_unittest.run(test_python_message_passing,
+ gr_unittest.run(test_python_message_passing,
'test_python_message_passing.xml')
diff --git a/gr-blocks/python/blocks/qa_sample_and_hold.py b/gr-blocks/python/blocks/qa_sample_and_hold.py
index d6aedc23cc..f645148695 100644
--- a/gr-blocks/python/blocks/qa_sample_and_hold.py
+++ b/gr-blocks/python/blocks/qa_sample_and_hold.py
@@ -45,7 +45,7 @@ class test_sample_and_hold(gr_unittest.TestCase):
self.tb.connect(ctrl, (op,1))
self.tb.connect(op, dst)
self.tb.run()
-
+
result = dst.data()
self.assertFloatTuplesAlmostEqual(expected_result, result, places=6)
diff --git a/gr-blocks/python/blocks/qa_stretch.py b/gr-blocks/python/blocks/qa_stretch.py
index 66a04d53f6..e91a375abf 100755
--- a/gr-blocks/python/blocks/qa_stretch.py
+++ b/gr-blocks/python/blocks/qa_stretch.py
@@ -47,7 +47,7 @@ class test_stretch(gr_unittest.TestCase):
deinter = blocks.vector_to_streams(gr.sizeof_float, 2)
dst0 = blocks.vector_sink_f()
dst1 = blocks.vector_sink_f()
-
+
tb.connect(src0, (inter,0))
tb.connect(src1, (inter,1))
tb.connect(inter, op)
diff --git a/gr-blocks/python/blocks/qa_tag_gate.py b/gr-blocks/python/blocks/qa_tag_gate.py
index 74fe5a7bcd..4d22c73adb 100755
--- a/gr-blocks/python/blocks/qa_tag_gate.py
+++ b/gr-blocks/python/blocks/qa_tag_gate.py
@@ -1,22 +1,22 @@
#!/usr/bin/env python
-#
+#
# Copyright 2013 <+YOU OR YOUR COMPANY+>.
-#
+#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
-#
+#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with this software; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-#
+#
from gnuradio import gr, gr_unittest, blocks
import pmt
diff --git a/gr-blocks/python/blocks/qa_tags_strobe.py b/gr-blocks/python/blocks/qa_tags_strobe.py
index 51b1c63bad..c4e1b5d8bc 100644
--- a/gr-blocks/python/blocks/qa_tags_strobe.py
+++ b/gr-blocks/python/blocks/qa_tags_strobe.py
@@ -41,7 +41,7 @@ class test_tags_strobe(gr_unittest.TestCase):
pmt.intern("TEST"), nsamps)
hed = blocks.head(gr.sizeof_float, N)
dst = blocks.vector_sink_f()
-
+
self.tb.connect(src, hed, dst)
self.tb.run()
@@ -61,7 +61,7 @@ class test_tags_strobe(gr_unittest.TestCase):
pmt.intern("TEST"), nsamps)
hed = blocks.head(gr.sizeof_float, N)
dst = blocks.vector_sink_f()
-
+
self.tb.connect(src, hed, dst)
self.tb.run()
@@ -81,7 +81,7 @@ class test_tags_strobe(gr_unittest.TestCase):
pmt.intern("TEST"), nsamps)
hed = blocks.head(gr.sizeof_float, N)
dst = blocks.vector_sink_f()
-
+
self.tb.connect(src, hed, dst)
self.tb.run()
diff --git a/gr-blocks/python/blocks/qa_vector_insert.py b/gr-blocks/python/blocks/qa_vector_insert.py
index 5f6e84665c..e4c4055125 100755
--- a/gr-blocks/python/blocks/qa_vector_insert.py
+++ b/gr-blocks/python/blocks/qa_vector_insert.py
@@ -1,24 +1,24 @@
#!/usr/bin/env python
#
# Copyright 2012-2013 Free Software Foundation, Inc.
-#
+#
# This file is part of GNU Radio
-#
+#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
-#
+#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-#
+#
from gnuradio import gr, gr_unittest, blocks
import math
diff --git a/gr-blocks/python/blocks/qa_vector_map.py b/gr-blocks/python/blocks/qa_vector_map.py
index 94bdb1989b..1c07de826f 100644
--- a/gr-blocks/python/blocks/qa_vector_map.py
+++ b/gr-blocks/python/blocks/qa_vector_map.py
@@ -67,7 +67,7 @@ class test_vector_map(gr_unittest.TestCase):
for n in range(0, N):
result_data = list(dsts[n].data())
self.assertEqual(expected_results[n], result_data)
-
+
def test_interleaving(self):
# Takes 3 streams (a, b and c)
# Outputs 2 streams.
@@ -90,8 +90,8 @@ class test_vector_map(gr_unittest.TestCase):
dstD = blocks.vector_sink_f(2)
dstE = blocks.vector_sink_f(4)
self.tb.connect(srcA, (vmap, 0))
- self.tb.connect(srcB, (vmap, 1))
- self.tb.connect(srcC, (vmap, 2))
+ self.tb.connect(srcB, (vmap, 1))
+ self.tb.connect(srcC, (vmap, 2))
self.tb.connect((vmap, 0), dstD)
self.tb.connect((vmap, 1), dstE)
self.tb.run()
diff --git a/gr-blocks/python/blocks/stream_to_vector_decimator.py b/gr-blocks/python/blocks/stream_to_vector_decimator.py
index 984d84b4bb..bcbfd96b8b 100644
--- a/gr-blocks/python/blocks/stream_to_vector_decimator.py
+++ b/gr-blocks/python/blocks/stream_to_vector_decimator.py
@@ -30,7 +30,7 @@ class stream_to_vector_decimator(gr.hier_block2):
def __init__(self, item_size, sample_rate, vec_rate, vec_len):
"""
Create the block chain.
-
+
Args:
item_size: the number of bytes per sample
sample_rate: the rate of incoming samples
@@ -53,7 +53,7 @@ class stream_to_vector_decimator(gr.hier_block2):
def set_sample_rate(self, sample_rate):
"""
Set the new sampling rate and update the decimator.
-
+
Args:
sample_rate: the new rate
"""
@@ -63,7 +63,7 @@ class stream_to_vector_decimator(gr.hier_block2):
def set_vec_rate(self, vec_rate):
"""
Set the new vector rate and update the decimator.
-
+
Args:
vec_rate: the new rate
"""
@@ -73,7 +73,7 @@ class stream_to_vector_decimator(gr.hier_block2):
def set_decimation(self, decim):
"""
Set the decimation parameter directly.
-
+
Args:
decim: the new decimation
"""