summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/clang_format.py17
-rwxr-xr-xtools/template_convert.py3
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):