Commit 0a4e2e3
scripts: dts: dtlib: improve formatting of long arrays
Split long arrays into multiple lines to improve readability of the
output DTS file. A new line is started when the array data exceeds
80 characters.
Add a few test entries to verify the new behavior.
Note: the F821 linter suppression prevents flagging 'array_start' and
'array_newline' as undefined variables. This is because these variables
are initialized when an opening brace is output, which is necessarily
before any element in a byte or prop array. A sequence of markers not
following this pattern would indicate a bug in the DTS parsing code.
Signed-off-by: Luca Burelli <[email protected]>1 parent f26a8c0 commit 0a4e2e3
File tree
2 files changed
+14
-0
lines changed- scripts/dts/python-devicetree
- src/devicetree
- tests
2 files changed
+14
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
641 | 641 | | |
642 | 642 | | |
643 | 643 | | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
644 | 647 | | |
645 | 648 | | |
646 | 649 | | |
647 | 650 | | |
648 | 651 | | |
| 652 | + | |
| 653 | + | |
649 | 654 | | |
650 | 655 | | |
651 | 656 | | |
| |||
656 | 661 | | |
657 | 662 | | |
658 | 663 | | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
659 | 667 | | |
660 | 668 | | |
661 | 669 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
| 167 | + | |
166 | 168 | | |
167 | 169 | | |
168 | 170 | | |
| |||
181 | 183 | | |
182 | 184 | | |
183 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
184 | 190 | | |
185 | 191 | | |
186 | 192 | | |
| |||
0 commit comments