diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index ca4c99def..055f882f4 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -77,7 +77,6 @@ jobs: - name: Setup environment run: | sudo dnf install -y sdl12-compat python3-wxpython4 xorg-x11-server-Xvfb python3-pip psmisc - sudo -H pip install wheel https://extras.wxpython.org/wxPython4/extras/linux/gtk3/fedora-38/wxPython-4.2.1-cp311-cp311-linux_x86_64.whl sudo -H pip install -r requirements-dev.txt - name: Run tests run: | diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 36df5c64f..429a1a7f4 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -6,7 +6,12 @@ All notable changes to this project will be documented in this file. The format is based on http://keepachangelog.com/en/1.0.0/[Keep a Changelog] and this project adheres to http://semver.org/spec/v2.0.0.html[Semantic Versioning]. -// == https://github.com/robotframework/RIDE[Unreleased] +== https://github.com/robotframework/RIDE[Unreleased] + +=== Fixed + +- Fixed New User Keyword dialog not allowing empty Arguments field + == https://github.com/robotframework/RIDE/blob/master/doc/releasenotes/ride-2.0.8.1.rst[2.0.8.1] - 2023-11-01 diff --git a/src/robotide/application/CHANGELOG.html b/src/robotide/application/CHANGELOG.html index cf7ce3367..4dc2f9003 100644 --- a/src/robotide/application/CHANGELOG.html +++ b/src/robotide/application/CHANGELOG.html @@ -1,6 +1,8 @@ Changelog

Changelog


All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog -and this project adheres to Semantic Versioning.

1. 2.0.8.1 - 2023-11-01

1.1. Added

  • +and this project adheres to Semantic Versioning.

    1.1. Fixed

    • +Fixed New User Keyword dialog not allowing empty Arguments field +

    2. 2.0.8.1 - 2023-11-01

    2.1. Added

    • Added auto update check when development version is installed
    • Added menu option ``Help→Check for Upgrade`` which allows to force update check and install development version @@ -19,7 +21,7 @@ Added variables creation shortcuts (``Ctrl-1,2,5``) to fields Arguments in Grid Editor
    • Added support for JSON variables, by using the installed Robot Framework import method -

    1.2. Fixed

    • +

    2.2. Fixed

    • Fixed escaped spaces showing in Text Editor on commented cells
    • Fixed resource files dissapearing from Project tree on Windows @@ -37,7 +39,7 @@ Position of cursor in Text Editor auto-suggestions when line contains multibyte characters
    • Drag and drop of variables defined with comments between resource files -

    1.3. Changed

    • +

    2.3. Changed

    • Improved keywords documentation search, by adding current dir to search
    • Improved Move up/down, ``Alt-UpArrow``/``Alt-DownArrow`` in Text Editor, to have proper indentation and selection @@ -53,14 +55,14 @@ Improved keyword ``Find Usages`` to return more matches. Fails to find mixed spaces and ``_``
    • In Grid Editor ``Ctrl-Shift-4`` now replaces escaped spaces ``\\ `` by spaces -

    1.4. Removed

    -

    2. 2.0.7 - 2023-08-13

    2.1. Added

    • +

    2.4. Removed

    -

    3. 2.0.7 - 2023-08-13

    3.1. Added

    • Added indication of matching brackets, ``()``, ``{}``, ``[]``, in Text Editor
    • Added context menu to RIDE tray icon. Options Show, Hide and Close
    • Added sincronization with Project Explorer to navigate to selected item, Test Case, Keyword, Variable, in Text Editor Note: This feature is working fine in Fedora 38, but not on Windows and macOS. -

    2.2. Fixed

    • +

    3.2. Fixed

    • Fixed non syncronized expanding/collapse of Settings panel in Grid Editor, on Linux
    • Fixed not working the deletion of cells commented with ``\# `` in Grid Editor with ``Ctrl-Shift-D`` @@ -74,17 +76,17 @@ Fixed title of User Keyword in Grid Editor always showing ``Find Usages`` instead of the keyword name
    • Fixed renaming keywords when they were arguments of ``Run Keywords`` in Setups and Teardowns -

    2.3. Changed

    • +

    3.3. Changed

    • Improve Text Editor auto-suggestions to keep libraries prefixes. -

    3. 2.0.6 - 2023-06-10

    3.1. Added

    • +

    4. 2.0.6 - 2023-06-10

    4.1. Added

    • Added boolean parameter ``filter newlines`` to Grid Editor with default ``True``, to hide or show newlines in cells -

    3.2. Changed

    • +

    4.2. Changed

    • Changed ``tasks.py`` to test ``utest/application/test_app_main.py`` isolated from the other tests
    • Improve auto-suggestions of keywords in Grid Editor by allowing to close suggestions list with keys ARROW_LEFT or ARROW_RIGHT
    • Improve Text Editor auto-suggestions by using: selected text, text at left or at right of cursor -

    4. 2.0.5 - 2023-05-08

    4.1. Added

    • +

    5. 2.0.5 - 2023-05-08

    5.1. Added

    • Added ``FOR`` scope markers (``IN``, ``IN RANGE``, ``IN ENUMERATE``, ``IN ZIP``) to auto-complete list
    • Added support to read environment variable ``ROBOT_VERSION`` to apply some conditions. @@ -92,15 +94,15 @@ Added note on Test Timeout that timeout message is not supported since Robot v3.0.1
    • Added the note, Colors will be active after next RIDE restart. to the Preferences of Test Runner. -

    4.2. Changed

    • +

    5.2. Changed

    • Changed alias marker on library imports to consider variable ``ROBOT_VERSION``. If version is lower than 6.0, uses ``WITH NAME``, otherwise will use ``AS`` -

    5. Fixed

    • +

