Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/releasenotes/3.3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ English language is supported by default.

Fixes
------
* Add missing ``--skip-comments`` option (#418)
* Added missing ``--skip-comments`` option (#418)
* ``CONTINUE`` and ``BREAK`` statements in inline IFs are now intended correctly (#422)

Other
-----
Expand Down
4 changes: 1 addition & 3 deletions robotidy/transformers/NormalizeSeparators.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ def visit_Comment(self, node): # noqa
return self.visit_Statement(node)

def is_keyword_inside_inline_if(self, node):
return self.is_inline and (
isinstance(node, KeywordCall) or ReturnStatement and isinstance(node, ReturnStatement)
)
return self.is_inline and not isinstance(node, InlineIfHeader)

@skip_if_disabled
def visit_Statement(self, statement): # noqa
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Simple IF
IF $condition1 Keyword argument
IF $condition1 RETURN
IF $condition1 CONTINUE
IF $condition BREAK

Nested IF
FOR ${var} IN RANGE 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Simple IF
IF $condition1 Keyword argument
IF $condition1 RETURN
IF $condition1 CONTINUE
IF $condition BREAK

Nested IF
FOR ${var} IN RANGE 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Simple IF
IF $condition1 Keyword argument
IF $condition1 RETURN
IF $condition1 CONTINUE
IF $condition BREAK

Nested IF
FOR ${var} IN RANGE 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
Simple IF
IF $condition1 Keyword argument
IF $condition1 RETURN
IF $condition1 CONTINUE
IF $condition BREAK

Nested IF
FOR ${var} IN RANGE 10
Expand Down