Skip to content

Commit 2cc654e

Browse files
committed
format code
1 parent 0260df4 commit 2cc654e

File tree

3 files changed

+841
-4
lines changed

3 files changed

+841
-4
lines changed

.github/workflows/build-and-test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ jobs:
5454
with:
5555
python-version: ${{ matrix.python-version }}
5656

57+
- name: Lint with ruff
58+
run: uv run --frozen ruff check .
59+
5760
- name: Test with python ${{ matrix.python-version }}
5861
run: uv run --frozen pytest
5962

63+

pyproject.toml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,48 @@ dependencies = [
3131
"granian>=1.7.0",
3232
"apscheduler[redis,sqlalchemy]>=4.0.0a5",
3333
"pendulum @ git+https://github.com/sdispater/pendulum.git@develop"
34-
]
34+
]
35+
36+
[tool.uv]
37+
dev-dependencies = [
38+
"ruff>=0.9.10",
39+
"devtools[pygments]>=0.12.2",
40+
"safety",
41+
"pyupgrade",
42+
"ipython>=8.26.0",
43+
"sqlacodegen>=3.0.0rc5",
44+
"tryceratops>=2.3.3",
45+
"locust>=2.31.3"
46+
47+
]
48+
49+
50+
[tool.mypy]
51+
strict = true
52+
exclude = ["venv", ".venv", "alembic"]
53+
54+
[tool.ruff]
55+
target-version = "py313"
56+
exclude = ["alembic"]
57+
58+
[tool.ruff.lint]
59+
select = [
60+
"E", # pycodestyle errors
61+
"W", # pycodestyle warnings
62+
"F", # pyflakes
63+
"I", # isort
64+
"B", # flake8-bugbear
65+
"C4", # flake8-comprehensions
66+
"UP", # pyupgrade
67+
"ARG001", # unused arguments in functions
68+
]
69+
ignore = [
70+
"E501", # line too long, handled by black
71+
"B008", # do not perform function calls in argument defaults
72+
"W191", # indentation contains tabs
73+
"B904", # Allow raising exceptions without from e, for HTTPException
74+
]
75+
76+
[tool.ruff.lint.pyupgrade]
77+
# Preserve types, even if a file imports `from __future__ import annotations`.
78+
keep-runtime-typing = true

0 commit comments

Comments
 (0)