From a5863477f8fff72f1c5f782e5a7e9d07a46f3b4d Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Thu, 7 Aug 2014 12:34:35 +0300 Subject: [PATCH] Kill end of line whitespace dead. --- build.py | 4 ++-- dependencies.py | 8 ++++---- depfixer.py | 2 +- environment.py | 8 ++++---- interpreter.py | 40 ++++++++++++++++++++-------------------- meson.py | 2 +- meson_test.py | 2 +- mesongui.py | 10 +++++----- mlog.py | 4 ++-- mparser.py | 4 ++-- ninjabackend.py | 4 ++-- 11 files changed, 44 insertions(+), 44 deletions(-) diff --git a/build.py b/build.py index 45dd13795..c0a18ddbd 100644 --- a/build.py +++ b/build.py @@ -466,7 +466,7 @@ class Generator(): if not isinstance(a, str): raise InvalidArguments('A non-string object in "arguments" keyword argument.') self.arglist = args - + if 'output' not in kwargs: raise InvalidArguments('Generator must have "output" keyword argument.') outputs = kwargs['output'] @@ -749,7 +749,7 @@ class ConfigureFile(): def get_sources(self): return self.sources - + def get_subdir(self): return self.subdir diff --git a/dependencies.py b/dependencies.py index 1f9f0d2a4..cb8c976bc 100644 --- a/dependencies.py +++ b/dependencies.py @@ -388,7 +388,7 @@ class GMockDependency(Dependency): else: self.sources = [self.all_src] mlog.log('Dependency GMock found:', mlog.green('YES'), '(building self)') - + else: mlog.log('Dependency GMock found:', mlog.red('NO')) self.is_found = False @@ -611,12 +611,12 @@ why. As a hack filter out everything that is not a flag.""" def found(self): return self.args is not None - + def get_compile_args(self): if self.args is None: return [] return self.args - + def get_link_args(self): return self.libs @@ -629,7 +629,7 @@ class AppleFrameworks(Dependency): if len(modules) == 0: raise DependencyException("AppleFrameworks dependency requires at least one module.") self.frameworks = modules - + def get_link_args(self): args = [] for f in self.frameworks: diff --git a/depfixer.py b/depfixer.py index 3cccfd038..69df8e576 100755 --- a/depfixer.py +++ b/depfixer.py @@ -105,7 +105,7 @@ class Elf(): self.parse_header() self.parse_sections() self.parse_dynamic() - + def detect_elf_type(self): data = self.bf.read(5) if data[1:4] != b'ELF': diff --git a/environment.py b/environment.py index 7072005e1..fd68da41f 100644 --- a/environment.py +++ b/environment.py @@ -1290,7 +1290,7 @@ def find_coverage_tools(): gcovr_exe = 'gcovr' lcov_exe = 'lcov' genhtml_exe = 'genhtml' - + if not exe_exists([gcovr_exe, '--version']): gcovr_exe = None if not exe_exists([lcov_exe, '--version']): @@ -1423,7 +1423,7 @@ class Environment(): def get_script_dir(self): return os.path.dirname(self.meson_script_file) - + def get_log_dir(self): return self.log_dir @@ -1470,7 +1470,7 @@ class Environment(): exe_wrap = None for compiler in compilers: try: - basename = os.path.basename(compiler).lower() + basename = os.path.basename(compiler).lower() if basename == 'cl' or basename == 'cl.exe': arg = '/?' else: @@ -1563,7 +1563,7 @@ class Environment(): is_cross = False exe_wrap = None for compiler in compilers: - basename = os.path.basename(compiler).lower() + basename = os.path.basename(compiler).lower() if basename == 'cl' or basename == 'cl.exe': arg = '/?' else: diff --git a/interpreter.py b/interpreter.py index d226d8679..9e789a454 100644 --- a/interpreter.py +++ b/interpreter.py @@ -48,13 +48,13 @@ class TryRunResultHolder(InterpreterObject): 'stdout' : self.stdout_method, 'stderr' : self.stderr_method, }) - + def returncode_method(self, args, kwargs): return self.res.returncode def compiled_method(self, args, kwargs): return self.res.compiled - + def stdout_method(self, args, kwargs): return self.res.stdout @@ -74,7 +74,7 @@ class RunProcess(InterpreterObject): 'stdout' : self.stdout_method, 'stderr' : self.stderr_method, }) - + def run_command(self, command_array, source_dir, build_dir, subdir, in_builddir): cmd_name = command_array[0] env = {'MESON_SOURCE_ROOT' : source_dir, @@ -202,13 +202,13 @@ class ExternalLibraryHolder(InterpreterObject): def get_name(self): return self.el.name - + def get_compile_args(self): return self.el.get_compile_args() - + def get_link_args(self): return self.el.get_link_args() - + def get_exe_args(self): return self.el.get_exe_args() @@ -264,7 +264,7 @@ class Host(InterpreterObject): if self.environment.is_cross_build(): return self.environment.cross_info.get('name') return platform.system().lower() - + def is_big_endian_method(self, args, kwargs): return sys.byteorder != 'little' @@ -289,7 +289,7 @@ class Headers(InterpreterObject): def get_subdir(self): return self.subdir - + def get_sources(self): return self.sources @@ -399,10 +399,10 @@ class Test(InterpreterObject): self.is_parallel = is_parallel self.cmd_args = cmd_args self.env = env - + def get_exe(self): return self.exe - + def get_name(self): return self.name @@ -492,7 +492,7 @@ class CompilerHolder(InterpreterObject): hadtxt = mlog.green('YES') else: hadtxt = mlog.red('NO') - mlog.log('Checking whether type "', mlog.bold(typename), + mlog.log('Checking whether type "', mlog.bold(typename), '" has member "', mlog.bold(membername), '": ', hadtxt, sep='') return had @@ -578,7 +578,7 @@ class MesonMain(InterpreterObject): scriptbase = args[0] if not isinstance(scriptbase, str): raise InterpreterException('Set_install_script argument is not a string.') - scriptfile = os.path.join(self.interpreter.environment.source_dir, + scriptfile = os.path.join(self.interpreter.environment.source_dir, self.interpreter.subdir, scriptbase) if not os.path.isfile(scriptfile): raise InterpreterException('Can not find install script %s.' % scriptbase) @@ -672,7 +672,7 @@ class Interpreter(): self.subproject_stack = [] def build_func_dict(self): - self.funcs = {'project' : self.func_project, + self.funcs = {'project' : self.func_project, 'message' : self.func_message, 'error' : self.func_error, 'executable': self.func_executable, @@ -796,7 +796,7 @@ class Interpreter(): if wanted != None: if not isinstance(actual, wanted): raise InvalidArguments('Incorrect argument type.') - + def func_run_command(self, node, args, kwargs): if len(args) < 1: raise InterpreterException('Not enough arguments') @@ -1142,7 +1142,7 @@ class Interpreter(): h = Headers(args, kwargs) self.build.headers.append(h) return h - + def func_man(self, node, args, kwargs): for a in args: if not isinstance(a, str): @@ -1150,7 +1150,7 @@ class Interpreter(): m = Man(args, kwargs) self.build.man.append(m) return m - + def func_subdir(self, node, args, kwargs): if len(kwargs) > 0: raise InvalidArguments('subdir command takes no keyword arguments.') @@ -1194,7 +1194,7 @@ class Interpreter(): data = Data(args[0], args[1:], kwargs) self.build.data.append(data) return data - + def func_configure_file(self, node, args, kwargs): if len(args) > 0: raise InterpreterException("configure_file takes only keyword arguments.") @@ -1330,7 +1330,7 @@ class Interpreter(): isinstance(value, list): return True return False - + def assignment(self, node): assert(isinstance(node, mparser.AssignmentNode)) var_name = node.var_name @@ -1434,7 +1434,7 @@ class Interpreter(): raise InvalidArguments('Variable "%s" is not callable.' % object_name) (args, kwargs) = self.reduce_arguments(args) return obj.method_call(method_name, args, kwargs) - + def evaluate_if(self, node): assert(isinstance(node, mparser.IfClauseNode)) for i in node.ifs: @@ -1503,7 +1503,7 @@ class Interpreter(): if not isinstance(r, bool): raise InterpreterException('Second argument to "or" is not a boolean.') return r - + def evaluate_notstatement(self, cur): v = self.evaluate_statement(cur.value) if isinstance(v, mparser.BooleanNode): diff --git a/meson.py b/meson.py index a53ebd675..d2931b6b2 100755 --- a/meson.py +++ b/meson.py @@ -81,7 +81,7 @@ class MesonApp(): raise RuntimeError('--prefix must be an absolute path.') self.meson_script_file = script_file self.options = options - + def has_build_file(self, dirname): fname = os.path.join(dirname, environment.build_filename) return os.path.exists(fname) diff --git a/meson_test.py b/meson_test.py index 8fec226b0..c987da8dd 100755 --- a/meson_test.py +++ b/meson_test.py @@ -57,7 +57,7 @@ def run_single_test(wrap, test): else: if test.is_cross: if test.exe_runner is None: - # Can not run test on cross compiled executable + # Can not run test on cross compiled executable # because there is no execute wrapper. cmd = None else: diff --git a/mesongui.py b/mesongui.py index fb4523145..60dd455b0 100755 --- a/mesongui.py +++ b/mesongui.py @@ -18,7 +18,7 @@ import sys, os, pickle, time, shutil import build, coredata, environment, optinterpreter from PyQt5 import uic from PyQt5.QtWidgets import QApplication, QMainWindow, QHeaderView -from PyQt5.QtWidgets import QComboBox, QCheckBox +from PyQt5.QtWidgets import QComboBox, QCheckBox from PyQt5.QtCore import QAbstractItemModel, QModelIndex, QVariant, QTimer import PyQt5.QtCore import PyQt5.QtWidgets @@ -45,7 +45,7 @@ class PathModel(QAbstractItemModel): if index.isValid(): return 0 return len(self.names) - + def columnCount(self, index): return 2 @@ -111,7 +111,7 @@ class TargetModel(QAbstractItemModel): if index.isValid(): return 0 return len(self.targets) - + def columnCount(self, index): return 4 @@ -164,7 +164,7 @@ class DependencyModel(QAbstractItemModel): if index.isValid(): return 0 return len(self.deps) - + def columnCount(self, index): return 4 @@ -471,7 +471,7 @@ class MesonGui(): def clean(self, foo): self.run_process(['clean']) - + def save(self, foo): pickle.dump(self.coredata, open(self.coredata_file, 'wb')) diff --git a/mlog.py b/mlog.py index 5cac222b7..8af8f7cec 100644 --- a/mlog.py +++ b/mlog.py @@ -29,11 +29,11 @@ def initialize(logdir): class AnsiDecorator(): plain_code = "\033[0m" - + def __init__(self, text, code): self.text = text self.code = code - + def get_text(self, with_codes): if with_codes: return self.code + self.text + AnsiDecorator.plain_code diff --git a/mparser.py b/mparser.py index b80a46d0f..91e30213f 100644 --- a/mparser.py +++ b/mparser.py @@ -30,7 +30,7 @@ class Token: self.lineno = lineno self.colno = colno self.value = value - + def __eq__(self, other): if isinstance(other, str): return self.tid == other @@ -273,7 +273,7 @@ class ArgumentNode(): # comparison, plus and multiplication would go here # 5 negation # 6 funcall, method call -# 7 parentheses +# 7 parentheses # 8 plain token class Parser: diff --git a/ninjabackend.py b/ninjabackend.py index ce996939c..28a4f97f2 100644 --- a/ninjabackend.py +++ b/ninjabackend.py @@ -404,7 +404,7 @@ class NinjaBackend(backends.Backend): def generate_custom_install_script(self, d): d.install_script = self.build.install_script - + def generate_header_install(self, d): incroot = self.environment.get_includedir() @@ -824,7 +824,7 @@ class NinjaBackend(backends.Backend): invoc) description = ' description = Compiling Rust source $in.\n' depfile = ' depfile = $out.d\n' - + depstyle = ' deps = gcc\n' outfile.write(rule) outfile.write(command)