summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2023-01-18 14:00:01 -0800
committerDylan Baker <dylan@pnwbakers.com>2023-03-03 11:18:58 -0800
commitaf30cbae8546253cf305f69e7cadecd15faefaa9 (patch)
treed2b911e7bd6cdb910ca454335134843d1e4f8dad
parent424665623d8c30302009e63952c609954fef3a9d (diff)
downloadmeson-af30cbae8546253cf305f69e7cadecd15faefaa9.tar.gz
interpreter: delete unused methods
Neither of these are used anymore, so it's a good time to get rid of them
-rw-r--r--mesonbuild/interpreter/interpreter.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index cc9d6ac8f..f6c76f0c3 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -749,15 +749,6 @@ class Interpreter(InterpreterBase, HoldableObject):
message = printer.result
raise InterpreterException('Assert failed: ' + message)
- def validate_arguments(self, args, argcount, arg_types):
- if argcount is not None:
- if argcount != len(args):
- raise InvalidArguments(f'Expected {argcount} arguments, got {len(args)}.')
- for actual, wanted in zip(args, arg_types):
- if wanted is not None:
- if not isinstance(actual, wanted):
- raise InvalidArguments('Incorrect argument type.')
-
# Executables aren't actually accepted, but we allow them here to allow for
# better error messages when overridden
@typed_pos_args(
@@ -2373,27 +2364,6 @@ class Interpreter(InterpreterBase, HoldableObject):
pass
self.subdir = prev_subdir
- def _get_kwarg_install_mode(self, kwargs: T.Dict[str, T.Any]) -> T.Optional[FileMode]:
- if kwargs.get('install_mode', None) is None:
- return None
- if isinstance(kwargs['install_mode'], FileMode):
- return kwargs['install_mode']
- install_mode: T.List[str] = []
- mode = mesonlib.typeslistify(kwargs.get('install_mode', []), (str, int))
- for m in mode:
- # We skip any arguments that are set to `false`
- if m is False:
- m = None
- install_mode.append(m)
- if len(install_mode) > 3:
- raise InvalidArguments('Keyword argument install_mode takes at '
- 'most 3 arguments.')
- if len(install_mode) > 0 and install_mode[0] is not None and \
- not isinstance(install_mode[0], str):
- raise InvalidArguments('Keyword argument install_mode requires the '
- 'permissions arg to be a string or false')
- return FileMode(*install_mode)
-
# This is either ignored on basically any OS nowadays, or silently gets
# ignored (Solaris) or triggers an "illegal operation" error (FreeBSD).
# It was likely added "because it exists", but should never be used. In