diff options
| author | Charles Brunet <charles.brunet@optelgroup.com> | 2025-08-01 13:47:46 -0400 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2025-08-26 01:33:42 -0400 |
| commit | 01884547172ff0182e34f4d7212913459210cf09 (patch) | |
| tree | 59118c394688724480a46a3081cbdf43cd954224 /mesonbuild/mformat.py | |
| parent | 70b0de49f67d326379981334b9c0efa234dcf4f2 (diff) | |
| download | meson-01884547172ff0182e34f4d7212913459210cf09.tar.gz | |
mformat: force multiline arguments with comma
Force multiline arguments when there is a trailing comma.
This is the behavior of muon.
Fixes #14721.
Diffstat (limited to 'mesonbuild/mformat.py')
| -rw-r--r-- | mesonbuild/mformat.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/mformat.py b/mesonbuild/mformat.py index de3b7c50a..6b0429b2f 100644 --- a/mesonbuild/mformat.py +++ b/mesonbuild/mformat.py @@ -242,6 +242,10 @@ class MultilineArgumentDetector(FullAstVisitor): if node.is_multiline: self.is_multiline = True + nargs = len(node) + if nargs and nargs == len(node.commas): + self.is_multiline = True + if self.is_multiline: return |
