diff options
author | Jehan <jehan@girinstud.io> | 2017-07-01 22:07:36 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-07-02 10:08:08 -0400 |
commit | 2f691410fc4a6c35ff69efa3644610e37dccda2a (patch) | |
tree | 7af18b524d69f572be250914391fd33ce941a920 | |
parent | d80787ae28af58dcce3cbdb086b80677c5c00389 (diff) | |
download | meson-2f691410fc4a6c35ff69efa3644610e37dccda2a.zip meson-2f691410fc4a6c35ff69efa3644610e37dccda2a.tar.gz meson-2f691410fc4a6c35ff69efa3644610e37dccda2a.tar.bz2 |
Improve "Passed invalid keyword argument" warning.
I got this warning on a build:
> WARNING: Passed invalid keyword argument preset. This will become a hard error in the future.
I had to grep in meson code to understand that "preset" was the name of
the invalid argument. This is not obvious at all depending on the
argument name (here it looked like it was about argument presets).
Let's make it clearer by putting it in quotes.
-rw-r--r-- | mesonbuild/interpreterbase.py | 2 | ||||
-rw-r--r-- | mesonbuild/modules/__init__.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/interpreterbase.py b/mesonbuild/interpreterbase.py index d44f71b..1f7664e 100644 --- a/mesonbuild/interpreterbase.py +++ b/mesonbuild/interpreterbase.py @@ -64,7 +64,7 @@ class permittedKwargs: def wrapped(s, node, args, kwargs): for k in kwargs: if k not in self.permitted: - mlog.warning('Passed invalid keyword argument %s. This will become a hard error in the future.' % k) + mlog.warning('Passed invalid keyword argument "%s". This will become a hard error in the future.' % k) return f(s, node, args, kwargs) return wrapped diff --git a/mesonbuild/modules/__init__.py b/mesonbuild/modules/__init__.py index 9d75525..8b5b210 100644 --- a/mesonbuild/modules/__init__.py +++ b/mesonbuild/modules/__init__.py @@ -15,7 +15,7 @@ class permittedSnippetKwargs: def wrapped(s, interpreter, state, args, kwargs): for k in kwargs: if k not in self.permitted: - mlog.warning('Passed invalid keyword argument %s. This will become a hard error in the future.' % k) + mlog.warning('Passed invalid keyword argument "%s". This will become a hard error in the future.' % k) return f(s, interpreter, state, args, kwargs) return wrapped |