fix extra whitespace

discovered via flake8 --select E303
pull/9348/head
Eli Schwartz 3 years ago
parent c582abbbcf
commit 4ab70c5512
No known key found for this signature in database
GPG Key ID: CEB167EFB5722BD6
  1. 1
      mesonbuild/backend/backends.py
  2. 2
      mesonbuild/backend/ninjabackend.py
  3. 4
      mesonbuild/backend/xcodebackend.py
  4. 1
      mesonbuild/compilers/c.py
  5. 1
      mesonbuild/compilers/cpp.py
  6. 3
      mesonbuild/compilers/cuda.py
  7. 3
      mesonbuild/compilers/detect.py
  8. 1
      mesonbuild/compilers/objcpp.py
  9. 1
      mesonbuild/environment.py
  10. 1
      mesonbuild/interpreter/interpreter.py
  11. 1
      mesonbuild/interpreter/mesonmain.py
  12. 1
      mesonbuild/interpreter/primitives/integer.py
  13. 2
      mesonbuild/interpreter/primitives/string.py
  14. 1
      mesonbuild/interpreter/type_checking.py
  15. 1
      mesonbuild/interpreterbase/baseobjects.py
  16. 1
      mesonbuild/interpreterbase/decorators.py
  17. 2
      mesonbuild/mesonlib/universal.py
  18. 1
      mesonbuild/scripts/depscan.py

@ -1347,7 +1347,6 @@ class Backend:
incs += compiler.get_include_args(i, False)
return incs
def eval_custom_target_command(
self, target: build.CustomTarget, absolute_outputs: bool = False) -> \
T.Tuple[T.List[str], T.List[str], T.List[str]]:

@ -2149,7 +2149,6 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
self.add_rule(NinjaRule(rule, command, [], description, deps=deps,
depfile=depfile))
def generate_scanner_rules(self):
rulename = 'depscan'
if rulename in self.ruledict:
@ -2162,7 +2161,6 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
rule = NinjaRule(rulename, command, args, description)
self.add_rule(rule)
def generate_compile_rules(self):
for for_machine in MachineChoice:
clist = self.environment.coredata.compilers[for_machine]

@ -451,7 +451,6 @@ class XCodeBackend(backends.Backend):
self.generator_buildfile_ids[k] = buildfile_ids
self.generator_fileref_ids[k] = fileref_ids
def generate_native_frameworks_map(self):
self.native_frameworks = {}
self.native_frameworks_fileref = {}
@ -1027,7 +1026,6 @@ class XCodeBackend(backends.Backend):
if i:
children_array.add_item(i)
def generate_project_tree(self):
tree_info = FileTreeEntry()
for tname, t in self.build_targets.items():
@ -1275,7 +1273,6 @@ class XCodeBackend(backends.Backend):
gen_dict.add_item('shellScript', cmdstr)
gen_dict.add_item('showEnvVarsInLog', 0)
def generate_pbx_sources_build_phase(self, objects_dict):
for name in self.source_phase:
phase_dict = PbxDict()
@ -1392,7 +1389,6 @@ class XCodeBackend(backends.Backend):
settings_dict.add_item('SYMROOT', '"%s/build"' % self.environment.get_build_dir())
bt_dict.add_item('name', f'"{buildtype}"')
def determine_internal_dep_link_args(self, target, buildtype):
links_dylib = False
dep_libs = []

@ -52,7 +52,6 @@ else:
CompilerMixinBase = object
class CCompiler(CLikeCompiler, Compiler):
@staticmethod

