aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-03-02 09:44:02 -0800
committerDylan Baker <dylan@pnwbakers.com>2020-03-04 12:29:12 -0800
commitf79ac4cefa576c9e1cba76c7610fe947b5cac235 (patch)
tree93c04022fb1f3de5025b3d862cd7c128102bd414
parent74769617907f571d2099001d3a7443e23b4f6cda (diff)
downloadmeson-f79ac4cefa576c9e1cba76c7610fe947b5cac235.zip
meson-f79ac4cefa576c9e1cba76c7610fe947b5cac235.tar.gz
meson-f79ac4cefa576c9e1cba76c7610fe947b5cac235.tar.bz2
mesonlib: Use textwrap.dedent
This is mostly just to help folding editors like vim, which get confused by the non-indented code. It also helps readability, IMHO.
-rw-r--r--mesonbuild/mesonlib.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py
index 2298c86..aa7c37c 100644
--- a/mesonbuild/mesonlib.py
+++ b/mesonbuild/mesonlib.py
@@ -24,6 +24,7 @@ from functools import lru_cache, update_wrapper
from itertools import tee, filterfalse
import typing as T
import uuid
+import textwrap
from mesonbuild import mlog
@@ -109,10 +110,12 @@ def check_direntry_issues(direntry_array):
for de in direntry_array:
if is_ascii_string(de):
continue
- mlog.warning('''You are using {!r} which is not a Unicode-compatible '
-locale but you are trying to access a file system entry called {!r} which is
-not pure ASCII. This may cause problems.
-'''.format(e, de), file=sys.stderr)
+ mlog.warning(textwrap.dedent('''
+ You are using {!r} which is not a Unicode-compatible
+ locale but you are trying to access a file system entry called {!r} which is
+ not pure ASCII. This may cause problems.
+ '''.format(e, de)), file=sys.stderr)
+
# Put this in objects that should not get dumped to pickle files
# by accident.