diff options
author | Josh Morman <jmorman@gnuradio.org> | 2021-11-24 12:50:30 -0500 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-11-24 14:41:53 -0500 |
commit | e426b9ad20dbbf41326c103b31a7418a80362b06 (patch) | |
tree | bcc027ecb0ea29088994e4e58f0ae4d4a802d1b0 | |
parent | 0cfb70212d219e8729b7fddb94f393f469665ecd (diff) |
tools: pep8 formatting
Signed-off-by: Josh Morman <jmorman@gnuradio.org>
-rwxr-xr-x | tools/clang_format.py | 17 | ||||
-rwxr-xr-x | tools/template_convert.py | 3 |
2 files changed, 11 insertions, 9 deletions
diff --git a/tools/clang_format.py b/tools/clang_format.py index adf3fe4586..4653aa231a 100755 --- a/tools/clang_format.py +++ b/tools/clang_format.py @@ -126,8 +126,8 @@ class ClangFormat(object): if self.path is None or not os.path.isfile( self.path) or not self._validate_version(): print( - "ERROR:clang-format not found in $PATH, please install clang-format " - + CLANG_FORMAT_VERSION) + "ERROR:clang-format not found in $PATH, please install clang-format " + + CLANG_FORMAT_VERSION) raise NameError("No suitable clang-format found") self.print_lock = threading.Lock() @@ -140,8 +140,8 @@ class ClangFormat(object): return True print( - "WARNING: clang-format found in path, but incorrect version found at " - + self.path + " with version: " + cf_version) + "WARNING: clang-format found in path, but incorrect version found at " + + self.path + " with version: " + cf_version) return False @@ -636,9 +636,9 @@ def _reformat_branch(clang_format, commit_prior_to_reformat, if not repo.is_ancestor(commit_prior_to_reformat, commit_after_reformat): raise ValueError(( - "Commit Prior to Reformat '%s' is not a valid ancestor of Commit After" - + " Reformat '%s' in this repo") % (commit_prior_to_reformat, - commit_after_reformat)) + "Commit Prior to Reformat '%s' is not a valid ancestor of Commit After" + + " Reformat '%s' in this repo") % (commit_prior_to_reformat, + commit_after_reformat)) # Validate the user is on a local branch that has the right merge base if repo.is_detached(): @@ -791,7 +791,8 @@ def parse_args(): "--clang-format", default="clang-format", help="clang-format binary") - subparsers = parser.add_subparsers(help="clang-format action", dest="action") + subparsers = parser.add_subparsers( + help="clang-format action", dest="action") subparsers.required = True lint_parser = subparsers.add_parser( "lint", help="Lint-only (no modifications)") diff --git a/tools/template_convert.py b/tools/template_convert.py index 439d76e922..8f99f1a83d 100755 --- a/tools/template_convert.py +++ b/tools/template_convert.py @@ -12,7 +12,8 @@ template_regex = re.compile( r"(?P<category>\w+)\s+(?P<name>\w+_XX?X?)(_impl)?\s+(?P<types>[\w\s]+)" + r"\)$") cpp_keywords = ["abs", "add", "and", "max", "min" "not" "xor"] -types = {"s": "std::int16_t", "i": "std::int32_t", "b": "std::uint8_t", "c": "gr_complex", "f": "float"} +types = {"s": "std::int16_t", "i": "std::int32_t", + "b": "std::uint8_t", "c": "gr_complex", "f": "float"} def get_real_name(block_definition): |