pyang
pyang copied to clipboard
Add --yang-no-newlines option
- Add output YANG option to not insert newlines after _force_newline_arg
pyang --help:
--yang-no-newlines Don't insert newlines after ('description',
'reference', 'contact', 'organization')
why you need this feature? What are the usage scenarios?
When we work on large YANG models this change can reduce the total number of lines by several hundred when formatting the YANG file with pyang.
A lot of our descriptions have short descriptions so there's no need to split them up into two lines. Example:
`description "VSI ID";`
vs.
description
"VSI ID";
Easier to read and keeps the total number of lines down. This is an optional flag and won't affect the default behavior.