From 538f256ac021454fe7d66fa956e79c6797b58429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maksymilian=20P=C5=82ywaczyk?= Date: Wed, 25 Oct 2023 21:57:53 +0200 Subject: [PATCH] Update ruff version, with adopt ruff formater and ruff linter --- Smart-Pot-API/.pre-commit-config.yaml | 6 +++--- Smart-Pot-API/pyproject.toml | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Smart-Pot-API/.pre-commit-config.yaml b/Smart-Pot-API/.pre-commit-config.yaml index 79a7769..b8d710f 100644 --- a/Smart-Pot-API/.pre-commit-config.yaml +++ b/Smart-Pot-API/.pre-commit-config.yaml @@ -4,17 +4,17 @@ repos: hooks: - id: name-tests-test - args: [--pytest-test-first] + args: [ --pytest-test-first ] - id: trailing-whitespace - id: end-of-file-fixer exclude: requirements.txt - id: detect-private-key - id: check-merge-conflict - id: check-added-large-files - args: [--enforce-all] + args: [ --enforce-all ] - repo: https://github.com/charliermarsh/ruff-pre-commit - # Ruff version. + # Ruff version. rev: v0.1.2 hooks: - id: ruff-format diff --git a/Smart-Pot-API/pyproject.toml b/Smart-Pot-API/pyproject.toml index dfbc3fc..04f7af9 100644 --- a/Smart-Pot-API/pyproject.toml +++ b/Smart-Pot-API/pyproject.toml @@ -61,3 +61,13 @@ target-version = "py310" [tool.ruff.mccabe] # Unlike Flake8, default to a complexity level of 10. max-complexity = 10 + +[tool.ruff.lint] +select = [ + # pycodestyle + "E", + # Pyflakes + "F", + # isort + "I", +]