6. Fixed

  • Fixed auto-indent on block commands in Text Editor -

6. 2.0.3 - 2023-04-16

6.1. Changed

  • +

7. 2.0.3 - 2023-04-16

7.1. Changed

  • Allow to do auto-suggestions of keywords in grid editor without a shortcut, if you want to enable or disable this feature you can config in Preferences -> Grid Editor -> Enable auto suggestions
  • Made ``\\n`` visible when editing cells in Grid Editor (problematic in Windows) -

7. Fixed

  • +

8. Fixed

  • Fixed missing auto-enclosing when in Cell Editor in Linux
  • Fixed RIDE will crash when using third party input method in Mac OS @@ -114,7 +116,7 @@ Fixed not using defined color for help and HTML content
  • Fixed missing newlines in sections separation -

8. 2.0 - 2023-03-01

8.1. Added

  (2.0rc1 - 2023-02-26)
+

9. 2.0 - 2023-03-01

9.1. Added

  (2.0rc1 - 2023-02-26)
 - Minimal support to accept `*** Comments ***` sections (unfinished code)
 - Added insert and delete cells to Text Editor, by using ``Ctrl-Shift-I`` and ``Ctrl-Shift-D``
 - Added move up and move down rows to Text Editor, by using ``Alt-Up`` and ``Alt-Down``
@@ -167,13 +169,13 @@
 - Added enclosing text in Text Editor or selected text with certain symbols
 - Added enclosing text in Grid Editor or selected text with certain symbols
 - Added 8s timer to shortcut creation dialog on install
-- Added process memory limit on Messages Log

8.2. Removed

  (2.0b2 - 2022-09-05)
+- Added process memory limit on Messages Log

9.2. Removed

  (2.0b2 - 2022-09-05)
 - Removed ``robotframeworklexer`` dependency and local copy
 - Removed alignment flag on grid cell JSON Editor (Ctrl-Shift-J)
 - Removed moving to keyword/variable definition when doing Double-Click in grid cell
   (2.0b1 - 2020-07-26)
 - Python 2.7 support
-- wxPython/wxPhoenix version conditioning

8.3. Changed

  (2.0b3 - 2023-01-15)
+- wxPython/wxPhoenix version conditioning

9.3. Changed

  (2.0b3 - 2023-01-15)
 - Hiding items in Test Suites explorer with names starting with #
 - Disabled the Close button on the Test Suites explorer
   This was causing not being possible to restore it, unless editing the settings.cfg file.
@@ -202,7 +204,7 @@
 - Changed icon background to white
 - Made Project Tree and File Explorer panels, Plugins.
 - wx.NewId() to wx.NewIdRef()
-- Separated AppendText for Messages Log

8.4. Fixed

  (2.0rc1 - 2023-02-26)
+- Separated AppendText for Messages Log

9.4. Fixed

  (2.0rc1 - 2023-02-26)
 - Fixed blank Grid Editor at keywords with steps commented with ``\# ``, by using ``Ctrl-Shift-3 on Text Editor
   (2.0b3 - 2023-01-15)
 . Fixed low performance when opening large projects
