Skip to content

Commit

Permalink
Merge pull request #162 from mesonbuild/lint_errors
Browse files Browse the repository at this point in the history
Fix some bugs when linting code
  • Loading branch information
jpakkane committed Jun 19, 2015
2 parents 74b0fad + bc865ab commit f15eb46
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,7 @@ def is_assignable(self, value):
isinstance(value, str) or\
isinstance(value, int) or \
isinstance(value, list) or \
isinstance(value, File):
isinstance(value, mesonlib.File):
return True
return False

Expand Down
3 changes: 1 addition & 2 deletions mesonconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ def print_conf(self):

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)
Expand Down
2 changes: 1 addition & 1 deletion optinterpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __init__(self, kwargs):

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):
Expand Down
2 changes: 1 addition & 1 deletion run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self, msg, stdo, stde, conftime=0, buildtime=0, testtime=0):

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):
Expand Down
2 changes: 2 additions & 0 deletions xcodebackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import mesonlib
import uuid, os, sys

from coredata import MesonException

class XCodeBackend(backends.Backend):
def __init__(self, build, interp):
super().__init__(build, interp)
Expand Down

0 comments on commit f15eb46

Please sign in to comment.