diff options
author | Clayton Smith <argilo@gmail.com> | 2021-10-23 22:39:31 -0400 |
---|---|---|
committer | Martin Braun <martin@gnuradio.org> | 2021-10-25 13:55:03 -0700 |
commit | 921a433b3596ba23ac497af9b589a584ca2c32c7 (patch) | |
tree | 12df25e5e6021b756abc11286c6319ece2d3d0db | |
parent | 39e88e44607fe750fc6cba456554213adf9b862a (diff) |
modtool: Clean up whitespace in templates
Signed-off-by: Clayton Smith <argilo@gmail.com>
11 files changed, 14 insertions, 30 deletions
diff --git a/gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/__init__.py b/gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/__init__.py index 01371dcc1b..d8ff40daaa 100644 --- a/gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/__init__.py +++ b/gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/__init__.py @@ -68,4 +68,3 @@ def _test(): if __name__ == "__main__": _test() - diff --git a/gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/generated/compound.py b/gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/generated/compound.py index d0b164ea43..294f0216e7 100644 --- a/gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/generated/compound.py +++ b/gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/generated/compound.py @@ -499,5 +499,3 @@ def parse(inFilename): rootObj = supermod.DoxygenType.factory() rootObj.build(rootNode) return rootObj - - diff --git a/gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/generated/index.py b/gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/generated/index.py index c58407dbfe..8a817e15f1 100644 --- a/gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/generated/index.py +++ b/gr-utils/modtool/templates/gr-newmod/docs/doxygen/doxyxml/generated/index.py @@ -74,4 +74,3 @@ def parse(inFilename): rootObj.build(rootNode) return rootObj - diff --git a/gr-utils/modtool/templates/gr-newmod/docs/doxygen/other/group_defs.dox b/gr-utils/modtool/templates/gr-newmod/docs/doxygen/other/group_defs.dox index 708f8c6d98..d469944acb 100644 --- a/gr-utils/modtool/templates/gr-newmod/docs/doxygen/other/group_defs.dox +++ b/gr-utils/modtool/templates/gr-newmod/docs/doxygen/other/group_defs.dox @@ -4,4 +4,3 @@ * module are listed here or in the subcategories below. * */ - diff --git a/gr-utils/modtool/templates/gr-newmod/docs/doxygen/pydoc_macros.h b/gr-utils/modtool/templates/gr-newmod/docs/doxygen/pydoc_macros.h index 98bf7cd639..fb3954bc87 100644 --- a/gr-utils/modtool/templates/gr-newmod/docs/doxygen/pydoc_macros.h +++ b/gr-utils/modtool/templates/gr-newmod/docs/doxygen/pydoc_macros.h @@ -16,4 +16,4 @@ __doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7 #define DOC(...) __EXPAND(__EXPAND(__CAT2(__DOC, __VA_SIZE(__VA_ARGS__)))(__VA_ARGS__)) -#endif // PYDOC_MACROS_H
\ No newline at end of file +#endif // PYDOC_MACROS_H diff --git a/gr-utils/modtool/templates/gr-newmod/docs/doxygen/update_pydoc.py b/gr-utils/modtool/templates/gr-newmod/docs/doxygen/update_pydoc.py index ccf982ac9b..dd2fba79f2 100644 --- a/gr-utils/modtool/templates/gr-newmod/docs/doxygen/update_pydoc.py +++ b/gr-utils/modtool/templates/gr-newmod/docs/doxygen/update_pydoc.py @@ -264,7 +264,7 @@ def sub_docstring_in_pydoc_h(pydoc_files, docstrings_dict, output_dir, filter_st docstrings_dict = {k: v for k, v in docstrings_dict.items() if k.startswith(filter_str)} with open(os.path.join(output_dir,'docstring_status'),'w') as status_file: - + for pydoc_file in pydoc_files: if filter_str: filter_str2 = "::".join((filter_str,os.path.split(pydoc_file)[-1].split('_pydoc_template.h')[0])) @@ -275,16 +275,16 @@ def sub_docstring_in_pydoc_h(pydoc_files, docstrings_dict, output_dir, filter_st file_in = open(pydoc_file,'r').read() - for key, value in docstrings_dict2.items(): - file_in_tmp = file_in + for key, value in docstrings_dict2.items(): + file_in_tmp = file_in try: doc_key = key.split("::") # if 'gr' in doc_key: - # doc_key.remove('gr') + # doc_key.remove('gr') doc_key = '_'.join(doc_key) regexp = r'(__doc_{} =\sR\"doc\()[^)]*(\)doc\")'.format(doc_key) regexp = re.compile(regexp, re.MULTILINE) - + (file_in, nsubs) = regexp.subn(r'\1'+value+r'\2', file_in, count=1) if nsubs == 1: status_file.write("PASS: " + pydoc_file + "\n") @@ -311,7 +311,7 @@ def argParse(): """Parses commandline args.""" desc='Scrape the doxygen generated xml for docstrings to insert into python bindings' parser = ArgumentParser(description=desc) - + parser.add_argument("function", help="Operation to perform on docstrings", choices=["scrape","sub","copy"]) parser.add_argument("--xml_path") @@ -338,5 +338,3 @@ if __name__ == "__main__": elif args.function.lower() == 'copy': pydoc_files = glob.glob(os.path.join(args.bindings_dir,'*_pydoc_template.h')) copy_docstring_templates(pydoc_files, args.output_dir) - - diff --git a/gr-utils/modtool/templates/gr-newmod/examples/README b/gr-utils/modtool/templates/gr-newmod/examples/README index c012bdfa0a..d7a3359d93 100644 --- a/gr-utils/modtool/templates/gr-newmod/examples/README +++ b/gr-utils/modtool/templates/gr-newmod/examples/README @@ -1,4 +1,3 @@ It is considered good practice to add examples in here to demonstrate the functionality of your OOT module. Python scripts, GRC flow graphs or other code can go here. - diff --git a/gr-utils/modtool/templates/gr-newmod/python/bindings/CMakeLists.txt b/gr-utils/modtool/templates/gr-newmod/python/bindings/CMakeLists.txt index 6272b825e7..94e5b55534 100644 --- a/gr-utils/modtool/templates/gr-newmod/python/bindings/CMakeLists.txt +++ b/gr-utils/modtool/templates/gr-newmod/python/bindings/CMakeLists.txt @@ -31,7 +31,7 @@ include(GrPybind) list(APPEND howto_python_files python_bindings.cc) -GR_PYBIND_MAKE_OOT(howto +GR_PYBIND_MAKE_OOT(howto ../.. gr::howto "${howto_python_files}") diff --git a/gr-utils/modtool/templates/gr-newmod/python/bindings/docstrings/README.md b/gr-utils/modtool/templates/gr-newmod/python/bindings/docstrings/README.md index 295455abee..a506c22aa8 100644 --- a/gr-utils/modtool/templates/gr-newmod/python/bindings/docstrings/README.md +++ b/gr-utils/modtool/templates/gr-newmod/python/bindings/docstrings/README.md @@ -1 +1 @@ -This directory stores templates for docstrings that are scraped from the include header files for each block
\ No newline at end of file +This directory stores templates for docstrings that are scraped from the include header files for each block diff --git a/gr-utils/modtool/templates/gr-newmod/python/bindings/header_utils.py b/gr-utils/modtool/templates/gr-newmod/python/bindings/header_utils.py index 165124e969..2150a76a25 100644 --- a/gr-utils/modtool/templates/gr-newmod/python/bindings/header_utils.py +++ b/gr-utils/modtool/templates/gr-newmod/python/bindings/header_utils.py @@ -17,8 +17,8 @@ class PybindHeaderParser: return True else: return False - - def get_flag_pygccxml(self): + + def get_flag_pygccxml(self): # p = re.compile(r'BINDTOOL_USE_PYGCCXML\(([^\s])\)') # m = p.search(self.file_txt) m = re.search(r'BINDTOOL_USE_PYGCCXML\(([^\s])\)', self.file_txt) @@ -54,7 +54,7 @@ def argParse(): """Parses commandline args.""" desc='Reads the parameters from the comment block in the pybind files' parser = ArgumentParser(description=desc) - + parser.add_argument("function", help="Operation to perform on comment block of pybind file", choices=["flag_auto","flag_pygccxml","header_filename","header_file_hash","all"]) parser.add_argument("pathname", help="Pathname of pybind c++ file to read, e.g. blockname_python.cc") @@ -73,6 +73,6 @@ if __name__ == "__main__": elif args.function == "header_filename": print(pbhp.get_header_filename()) elif args.function == "header_file_hash": - print(pbhp.get_header_file_hash()) + print(pbhp.get_header_file_hash()) elif args.function == "all": - print(pbhp.get_flags())
\ No newline at end of file + print(pbhp.get_flags()) diff --git a/gr-utils/modtool/templates/templates.py b/gr-utils/modtool/templates/templates.py index 70eaf9cdad..57e1ff600a 100644 --- a/gr-utils/modtool/templates/templates.py +++ b/gr-utils/modtool/templates/templates.py @@ -83,7 +83,6 @@ namespace gr { } // namespace gr #endif /* INCLUDED_${modname.upper()}_${blockname.upper()}_IMPL_H */ - ''' # C++ file of a GR block @@ -254,7 +253,6 @@ namespace gr { } /* namespace ${modname} */ } /* namespace gr */ - ''' # Block definition header file (for include/) @@ -310,7 +308,6 @@ namespace gr { } // namespace gr #endif /* INCLUDED_${modname.upper()}_${blockname.upper()}_H */ - ''' # Python block @@ -425,7 +422,6 @@ class ${blockname}(${parenttype}): out[:] = whatever return len(output_items[0]) % endif - ''' # C++ file for QA (Boost UTF style) @@ -466,7 +462,6 @@ namespace gr { } /* namespace ${modname} */ } /* namespace gr */ - ''' # Header file for QA @@ -496,7 +491,6 @@ namespace gr { } /* namespace gr */ #endif /* _QA_${blockname.upper()}_H_ */ - ''' # Python QA code @@ -704,7 +698,6 @@ ${modname}_${blockname}::work(int noutput_items, return noutput_items; } % endif - ''' # Block definition header file (for include/) @@ -765,5 +758,4 @@ class ${modname.upper()}_API ${modname}_${blockname} : public gr_${grblocktype} % endif #endif /* INCLUDED_${modname.upper()}_${blockname.upper()}_H */ - ''' |