-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvement for splitting settings variables #601
Comments
Thank you for detailed write up! I will analyze it. Some of the issue looks like the issue I already solved for aligning keywords and tests cases sections (for example if the variable is longer than some limit, it should be ignored when calculating common indent for better readability). Some looks like an unexpected behaviour. Your desired output looks like something we should definitely support. |
Also, what about setting fixed_width to bigger value? For example if I use fixed_width=22 I'm getting close:
now what's different is that new line are aligned. it could be solved by adding new skip parameter, ie skip_multi_lines Also, instead of using fixed_width we could add new max_width parameter that would not align anything over limit (ie max_width=30, any variable that is longer than it will be ignored and not used in indent calculations). |
Hello, So we would like tags to be aligned like this:
and keyword arguments like this:
So now depending whether |
I would like to split and intend following lines:
into something like this:
With following configuration: defaults +
I get this:
Readable but lot of empty space. Also
OVER_LONG_LIST
&OVER_LONG_DICT
are not aligned. To minimize that I'll use config:I get:
Now it become difficult to read.
I can manually split the line with long variable but rest of the lines are still quite unreadable:
Removing
AlignVariablesSection:fixed_width
from config readability improves but that manually splitted line become awkward.I guess the reason why indentation is different between different variables (like
OVER_LONG_LIST
&OVER_LONG_DICT
) is that they are formatted withSplitTooLongLine
and other are formatted withAlignVariablesSection
.In my opinion, the formatting (splitting and aliging) should be done by same formatter so the aligning gets done the same way everywhere (mostly referring only to
Settings
andvariables
sections).Other thing to mention.
If those
OVER_LONG_LIST
&OVER_LONG_DICT
are manually splitted then they start to be formatted byAlignVariablesSection
which means that ifAlignVariablesSection:fixed_width
is not set they become:which is not what is wanted.
If
AlignVariablesSection:fixed_width
is set they become:This is what is wanted but then the other variable lines becomes difficult to read.
In fact, also the lines above containing variables (like @{OVER_LONG_LIST} = valuevaluevaluevaluevalue) should be aligned with other lines having variable names.
The text was updated successfully, but these errors were encountered: