From 568d85bcd18959e66379e938c312dd7770c5324b Mon Sep 17 00:00:00 2001 From: Simon Hornby Date: Fri, 28 Jun 2024 09:58:22 +0200 Subject: [PATCH] chore: adapt ruff call in github build to new format (#315) --- Makefile | 2 +- pyproject.toml | 8 ++++---- tests/unit_tests/test_custom_strategy.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) 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: 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] 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