diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d16b1659..f7fe4412 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,10 +41,13 @@ repos: rev: "v0.4.7" hooks: - id: ruff + name: Python lint + files: ^api/.*\.py$ + args: ["--fix"] + + - id: ruff-format name: Python format files: ^api/.*\.py$ - args: - - --fix - repo: https://github.com/biomejs/pre-commit rev: v0.2.0 diff --git a/api/pyproject.toml b/api/pyproject.toml index b9dc8c46..674abda8 100644 --- a/api/pyproject.toml +++ b/api/pyproject.toml @@ -67,6 +67,7 @@ src = ["src"] target-version = "py311" line-length = 119 +[tool.ruff.lint] select = [ "E", # pycodestyle errors "W", # pycodestyle warnings @@ -77,14 +78,12 @@ select = [ "B", # flake8-bugbear "UP", # automatically upgrade syntax for newer versions of the language ] - - ignore = [ "B904", # TODO: Within an except clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling "B008", # do not perform function calls in argument defaults. Ignored to allow dependencies in FastAPI ] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "__init__.py" = ["E402"] # Ignore `E402` (import violations) in all `__init__.py` files "src/tests/*" = ["S101"] # Allow the use of ´assert´ in tests diff --git a/web/biome.json b/web/biome.json index d33463cd..fadd6217 100644 --- a/web/biome.json +++ b/web/biome.json @@ -7,7 +7,6 @@ "formatter": { "indentStyle": "space", "indentWidth": 2, - "jsxQuoteStyle": "single", "quoteStyle": "single", "trailingCommas": "es5", "lineWidth": 119, diff --git a/web/src/App.tsx b/web/src/App.tsx index c9e69718..d0c05f66 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -32,7 +32,7 @@ function App() { return ( Login in progress. - + ) } diff --git a/web/src/common/components/IconButton.tsx b/web/src/common/components/IconButton.tsx index 5e1dd791..38c931d9 100644 --- a/web/src/common/components/IconButton.tsx +++ b/web/src/common/components/IconButton.tsx @@ -14,7 +14,7 @@ const IconButton = forwardRef(function IconB ) { return ( - diff --git a/web/src/features/todos/todo-list/TodoItem.tsx b/web/src/features/todos/todo-list/TodoItem.tsx index f7f4a0e2..386a1bef 100644 --- a/web/src/features/todos/todo-list/TodoItem.tsx +++ b/web/src/features/todos/todo-list/TodoItem.tsx @@ -26,10 +26,10 @@ const TodoItem = ({ todo }: { todo: AddTodoResponse }) => { - + {todo.title} - {statusOf(todo.is_completed)} + {statusOf(todo.is_completed)} { } return ( -
+
) => setValue(e.target.value)} /> -