From b30dddd4e5b4ae6e5e1e812085a00a47e3edfcf1 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 26 Jul 2021 14:16:31 -0700 Subject: interpreter/compiler: Add type checking for the Compiler object This adds a full set of `typed_pos_args` and `typed_kwarg` decorations, as well as fixing all of the typing errors reported by mypy. --- unittests/allplatformstests.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'unittests/allplatformstests.py') diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py index b296341..a97ba63 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -1826,13 +1826,8 @@ class AllPlatformTests(BasePlatformTests): def test_permitted_method_kwargs(self): tdir = os.path.join(self.unit_test_dir, '25 non-permitted kwargs') - out = self.init(tdir) - for expected in [ - r'WARNING: Passed invalid keyword argument "prefixxx".', - r'WARNING: Passed invalid keyword argument "argsxx".', - r'WARNING: Passed invalid keyword argument "invalidxx".', - ]: - self.assertRegex(out, re.escape(expected)) + out = self.init(tdir, allow_fail=True) + self.assertIn('Function does not take keyword arguments.', out) def test_templates(self): ninja = mesonbuild.environment.detect_ninja() -- cgit v1.1