@@ -276,7 +278,7 @@
 - Fixed Settings editor
 - Fixed blank Edit screen
 - Fixed Runner arguments parsing
-- Fixed Runner Log window Chinese and Latin encoding chars on Windows

9. 2.0rc1 - 2023-02-26

9.1. Added

  • +- Fixed Runner Log window Chinese and Latin encoding chars on Windows

10. 2.0rc1 - 2023-02-26

10.1. Added

  • Minimal support to accept *** Comments *** sections (unfinished code)
  • Added insert and delete cells to Text Editor, by using ``Ctrl-Shift-I`` and ``Ctrl-Shift-D`` @@ -284,30 +286,30 @@ Added move up and move down rows to Text Editor, by using ``Alt-Up`` and ``Alt-Down``
  • Added insert and delete rows to Text Editor, by using ``Ctrl-I`` and ``Ctrl-D`` -

9.2. Removed

9.3. Changed

9.4. Fixed

  • +

10.2. Removed

10.3. Changed

10.4. Fixed

  • Fixed blank Grid Editor at keywords with steps commented with ``\# ``, by using ``Ctrl-Shift-3 on Text Editor -

10. 2.0b3 - 2023-01-15

10.1. Added

  • +

11. 2.0b3 - 2023-01-15

11.1. Added

  • Added swap row up, by using ``Ctrl-T``
  • Added commenting/uncommenting of content with ``\# ``, by using ``Ctrl-Shift-3`` and ``Ctrl-Shift-4``
  • Added support for editing .robot and .resource files with content before sections -

10.2. Removed

  • +

11.2. Removed

  • None -

10.3. Changed

  • +

11.3. Changed

  • Hiding items in Test Suites explorer with names starting with #
  • Disabled the Close button on the Test Suites explorer This was causing not being possible to restore it, unless editing the settings.cfg file. Other reason was to prevent user to closing it, after detaching the panel, and re-attaching, which has a bug making the Tree not visible. -

10.4. Fixed

  1. +

11.4. Fixed

  1. Fixed low performance when opening large projects

    • Fixed comment and uncomment in Grid Editor when cells contain more than one variables assignement
    • Fixed console log stopping to output certain characters, like chinese and latin -

11. 2.0b2 - 2022-09-05

11.1. Added

  • +

12. 2.0b2 - 2022-09-05

