Skip to content

Commit cd1521a

Browse files
committed
Sync fba release (force push)
1 parent 6075c8b commit cd1521a

203 files changed

Lines changed: 16649 additions & 1304 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
__pycache__/
2+
.git/
3+
.github/
4+
.idea/
5+
.vscode/
6+
.cursor/
7+
venv/
8+
.venv/
9+
.ruff_cache/
10+
.pytest_cache/
11+
.claude/
12+
.serena/

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom: https://wu-clan.github.io/sponsor/

.github/workflows/changelog.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release changelog
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
changelog:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
with:
15+
ref: master
16+
17+
- uses: rhysd/changelog-from-release/action@v3
18+
with:
19+
file: CHANGELOG.md
20+
pull_request: true
21+
commit_summary_template: 'Update the changelog for %s'
22+
args: -c
23+
github_token: ${{ secrets.GH_TOKEN }}

.github/workflows/lint.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
name: lint ${{ matrix.python-version }}
13+
strategy:
14+
matrix:
15+
python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14' ]
16+
fail-fast: false
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v5
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
run: uv python install ${{ matrix.python-version }}
25+
26+
- name: Install dependencies
27+
run: |
28+
uv sync --only-group lint
29+
30+
- name: Run lint
31+
run: |
32+
source .venv/bin/activate
33+
chmod 755 backend/scripts/lint.sh
34+
./backend/scripts/lint.sh

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.idea/
2+
.vscode/
3+
.cursor/
4+
.DS_Store
5+
venv/
6+
.venv/
7+
.python-version
8+
.ruff_cache/
9+
.pytest_cache/
10+
.claude/
11+
.serena/

.pre-commit-config.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
default_language_version:
2+
python: '>= 3.10'
3+
4+
repos:
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v6.0.0
7+
hooks:
8+
- id: end-of-file-fixer
9+
- id: check-json
10+
- id: check-yaml
11+
- id: check-toml
12+
13+
- repo: https://github.com/charliermarsh/ruff-pre-commit
14+
rev: v0.14.10
15+
hooks:
16+
- id: ruff-check
17+
args:
18+
# https://github.com/astral-sh/ruff-pre-commit/issues/64
19+
- '--fix'
20+
- '--unsafe-fixes'
21+
- id: ruff-format
22+
23+
- repo: https://github.com/astral-sh/uv-pre-commit
24+
rev: 0.9.18
25+
hooks:
26+
- id: uv-lock
27+
- id: uv-export
28+
args:
29+
- '-o'
30+
- 'requirements.txt'
31+
- '--no-hashes'

.ruff.toml

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
line-length = 120
2+
preview = true
3+
fix = true
4+
unsafe-fixes = true
5+
show-fixes = true
6+
required-version = ">=0.13.0"
7+
8+
[lint]
9+
select = [
10+
"FAST",
11+
"ANN001",
12+
"ANN201",
13+
"ANN202",
14+
"ANN204",
15+
"ANN205",
16+
"ANN206",
17+
"ASYNC110",
18+
"ASYNC116",
19+
"ASYNC210",
20+
"ASYNC212",
21+
"ASYNC230",
22+
"ASYNC240",
23+
"ASYNC250",
24+
"ASYNC251",
25+
"S310",
26+
"FBT001",
27+
"FBT002",
28+
"B002",
29+
"B005",
30+
"B006",
31+
"B007",
32+
"B008",
33+
"B009",
34+
"B010",
35+
"B013",
36+
"B014",
37+
"B019",
38+
"B020",
39+
"B021",
40+
"B024",
41+
"B025",
42+
"B026",
43+
"B027",
44+
"B039",
45+
"COM",
46+
"C402",
47+
"C403",
48+
"C404",
49+
"C408",
50+
"C410",
51+
"C411",
52+
"C414",
53+
"C416",
54+
"C417",
55+
"C418",
56+
"C419",
57+
"C420",
58+
"DTZ",
59+
"EXE",
60+
"ISC001",
61+
"ISC002",
62+
"ISC003",
63+
"PIE",
64+
"PYI009",
65+
"PYI010",
66+
"PYI011",
67+
"PYI012",
68+
"PYI013",
69+
"PYI016",
70+
"PYI017",
71+
"PYI019",
72+
"PYI020",
73+
"PYI021",
74+
"PYI024",
75+
"PYI026",
76+
"PYI030",
77+
"PYI033",
78+
"PYI034",
79+
"PYI036",
80+
"PYI041",
81+
"PYI042",
82+
"PYI055",
83+
"PYI061",
84+
"PYI062",
85+
"PYI063",
86+
"Q001",
87+
"Q002",
88+
"RSE102",
89+
"RET501",
90+
"RET505",
91+
"RET506",
92+
"RET507",
93+
"RET508",
94+
"SIM101",
95+
"SIM102",
96+
"SIM103",
97+
"SIM107",
98+
"SIM108",
99+
"SIM109",
100+
"SIM110",
101+
"SIM114",
102+
"SIM115",
103+
"SIM201",
104+
"SIM202",
105+
"SIM210",
106+
"SIM211",
107+
"SIM212",
108+
"SIM300",
109+
"SIM401",
110+
"SIM910",
111+
"TID252",
112+
"TC",
113+
"FLY",
114+
"I",
115+
"C901",
116+
"N",
117+
"PERF",
118+
"E",
119+
"W",
120+
"D404",
121+
"D417",
122+
"D419",
123+
"F",
124+
"PGH",
125+
"PLC1901",
126+
"UP",
127+
"FURB",
128+
"RUF",
129+
"TRY",
130+
]
131+
ignore = [
132+
"COM812",
133+
"PGH003",
134+
"RUF001",
135+
"RUF002",
136+
"RUF003",
137+
"RUF006",
138+
"RUF012",
139+
"TRY400",
140+
"TRY003",
141+
"TRY301"
142+
]
143+
144+
[lint.per-file-ignores]
145+
"**/model/*.py" = ["TC003"]
146+
"backend/common/socketio/server.py" = ["ANN001"]
147+
"backend/common/exception/exception_handler.py" = ["ANN202","RUF029"]
148+
149+
[lint.flake8-pytest-style]
150+
parametrize-names-type = "list"
151+
parametrize-values-row-type = "list"
152+
parametrize-values-type = "list"
153+
154+
[lint.flake8-quotes]
155+
inline-quotes = "single"
156+
157+
[lint.flake8-type-checking]
158+
runtime-evaluated-base-classes = ["pydantic.BaseModel", "sqlalchemy.orm.DeclarativeBase"]
159+
160+
[lint.flake8-unused-arguments]
161+
ignore-variadic-names = true
162+
163+
[lint.isort]
164+
case-sensitive = true
165+
lines-between-types = 1
166+
order-by-type = true
167+
168+
[lint.pylint]
169+
allow-dunder-method-names = ["__tablename__", "__table_args__"]
170+
171+
[format]
172+
docstring-code-format = true
173+
preview = true
174+
quote-style = "single"

0 commit comments

Comments
 (0)