@ -554,7 +554,6 @@ class IntelCPPCompiler(IntelGnuLikeCompiler, CPPCompiler):
c_stds += ['c++2a']
g_stds += ['gnu++2a']
key = OptionKey('std', machine=self.for_machine, lang=self.language)
opts.update({
key.evolve('eh'): coredata.UserComboOption(

@ -356,7 +356,6 @@ class CudaCompiler(Compiler):
xflags.append(flag)
continue
# Handle breakup of flag-values into a flag-part and value-part.
if flag[:1] not in '-/':
# This is not a flag. It's probably a file input. Pass it through.
@ -425,10 +424,8 @@ class CudaCompiler(Compiler):
# The above should securely handle GCC's -Wl, -Wa, -Wp, arguments.
continue
assert val is not None # Should only trip if there is a missing argument.
# Take care of the various NVCC-supported flags that need special handling.
flag = self._FLAG_LONG2SHORT_WITHARGS.get(flag,flag)

@ -144,7 +144,6 @@ if T.TYPE_CHECKING:
from ..programs import ExternalProgram
# Default compilers and linkers
# =============================
@ -340,7 +339,6 @@ def detect_static_linker(env: 'Environment', compiler: Compiler) -> StaticLinker
_handle_exceptions(popen_exceptions, linkers, 'linker')
# Compilers
# =========
@ -618,7 +616,6 @@ def _detect_c_or_cpp_compiler(env: 'Environment', lang: str, for_machine: Machin
ccache + compiler, version, for_machine, is_cross, info,
exe_wrap, full_version=full_version, linker=linker)
_handle_exceptions(popen_exceptions, compilers)
raise EnvironmentException(f'Unknown compiler {compilers}')

@ -85,7 +85,6 @@ class ClangObjCPPCompiler(ClangCompiler, ObjCPPCompiler):
'2': default_warn_args + ['-Wextra'],
'3': default_warn_args + ['-Wextra', '-Wpedantic']}
def get_options(self) -> 'coredata.KeyedOptionDictType':
opts = super().get_options()
opts.update({

@ -545,7 +545,6 @@ class Environment:
self.options[key.as_build()] = value
self._load_machine_file_options(config, properties.host, MachineChoice.HOST)
## "freeze" now initialized configuration, and "save" to the class.
self.machines = machines.default_missing()

@ -2512,7 +2512,6 @@ Try setting b_lundef to false instead.'''.format(self.coredata.options[OptionKey
if project_root / self.subproject_dir in norm.parents:
raise InterpreterException(f'Sandbox violation: Tried to grab {inputtype} {norm.name} from a nested subproject.')
@T.overload
def source_strings_to_files(self, sources: T.List['mesonlib.FileOrString']) -> T.List['mesonlib.File']: ...

@ -435,7 +435,6 @@ class MesonMain(MesonInterpreterObject):
propname, fallback = args
return self.__get_external_property_impl(propname, fallback, kwargs['native'])
@FeatureNew('meson.has_external_property', '0.58.0')
@typed_pos_args('meson.has_external_property', str)
@typed_kwargs('meson.has_external_property', NATIVE_KW)

@ -29,7 +29,6 @@ class IntegerHolder(ObjectHolder[int]):
'to_string': self.to_string_method,
})
self.trivial_operators.update({
# Arithmetic
MesonOperator.UMINUS: (None, lambda x: -self.held_object),

@ -52,7 +52,6 @@ class StringHolder(ObjectHolder[str]):
'version_compare': self.version_compare_method,
})
self.trivial_operators.update({
# Arithmetic
MesonOperator.PLUS: (str, lambda x: self.held_object + x),
@ -169,7 +168,6 @@ class StringHolder(ObjectHolder[str]):
def version_compare_method(self, args: T.Tuple[str], kwargs: TYPE_kwargs) -> bool:
return version_compare(self.held_object, args[0])
@FeatureNew('/ with string arguments', '0.49.0')
@typed_operator(MesonOperator.DIV, str)
def op_div(self, other: str) -> str:

@ -157,7 +157,6 @@ def _env_validator(value: T.Union[EnvironmentVariables, T.List['TYPE_var'], T.Di
return None
def split_equal_string(input: str) -> T.Tuple[str, str]:
"""Split a string in the form `x=y`

@ -100,7 +100,6 @@ class InterpreterObject:
return self.operators[operator](other)
raise InvalidCode(f'Object {self} of type {self.display_name()} does not support the `{operator.value}` operator.')
# Default comparison operator support
def _throw_comp_exception(self, other: TYPE_var, opt_type: str) -> T.NoReturn:
raise InvalidArguments(textwrap.dedent(

@ -426,7 +426,6 @@ class KwargInfo(T.Generic[_T]):
)
def typed_kwargs(name: str, *types: KwargInfo) -> T.Callable[..., T.Any]:
"""Decorator for type checking keyword arguments.

@ -586,7 +586,6 @@ class PerMachineDefaultable(PerMachine[T.Optional[_T]]):
return m.default_missing()
class PerThreeMachineDefaultable(PerMachineDefaultable, PerThreeMachine[T.Optional[_T]]):
"""Extends `PerThreeMachine` with the ability to default from `None`s.
"""
@ -1299,7 +1298,6 @@ def replace_if_different(dst: str, dst_tmp: str) -> None:
os.unlink(dst_tmp)
def listify(item: T.Any, flatten: bool = True) -> T.List[T.Any]:
'''
Returns a list with all args embedded in a list if they are not a list.

@ -106,7 +106,6 @@ class DependencyScanner:
else:
self.needs[fname] = [parent_module_name_full]
def scan_cpp_file(self, fname: str) -> None:
fpath = pathlib.Path(fname)
for line in fpath.read_text(encoding='utf-8').split('\n'):

Loading…
Cancel
Save