Skip to content

Commit 8b18b56

Browse files
Fix ruff and pytest failures
1 parent 89411de commit 8b18b56

4 files changed

Lines changed: 547 additions & 388 deletions

File tree

.pre-commit-config.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
repos:
2+
- repo: local
3+
hooks:
4+
- id: ruff-format
5+
name: ruff format --check
6+
entry: uv run ruff format --check
7+
language: system
8+
types: [python]
9+
pass_filenames: false
10+
11+
- id: ruff-check
12+
name: ruff check
13+
entry: uv run ruff check
14+
language: system
15+
types: [python]
16+
pass_filenames: false
17+
18+
- id: ty-check
19+
name: ty check
20+
entry: uv run ty check .
21+
language: system
22+
types: [python]
23+
pass_filenames: false

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ dev = [
3535
"ruff>=0.15.5",
3636
"pytest-jinja-check[fastapi]>=1.0.2",
3737
"pytest-playwright>=0.7.2",
38+
"pre-commit>=4.6.0",
3839
]
3940

4041
[tool.ty.rules]

utils/core/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ def get_active_for_org(
371371
cls, session: Session, organization_id: int
372372
) -> list["Invitation"]:
373373
statement = select(cls).where(
374-
cls.organization_id == organization_id, cls.used == False
375-
) # noqa: E712
374+
cls.organization_id == organization_id, cls.used.is_(False)
375+
)
376376
results = session.exec(statement).all()
377377
return [inv for inv in results if not inv.is_expired()]

0 commit comments

Comments
 (0)