Fix various flake8 whitespace reports
$ flake8 | grep -E '(E203|E221|E226|E303|W291|W293)' ./run_unittests.py:1503:5: E303 too many blank lines (2) ./mesonbuild/interpreter.py:2342:64: E226 missing whitespace around arithmetic operator ./mesonbuild/minit.py:110:17: E221 multiple spaces before operator ./mesonbuild/minit.py:131:1: W293 blank line contains whitespace ./mesonbuild/minit.py:135:19: E221 multiple spaces before operator ./mesonbuild/minit.py:155:1: W293 blank line contains whitespace ./mesonbuild/minit.py:181:1: W293 blank line contains whitespace ./mesonbuild/minit.py:183:1: W293 blank line contains whitespace ./mesonbuild/minit.py:294:47: W291 trailing whitespace ./mesonbuild/minit.py:331:47: W291 trailing whitespace ./mesonbuild/modules/unstable_icestorm.py:49:1: W293 blank line contains whitespace ./mesonbuild/modules/unstable_icestorm.py:76:31: E203 whitespace before ':' ./mesonbuild/modules/unstable_icestorm.py:82:22: E203 whitespace before ':'
This commit is contained in:
parent
cd5dba5358
commit
b8b23f4c50
|
@ -2339,7 +2339,7 @@ root and issuing %s.
|
|||
cmds = []
|
||||
command_templ = 'meson wrap promote '
|
||||
for l in found:
|
||||
cmds.append(command_templ + l[len(self.source_root)+1:])
|
||||
cmds.append(command_templ + l[len(self.source_root) + 1:])
|
||||
final_message = message + '\n'.join(cmds)
|
||||
print(final_message)
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ pkg_mod.generate(
|
|||
)
|
||||
'''
|
||||
|
||||
hello_c_template = '''#include <stdio.h>
|
||||
hello_c_template = '''#include <stdio.h>
|
||||
|
||||
#define PROJECT_NAME "{project_name}"
|
||||
|
||||
|
@ -127,11 +127,11 @@ hello_c_meson_template = '''project('{project_name}', 'c',
|
|||
|
||||
exe = executable('{exe_name}', '{source_name}',
|
||||
install : true)
|
||||
|
||||
|
||||
test('basic', exe)
|
||||
'''
|
||||
|
||||
hello_cpp_template = '''#include <iostream>
|
||||
hello_cpp_template = '''#include <iostream>
|
||||
|
||||
#define PROJECT_NAME "{project_name}"
|
||||
|
||||
|
@ -151,7 +151,7 @@ hello_cpp_meson_template = '''project('{project_name}', 'cpp',
|
|||
|
||||
exe = executable('{exe_name}', '{source_name}',
|
||||
install : true)
|
||||
|
||||
|
||||
test('basic', exe)
|
||||
'''
|
||||
|
||||
|
@ -177,9 +177,9 @@ class {utoken}_PUBLIC {class_name} {{
|
|||
public:
|
||||
{class_name}();
|
||||
int get_number() const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
int number;
|
||||
|
||||
}};
|
||||
|
@ -290,7 +290,7 @@ def create_lib_c_sample(project_name, version):
|
|||
'function_name': function_name,
|
||||
'header_file': lib_h_name,
|
||||
'source_file': lib_c_name,
|
||||
'test_source_file': test_c_name,
|
||||
'test_source_file': test_c_name,
|
||||
'test_exe_name': lowercase_token,
|
||||
'project_name': project_name,
|
||||
'lib_name': lowercase_token,
|
||||
|
@ -327,7 +327,7 @@ def create_lib_cpp_sample(project_name, version):
|
|||
'namespace': namespace,
|
||||
'header_file': lib_h_name,
|
||||
'source_file': lib_c_name,
|
||||
'test_source_file': test_c_name,
|
||||
'test_source_file': test_c_name,
|
||||
'test_exe_name': lowercase_token,
|
||||
'project_name': project_name,
|
||||
'lib_name': lowercase_token,
|
||||
|
|
|
@ -46,7 +46,7 @@ class IceStormModule(ExtensionModule):
|
|||
all_sources = interpreter.source_strings_to_files(interpreter.flatten(arg_sources + kwarg_sources))
|
||||
if 'constraint_file' not in kwargs:
|
||||
raise mesonlib.MesonException('Constraint file not specified.')
|
||||
|
||||
|
||||
constraint_file = interpreter.source_strings_to_files(kwargs['constraint_file'])
|
||||
if len(constraint_file) != 1:
|
||||
raise mesonlib.MesonException('Constraint file must contain one and only one entry.')
|
||||
|
@ -73,13 +73,13 @@ class IceStormModule(ExtensionModule):
|
|||
'input': asc_target,
|
||||
'output': bin_fname,
|
||||
'command': [self.icepack_bin, '@INPUT@', '@OUTPUT@'],
|
||||
'build_by_default' : True})
|
||||
'build_by_default': True})
|
||||
|
||||
up_target = interpreter.func_run_target(None, [upload_name], {
|
||||
'command': [self.iceprog_bin, bin_target]})
|
||||
|
||||
time_target = interpreter.func_run_target(None, [time_name], {
|
||||
'command' : [self.icetime_bin, bin_target]})
|
||||
'command': [self.icetime_bin, bin_target]})
|
||||
|
||||
def initialize():
|
||||
return IceStormModule()
|
||||
|
|
|
@ -1498,7 +1498,6 @@ int main(int argc, char **argv) {
|
|||
cmd += ['-c', source, '-o', objectfile] + extra_args
|
||||
subprocess.check_call(cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
|
||||
|
||||
|
||||
def test_prebuilt_object(self):
|
||||
(compiler, _, object_suffix, _) = self.detect_prebuild_env()
|
||||
tdir = os.path.join(self.unit_test_dir, '14 prebuilt object')
|
||||
|
|
Loading…
Reference in New Issue