From b2ddda701387751d84013aaf85e02669672b2a14 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Tue, 14 Sep 2021 02:18:26 -0400 Subject: [PATCH] fix incorrect porting from % formatting to .format method (var,) is the correct way to pass values to a percent formatted string, but not to .format so we would end up printing something like: unexpected input at line (4,) Upgrade to an f-string and insert the correct value correctly. --- mesonbuild/mtest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/mtest.py b/mesonbuild/mtest.py index f877ec8ec..36c4da982 100644 --- a/mesonbuild/mtest.py +++ b/mesonbuild/mtest.py @@ -430,7 +430,7 @@ class TAPParser: if not line: return - yield self.Error('unexpected input at line {}'.format((self.lineno,))) + yield self.Error(f'unexpected input at line {self.lineno}') else: # end of file if self.state == self._YAML: