Skip to content

Commit fd03688

Browse files
committed
Remove isort, configure Ruff format
1 parent 4fe85eb commit fd03688

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

.github/workflows/linters.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,8 @@ jobs:
4848
- name: Check code style
4949
run: |
5050
. venv/bin/activate
51-
python -m isort .
5251
python -m ruff format --check
53-
python -m ruff check --ignore I
52+
python -m ruff check
5453
5554
- name: Check directory layout
5655
run: |

fastapi-python-web-apis/main.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import random
22
from typing import Annotated
33

4-
from pydantic import BaseModel, Field
5-
64
from fastapi import FastAPI, HTTPException, Query
75
from fastapi.middleware.cors import CORSMiddleware
6+
from pydantic import BaseModel, Field
87

98
tags_metadata = [
109
{

pyproject.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.ruff]
2-
target-version = "py313"
2+
target-version = "py314"
33
line-length = 79
44
exclude = [
55
".devcontainers",
@@ -8,5 +8,9 @@ exclude = [
88
]
99

1010
[tool.ruff.lint]
11-
select = ["E", "F", "I", "RUF100"]
12-
ignore = ["E501"]
11+
select = ["E", "F", "RUF100"]
12+
ignore = ["E501", "I"]
13+
14+
[tool.ruff.lint.isort]
15+
force-sort-within-sections = true
16+

python-annotations/linked_list.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
@dataclass
66
class LinkedList:
7-
head: Node # noqa
7+
head: Node
88

99

1010
@dataclass
1111
class Node:
1212
value: Any
13-
next: Optional[Node] = None # noqa
13+
next: Optional[Node] = None

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
isort==7.0.0
21
ruff==0.14.1

0 commit comments

Comments
 (0)