Skip to content

Commit 7d8b51f

Browse files
authored
Release 4.12.0 (#694)
1 parent 2665472 commit 7d8b51f

File tree

8 files changed

+103
-63
lines changed

8 files changed

+103
-63
lines changed

docs/releasenotes/4.12.0.rst

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
:orphan:
2+
3+
===============
4+
Robotidy 4.12.0
5+
===============
6+
7+
Several updates and fixes for ``RenameVariables`` and ``OrderSettings`` transformers. We are also dropping support for
8+
Python 3.7 with this update.
9+
10+
You can install the latest available version by running
11+
12+
::
13+
14+
pip install --upgrade robotframework-tidy
15+
16+
or to install exactly this version
17+
18+
::
19+
20+
pip install robotframework-tidy==4.12.0
21+
22+
.. contents::
23+
:depth: 2
24+
:local:
25+
26+
27+
Transformers changes
28+
====================
29+
30+
Ignore variable separator in RenameVariables (#682)
31+
---------------------------------------------------
32+
33+
Added new ``ignore`` mode to ``variable_separator`` parameter. It allows to ignore variable separators when
34+
formatting with ``RenameVariables``::
35+
36+
*** Variables ***
37+
# following variables will have variable separators (spaces and underscores) untouched
38+
${variable with space} value
39+
${mixed_variable and_space} value
40+
41+
Ignoring additional variables in RenameVariables (#692)
42+
-------------------------------------------------------
43+
44+
``RenameVariables`` will now ignore and do not transform following variables:
45+
46+
- ``${None}``
47+
- ``${True}``
48+
- ``${False}``
49+
- numerical values such as ``${0x1A}`` or ``${0b01010}``
50+
51+
[Timeout] and [Setup] order for keywords in OrderSettings (#690)
52+
-----------------------------------------------------------------
53+
54+
Default order of keyword settings in ``OrderSettings`` transformer was modified. Robot Framework 7.0 added ``[Setup]``
55+
to keywords (which wasn't supported by Robotidy until now). ``[Timeout]`` order was also changed.
56+
57+
Old default order was ``documentation,tags,timeout,arguments`` and new order is
58+
``documentation,tags,arguments,timeout,setup``.
59+
60+
``[Timeout]`` order was changed to follow Robot Framework Style Guide recommendation.
61+
62+
If you are using ``OrderSettings`` with custom order, this change requires to add ``setup`` to your order.
63+
64+
Note that if you're using ``[Setup]`` with keywords in your code (supported in RF from 7.0) but run Robotidy with older
65+
version (pre 7.0) it will order ``[Setup]`` like a keyword call - essentially ignoring its order.
66+
67+
Fixes
68+
=====
69+
70+
Handle default default of environment variable in RenameVariables (#677)
71+
------------------------------------------------------------------------
72+
73+
``RenameVariables`` did not handle default value of environment variable correctly. Now following code::
74+
75+
Set Test Variable ${local variable} %{env variable=string message}
76+
Log %{MY_ENV=${global}}
77+
Log %{my env=${global} with extra}
78+
79+
should be transformed to::
80+
81+
Set Test Variable ${local_variable} %{ENV_VARIABLE=string message}
82+
Log %{MY_ENV=${GLOBAL}}
83+
Log %{MY_ENV=${DEFAULT} with extra string}
84+
85+
RenameVariables adding _ to variables with equal sign in Variables section (#692)
86+
---------------------------------------------------------------------------------
87+
88+
Following code::
89+
90+
*** Variables ***
91+
${random_seed} = ${None}
92+
93+
was formatted incorrectly - ``_`` was added before ``=``.
94+
95+
Other features
96+
==============
97+
98+
Deprecated support for 3.7 (#570)
99+
---------------------------------
100+
101+
We dropped support for Python 3.7 as it is reached end of lifecycle. It allowed us to refactor our code to use more
102+
recent Python features like improved typing.

docs/releasenotes/unreleased/fixes.1.rst

Lines changed: 0 additions & 14 deletions
This file was deleted.

docs/releasenotes/unreleased/fixes.2.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/releasenotes/unreleased/other.5.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/releasenotes/unreleased/transformers.1.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/releasenotes/unreleased/transformers.2.rst

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/releasenotes/unreleased/transformers.3.rst

Lines changed: 0 additions & 15 deletions
This file was deleted.

robotidy/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "4.11.0"
1+
__version__ = "4.12.0"

0 commit comments

Comments
 (0)