Skip to content

Commit

Permalink
fixup: feedback #1
Browse files Browse the repository at this point in the history
  • Loading branch information
soofstad committed Jun 5, 2024
1 parent c41c480 commit 62ffc9b
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 14 deletions.
7 changes: 5 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ src = ["src"]
target-version = "py311"
line-length = 119

[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
Expand All @@ -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

Expand Down
1 change: 0 additions & 1 deletion web/biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"formatter": {
"indentStyle": "space",
"indentWidth": 2,
"jsxQuoteStyle": "single",
"quoteStyle": "single",
"trailingCommas": "es5",
"lineWidth": 119,
Expand Down
2 changes: 1 addition & 1 deletion web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function App() {
return (
<CenterContainer>
<Typography>Login in progress.</Typography>
<Progress.Dots color='primary' />
<Progress.Dots color="primary" />
</CenterContainer>
)
}
Expand Down
2 changes: 1 addition & 1 deletion web/src/common/components/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconB
) {
return (
<Tooltip title={title}>
<Button variant='ghost_icon' onClick={onClick} ref={ref}>
<Button variant="ghost_icon" onClick={onClick} ref={ref}>
<Icon data={icon} size={24} title={title} />
</Button>
</Tooltip>
Expand Down
4 changes: 2 additions & 2 deletions web/src/features/todos/todo-list/TodoItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ const TodoItem = ({ todo }: { todo: AddTodoResponse }) => {
<Card>
<Card.Header>
<Card.HeaderTitle>
<StyledTodoItemTitle variant='h5' isStruckThrough={todo.is_completed}>
<StyledTodoItemTitle variant="h5" isStruckThrough={todo.is_completed}>
{todo.title}
</StyledTodoItemTitle>
<Typography variant='body_short'>{statusOf(todo.is_completed)}</Typography>
<Typography variant="body_short">{statusOf(todo.is_completed)}</Typography>
</Card.HeaderTitle>
<IconButton
title={`Mark as ${statusOf(!todo.is_completed).toLowerCase()}`}
Expand Down
8 changes: 4 additions & 4 deletions web/src/features/todos/todo-list/TodoList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ const AddItem = () => {
}

return (
<div className='form'>
<div className="form">
<form onSubmit={add}>
<StyledInput>
<Input
value={value}
className='input'
placeholder='Add Task'
className="input"
placeholder="Add Task"
onChange={(e: ChangeEvent<HTMLInputElement>) => setValue(e.target.value)}
/>
<Button className='add-button' type='submit'>
<Button className="add-button" type="submit">
Add
</Button>
</StyledInput>
Expand Down

0 comments on commit 62ffc9b

Please sign in to comment.