Skip to content

Commit f892389

Browse files
committed
run backend linter
1 parent 3744ac2 commit f892389

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

backend/app/services/implementations/match_service.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from app.schemas.time_block import TimeBlockEntity, TimeRange
2121
from app.schemas.user import UserRole
2222

23-
2423
SCHEDULE_CLEANUP_STATUSES = {"pending", "requesting_new_times", "requesting_new_volunteers"}
2524
ACTIVE_MATCH_STATUSES = {
2625
"pending",

backend/migrations/versions/d87b1000d48b_add_soft_deletion_to_matches_table.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,26 @@
55
Create Date: 2025-10-15 00:01:11.343457
66
77
"""
8+
89
from typing import Sequence, Union
910

11+
import sqlalchemy as sa
12+
from alembic import op
13+
1014
# revision identifiers, used by Alembic.
11-
revision: str = 'd87b1000d48b'
12-
down_revision: Union[str, None] = 'e3f0a5b4b7c4'
15+
revision: str = "d87b1000d48b"
16+
down_revision: Union[str, None] = "e3f0a5b4b7c4"
1317
branch_labels: Union[str, Sequence[str], None] = None
1418
depends_on: Union[str, Sequence[str], None] = None
1519

1620

1721
def upgrade() -> None:
18-
# ### commands auto generated by Alembic - please adjust! ###
19-
import sqlalchemy as sa
20-
from alembic import op
21-
22-
op.add_column('matches', sa.Column('deleted_at', sa.DateTime(timezone=True), nullable=True))
22+
op.add_column("matches", sa.Column("deleted_at", sa.DateTime(timezone=True), nullable=True))
2323
# ### end Alembic commands ###
2424

2525

2626
def downgrade() -> None:
2727
# ### commands auto generated by Alembic - please adjust! ###
28-
from alembic import op
2928

30-
op.drop_column('matches', 'deleted_at')
29+
op.drop_column("matches", "deleted_at")
3130
# ### end Alembic commands ###

backend/tests/unit/test_match_service.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ def db_session():
5656
# Clean up match-related data (be careful with FK constraints)
5757
session.execute(
5858
text(
59-
"TRUNCATE TABLE suggested_times, available_times, matches, time_blocks, tasks "
60-
"RESTART IDENTITY CASCADE"
59+
"TRUNCATE TABLE suggested_times, available_times, matches, time_blocks, tasks RESTART IDENTITY CASCADE"
6160
)
6261
)
6362
session.execute(text("TRUNCATE TABLE users RESTART IDENTITY CASCADE"))
@@ -709,6 +708,7 @@ async def test_schedule_match_retains_historical_matches(
709708
except Exception:
710709
db_session.rollback()
711710
raise
711+
712712
@pytest.mark.asyncio
713713
async def test_schedule_match_participant_ownership_check(self, db_session, sample_match, another_participant):
714714
"""403 when different participant tries to schedule"""
@@ -763,7 +763,9 @@ async def test_schedule_match_invalid_match_404(self, db_session, participant_us
763763
assert "Match" in exc_info.value.detail
764764

765765
@pytest.mark.asyncio
766-
async def test_schedule_match_rejects_block_not_in_suggested_times(self, db_session, sample_match, participant_user):
766+
async def test_schedule_match_rejects_block_not_in_suggested_times(
767+
self, db_session, sample_match, participant_user
768+
):
767769
"""400 when trying to book a time block not in match's suggested times"""
768770
try:
769771
match_service = MatchService(db_session)

0 commit comments

Comments
 (0)