Merge pull request #162 from mesonbuild/lint_errors

Fix some bugs when linting code
pull/166/head
jpakkane 10 years ago
commit f15eb466fb
  1. 2
      interpreter.py
  2. 3
      mesonconf.py
  3. 2
      optinterpreter.py
  4. 2
      run_tests.py
  5. 2
      xcodebackend.py

@ -1681,7 +1681,7 @@ class Interpreter():
isinstance(value, str) or\
isinstance(value, int) or \
isinstance(value, list) or \
isinstance(value, File):
isinstance(value, mesonlib.File):
return True
return False

@ -198,8 +198,7 @@ class Conf:
if __name__ == '__main__':
options = parser.parse_args()
if len(options.directory) > 1:
print(args)
if len(options.directory) < 1:
print('%s <build directory>' % sys.argv[0])
print('If you omit the build directory, the current directory is substituted.')
sys.exit(1)

@ -61,7 +61,7 @@ class UserBooleanOption(UserOption):
def set_value(self, newvalue):
if not isinstance(newvalue, bool):
raise OptionException('Value "%s" for boolean option "%s" is not a boolean.' % (valuestring, self.name))
raise OptionException('Value "%s" for boolean option "%s" is not a boolean.' % (str(newvalue), self.name))
self.value = newvalue
def parse_string(self, valuestring):

@ -48,7 +48,7 @@ meson_command = './meson.py'
class StopException(Exception):
def __init__(self):
super(Exception, self).__init__('Stopped by user')
super().__init__('Stopped by user')
stop = False
def stop_handler(signal, frame):

@ -16,6 +16,8 @@ import backends, build
import mesonlib
import uuid, os, sys
from coredata import MesonException
class XCodeBackend(backends.Backend):
def __init__(self, build, interp):
super().__init__(build, interp)

Loading…
Cancel
Save