Added a possibility to ignore variables case in RenameVariables
. Fixed and improved RenameKeywords
.
You can install the latest available version by running:
pip install --upgrade robotframework-tidy
or to install exactly this version:
pip install robotframework-tidy==4.4.0
Case of all variables is converted according to the configured conventions. It is now possible to pass the names of the
variables that should be ignored. By default, only ${\n}
variable is ignored and not transformed.
Configure ignore_case
to set an additional list of variables to be ignored.
This parameter accepts comma-separated list of variable names (case-sensitive):
robotidy -c RenameVariables:ignore_case=true,LOCAL_THAT_SHOULD_BE_UPPER .
${_}
variable was transformed to ${}
. It should be now handled correctly and ignored when formatting the file.
Keywords with spaces and underscores were not capitalized correctly. First letter of each word was repeated.
Following code:
Keyword _with_Problematic_Space_Underscore_Combination
was transformed to:
Keyword With PPoblematic SSace UUderscore CCmbination
It should be now handled correctly.
RenameKeywords
will now correctly replace underscore with space after variables:
Embedded ${variable}_And_Removed_Underscores
will be transformed to:
Embedded ${variable} And Removed Underscores
Previous fix made it possible to capitalize words inside brackets (with capitalize_each_word=True
).
However it also applied to words with numbers and special characters:
*** Test Cases *** Select 3rd Option No Operation With 1200x950 No Operation Open 3-dot Menu No Operation
would be transformed to:
*** Test Cases *** Select 3Rd Option No Operation With 1200X950 No Operation Open 3-Dot Menu No Operation
Now RenameTestCases
should only capitalize words after bracket and exclamation characters: "(", "[", "{", "!", "?".