Indentation issues

This commit is contained in:
Thomas Nagy 2015-09-22 07:08:21 +02:00
parent 9625343f91
commit f9f5e85616
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64
1 changed files with 14 additions and 14 deletions

View File

@ -328,8 +328,8 @@ def get_compiler_env(conf, compiler, version, bat_target, bat, select=None):
"""
Gets the compiler environment variables as a tuple. Evaluation is eager by default.
If set to lazy with ``--msvc_lazy_autodetect`` or ``env.MSVC_LAZY_AUTODETECT``
the environment is evaluated when the tuple is destructured or iterated. This means
destructuring can throw :py:class:`conf.errors.ConfigurationError`.
the environment is evaluated when the tuple is destructured or iterated. This means
destructuring can throw :py:class:`conf.errors.ConfigurationError`.
:param conf: configuration context to use to eventually get the version environment
:param compiler: compiler name
@ -350,26 +350,26 @@ def get_compiler_env(conf, compiler, version, bat_target, bat, select=None):
class lazytup(object):
"""
A tuple that evaluates its elements from a function when iterated or destructured.
:param fn: thunk to evaluate the tuple on demand
:param lazy: whether to delay evaluation or evaluate in the constructor
:param default: optional default for :py:func:`repr` if it should not evaluate
"""
def __init__(self, fn, lazy=True, default=None):
def __init__(self, fn, lazy=True, default=None):
self.fn = fn
self.default = default
if not lazy:
self.evaluate()
def __len__(self):
def __len__(self):
self.evaluate()
return len(self.value)
def __iter__(self):
return len(self.value)
def __iter__(self):
self.evaluate()
for i, v in enumerate(self.value):
yield v
def __getitem__(self, i):
for i, v in enumerate(self.value):
yield v
def __getitem__(self, i):
self.evaluate()
return self.value[i]
return self.value[i]
def __repr__(self):
if hasattr(self, 'value'):
return repr(self.value)
@ -594,9 +594,9 @@ def gather_intel_composer_versions(conf, versions):
if (r'if exist "%VS110COMNTOOLS%..\IDE\VSWinExpress.exe"' in Utils.readf(compilervars_arch) and
not os.path.exists(vs_express_path) and not os.path.exists(dev_env_path)):
Logs.warn(('The Intel compilervar_arch.bat only checks for one Visual Studio SKU '
'(VSWinExpress.exe) but it does not seem to be installed at %r. '
'The intel command line set up will fail to configure unless the file %r'
'is patched. See: %s') % (vs_express_path, compilervars_arch, patch_url))
'(VSWinExpress.exe) but it does not seem to be installed at %r. '
'The intel command line set up will fail to configure unless the file %r'
'is patched. See: %s') % (vs_express_path, compilervars_arch, patch_url))
except WindowsError:
pass
major = version[0:2]