From 4ab00b0954c4ed40c3d0c83e9e1c3487bc7577ed Mon Sep 17 00:00:00 2001 From: Simon Hornby Date: Fri, 28 Jun 2024 09:28:08 +0200 Subject: [PATCH 1/3] chore: adapt ruff call in build to new format --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 75e45be0..5c2acc1a 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ fmt: lint: black . --check && \ - ruff UnleashClient tests docs && \ + ruff check UnleashClient tests docs && \ mypy ${PROJECT_NAME} --install-types --non-interactive; pytest: From 6bc3ae78b2047cccfe40e236ee9d643c62f5615d Mon Sep 17 00:00:00 2001 From: Simon Hornby Date: Fri, 28 Jun 2024 09:34:09 +0200 Subject: [PATCH 2/3] chore: update pyproject properties for new ruff version --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f37a7666..b28d1af4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ addopts= """ log_file_level="INFO" [tool.ruff] -select = [ +lint.select = [ "E", # pycodestyle, error "W", # pycodestyle, warning "F", # pyflakes @@ -69,11 +69,11 @@ select = [ "YTT", # flake8-2020 "I" # isort ] -ignore = ["E501", "PLR2004"] +lint.ignore = ["E501", "PLR2004"] -fixable = ["I"] +lint.fixable = ["I"] -[tool.ruff.pylint] +[tool.ruff.lint.pylint] max-args = 25 [tool.setuptools] From d45782a1e10e9ce84f1d725317bb7e7b7d355c02 Mon Sep 17 00:00:00 2001 From: Simon Hornby Date: Fri, 28 Jun 2024 09:34:27 +0200 Subject: [PATCH 3/3] chore: apply new ruff lint to custom strategy tests --- tests/unit_tests/test_custom_strategy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit_tests/test_custom_strategy.py b/tests/unit_tests/test_custom_strategy.py index 318c6bca..a9b1eba5 100644 --- a/tests/unit_tests/test_custom_strategy.py +++ b/tests/unit_tests/test_custom_strategy.py @@ -66,7 +66,7 @@ def test_uc_customstrategy_happypath(recwarn): # Check warning on deprecated strategy. assert len(recwarn) >= 1 - assert any([x.category == DeprecationWarning for x in recwarn]) + assert any([x.category is DeprecationWarning for x in recwarn]) @responses.activate