12.1. Added

  • Added menu entry at Help → Offline Change Log to view this file on disk
  • Added skipped tests counter and corresponding colored icon on Project tree @@ -375,13 +377,13 @@ When editing, Ctrl-Home and Ctrl-End move cursor to start and end of cell content respectively.
  • Added Del key to clear Grid Editor cell content when in navigation mode (clear like doing Ctrl-X) -
  • 11.2. Removed

    • +

    12.2. Removed

    • Removed ``robotframeworklexer`` dependency and local copy
    • Removed alignment flag on grid cell JSON Editor (Ctrl-Shift-J)
    • Removed moving to keyword/variable definition when doing Double-Click in grid cell -

    11.3. Changed

    • +

    12.3. Changed

    • Unit tests to use ``pytest`` and removed ``nose`` dependency. Support for Python 3.10 at unit test level.
    • Prevent expanding Tests and change selection on Project tree (when right-clicking) @@ -411,7 +413,7 @@ Changed Enter button in navigation mode to start editing cell, and to move to right cell when in edit mode
    • Performance improvements for loading large test suites -

    11.4. Fixed

    • +

    12.4. Fixed

    • Fixed missing menu icons on Linux (was working on Windows)
    • Fixed removal of animation in Project tree when test run is interrupted @@ -484,7 +486,7 @@ Fixed RIDE startup crash when Tree or File Explorer plugins use opened=False setting
    • Fixed error occurring when deleting test cases on Tree -

    12. 2.0b1 - 2020-07-26

    12.1. Added

    • +

    13. 2.0b1 - 2020-07-26

    13.1. Added

    • Added CHANGELOG.adoc
    • Added ignoring log.html and report.html on reporting HTML test suites @@ -502,11 +504,11 @@ Added 8s timer to shortcut creation dialog on install
    • Added process memory limit on Messages Log -

    12.2. Removed

    • +

    13.2. Removed

    • Python 2.7 support
    • wxPython/wxPhoenix version conditioning -

    12.3. Changed

    • +

    13.3. Changed

    • Improved filesystem changes detection, with a confirmation dialog to reload workspace
    • Changed dependency on wx.Window on tree panel @@ -520,7 +522,7 @@ wx.NewId() to wx.NewIdRef()
    • Separated AppendText for Messages Log -

    12.4. Fixed

    • +

    13.4. Fixed

    • Fixed editing cells in Grid Editor on wxPython 4.1
    • Fixed not saving file after deleting text in Text Editor @@ -580,12 +582,12 @@ Fixed Runner arguments parsing
    • Fixed Runner Log window Chinese and Latin encoding chars on Windows -

    13. 1.7.4.2 - 2020-01-20

    13.1. Added

    • +

    14. 1.7.4.2 - 2020-01-20

    14.1. Added

    • wxPython version locked up to 4.0.7.post2. -

    13.2. Removed

    • +

    14.2. Removed

    • None -

    13.3. Changed

    • +

    14.3. Changed

    • None -

    13.4. Fixed

    • +

    14.4. Fixed

    • None
    diff --git a/src/robotide/application/releasenotes.py b/src/robotide/application/releasenotes.py index 391d83e3b..1889e2915 100644 --- a/src/robotide/application/releasenotes.py +++ b/src/robotide/application/releasenotes.py @@ -168,6 +168,7 @@ def set_content(self, html_win, content):

    New Features and Fixes Highlights

    """ diff --git a/src/robotide/validators/__init__.py b/src/robotide/validators/__init__.py index e64b628b2..b485d38db 100644 --- a/src/robotide/validators/__init__.py +++ b/src/robotide/validators/__init__.py @@ -110,27 +110,28 @@ def _get_type(arg): @staticmethod def _validate_argument_order(types): - prev = types[0] - active_named_only = False - dict_in_list = False - for idx, t in enumerate(types): - if prev == ArgumentTypes.DICT: - dict_in_list = True - if t == ArgumentTypes.NAMED: - active_named_only = True - prev = ArgumentTypes.DEFAULT # Force max value - continue - if idx == len(types)-1: - if t in [ArgumentTypes.LIST, ArgumentTypes.DICT] and not dict_in_list: - return None - elif t == ArgumentTypes.LIST and dict_in_list: - return "Only last argument can be kwargs (dictionary argument)." - if t < prev: - if ((not active_named_only and t not in [ArgumentTypes.LIST, ArgumentTypes.DICT]) - or (active_named_only and t in [ArgumentTypes.LIST, ArgumentTypes.DICT])): - return ("List and scalar arguments must be before named and " - "dictionary arguments") - prev = t + if types: + prev = types[0] + active_named_only = False + dict_in_list = False + for idx, t in enumerate(types): + if prev == ArgumentTypes.DICT: + dict_in_list = True + if t == ArgumentTypes.NAMED: + active_named_only = True + prev = ArgumentTypes.DEFAULT # Force max value + continue + if idx == len(types)-1: + if t in [ArgumentTypes.LIST, ArgumentTypes.DICT] and not dict_in_list: + return None + elif t == ArgumentTypes.LIST and dict_in_list: + return "Only last argument can be kwargs (dictionary argument)." + if t < prev: + if ((not active_named_only and t not in [ArgumentTypes.LIST, ArgumentTypes.DICT]) + or (active_named_only and t in [ArgumentTypes.LIST, ArgumentTypes.DICT])): + return ("List and scalar arguments must be before named and " + "dictionary arguments") + prev = t return None diff --git a/src/robotide/version.py b/src/robotide/version.py index bcfddf1f8..ce5cbb2bb 100644 --- a/src/robotide/version.py +++ b/src/robotide/version.py @@ -14,4 +14,4 @@ # limitations under the License. # # Automatically generated by `tasks.py`. -VERSION = 'v2.0.8.1' +VERSION = 'v2.0.9dev1' diff --git a/utest/validators/test_arguments_validation.py b/utest/validators/test_arguments_validation.py index 1e3f08b20..5343b0f58 100644 --- a/utest/validators/test_arguments_validation.py +++ b/utest/validators/test_arguments_validation.py @@ -64,6 +64,14 @@ def test_req_arg_after_defaults(self): for arg in ["${a}=default | ${a2}", "${a} | ${b}=default | ${c}"]: assert self.validate(arg) == self.validation_error + def test_empty_argument_validation(self): + arg = "" + assert self.validate(arg) is None + arg = None + assert self.validate(arg) is None + arg = [] + assert self.validate(arg) is None + if __name__ == '__main__': unittest.main()