From 5cefc2a764631f49438e9c549d5bd49611eb927c Mon Sep 17 00:00:00 2001 From: Tatu Aalto Date: Fri, 2 Aug 2024 11:55:25 +0300 Subject: [PATCH 1/4] Ruff update and lint fixes --- requirements-dev.txt | 2 +- src/robotlibcore/core/hybrid.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 7d36f77..4858cc4 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -3,7 +3,7 @@ pytest-cov pytest-mockito robotstatuschecker black >= 23.7.0 -ruff >= 0.0.286 +ruff >= 0.5.5 robotframework-tidy invoke >= 2.2.0 twine diff --git a/src/robotlibcore/core/hybrid.py b/src/robotlibcore/core/hybrid.py index f70f659..cb0cc6c 100644 --- a/src/robotlibcore/core/hybrid.py +++ b/src/robotlibcore/core/hybrid.py @@ -88,7 +88,7 @@ def __get_members(self, component): raise TypeError( msg, ) - if type(component) != component.__class__: + if type(component) is component.__class__: msg = ( "Libraries must be modules or new-style class instances, " f"got old-style class {component.__class__.__name__} instead." From 090736677cc75164a7c50cafb201d32e3c19fbf1 Mon Sep 17 00:00:00 2001 From: Tatu Aalto Date: Fri, 2 Aug 2024 11:52:29 +0300 Subject: [PATCH 2/4] Use uv to install deps --- .github/workflows/CI.yml | 9 +++++---- requirements-dev.txt | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2577265..11f54d7 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -14,8 +14,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8, 3.11.1] - rf-version: [5.0.1, 7.0.0] + python-version: [3.8, 3.12] + rf-version: [5.0.1, 7.0.1] steps: - uses: actions/checkout@v4 @@ -26,10 +26,11 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements-dev.txt + pip install uv + uv pip install -r requirements-dev.txt --python ${{ matrix.python-version }} --system - name: Install RF ${{ matrix.rf-version }} run: | - pip install -U --pre robotframework==${{ matrix.rf-version }} + uv pip install -U robotframework==${{ matrix.rf-version }} --python ${{ matrix.python-version }} --system - name: Run ruff run: | ruff check ./src tasks.py diff --git a/requirements-dev.txt b/requirements-dev.txt index 4858cc4..fe02ea1 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,3 +1,4 @@ +uv pytest pytest-cov pytest-mockito From 69ad856456f8334d2ae4384ca558fcff8638bac4 Mon Sep 17 00:00:00 2001 From: Tatu Aalto Date: Fri, 2 Aug 2024 11:59:01 +0300 Subject: [PATCH 3/4] Add ignore --- src/robotlibcore/core/hybrid.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/robotlibcore/core/hybrid.py b/src/robotlibcore/core/hybrid.py index cb0cc6c..2caa8b2 100644 --- a/src/robotlibcore/core/hybrid.py +++ b/src/robotlibcore/core/hybrid.py @@ -88,7 +88,7 @@ def __get_members(self, component): raise TypeError( msg, ) - if type(component) is component.__class__: + if type(component) != component.__class__: # noqa: E721 msg = ( "Libraries must be modules or new-style class instances, " f"got old-style class {component.__class__.__name__} instead." From eeb6988bb6de9fadb6a32ca3e8a4364a89b43338 Mon Sep 17 00:00:00 2001 From: Tatu Aalto Date: Fri, 2 Aug 2024 12:03:00 +0300 Subject: [PATCH 4/4] Fix atest --- atest/tests.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atest/tests.robot b/atest/tests.robot index 3c66808..a12b35f 100644 --- a/atest/tests.robot +++ b/atest/tests.robot @@ -14,7 +14,7 @@ Keyword Names Method Custom Name Cust Omna Me - IF $LIBRARY == "ExtendExistingLibrary" Keyword In Extending Library + IF "$LIBRARY" == "ExtendExistingLibrary" Keyword In Extending Library Method Without @keyword Are Not Keyowrds [Documentation] FAIL GLOB: No keyword with name 'Not Keyword' found.*