aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2022-07-08 09:28:22 -0700
committerEli Schwartz <eschwartz93@gmail.com>2023-01-03 14:49:02 -0500
commit3e55891ae7490786308e42b84538caa937deb2e3 (patch)
treea98a0eeabb5f66c77bcd3effe40d8af4b7265bef /mesonbuild
parent2a64ffd1e69dedf32585005931c510397ced86ba (diff)
downloadmeson-3e55891ae7490786308e42b84538caa937deb2e3.zip
meson-3e55891ae7490786308e42b84538caa937deb2e3.tar.gz
meson-3e55891ae7490786308e42b84538caa937deb2e3.tar.bz2
mparser: don't pass a SimpleNamespace where a BaseNode is expected
mypy spotted this as well. And it turns out that we're not setting the column either for the warning, so improvements!
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/mparser.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/mesonbuild/mparser.py b/mesonbuild/mparser.py
index 53a4a89..6b49365 100644
--- a/mesonbuild/mparser.py
+++ b/mesonbuild/mparser.py
@@ -15,7 +15,6 @@
from dataclasses import dataclass
import re
import codecs
-import types
import typing as T
from .mesonlib import MesonException
from . import mlog
@@ -236,7 +235,7 @@ class Lexer:
else:
if match_text in self.future_keywords:
mlog.warning(f"Identifier '{match_text}' will become a reserved keyword in a future release. Please rename it.",
- location=types.SimpleNamespace(filename=filename, lineno=lineno))
+ location=BaseNode(lineno, col, filename))
value = match_text
yield Token(tid, filename, curline_start, curline, col, bytespan, value)
break