Skip to content

Commit 74bb0ad

Browse files
committed
python: tools: fix linter issues
1 parent 25207f2 commit 74bb0ad

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

tools/build_wrappers.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env python3
22
import os
33
import subprocess
4-
import sys
54

65
# Structs with no definition in the public header files
76
OPAQUE_STRUCTS = [u'words', u'wally_descriptor']
@@ -338,9 +337,9 @@ def gen_wally_hpp(funcs, all_funcs):
338337
prev = func.args[-3]
339338
impl.append(f' if (ret == WALLY_OK && n != static_cast<size_t>({prev.name}.size())) ret = WALLY_EINVAL;')
340339
if is_verify_function:
341-
impl.append(f' return ret == WALLY_OK;')
340+
impl.append(' return ret == WALLY_OK;')
342341
else:
343-
impl.append(f' return detail::check_ret(__FUNCTION__, ret);')
342+
impl.append(' return detail::check_ret(__FUNCTION__, ret);')
344343
impl.extend([u'}', u''])
345344
(cpp_elements if func.is_elements else cpp)[func.name] = impl
346345

@@ -490,8 +489,10 @@ def map_args(func):
490489

491490
js_args.append(js_arg_type)
492491

493-
if ts_arg_type: ts_args.append(f'{arg.name}: {ts_arg_type}')
494-
if ts_return_type: ts_returns.append(f'{arg.name}: {ts_return_type}')
492+
if ts_arg_type:
493+
ts_args.append(f'{arg.name}: {ts_arg_type}')
494+
if ts_return_type:
495+
ts_returns.append(f'{arg.name}: {ts_return_type}')
495496

496497
continue
497498

tools/wordlist_cc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def as_hex(s):
1717
assert len(words) >= 2
1818
assert len(words) in bits
1919

20-
lengths = [ 0 ];
20+
lengths = [ 0 ]
2121
for w in words:
2222
lengths.append(lengths[-1] + len(w.encode('utf-8')) + 1)
2323
idxs = ['{0}+{1}'.format(string_name, n) for n in lengths]

0 commit comments

Comments
 (0)