Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from sqlalchemy.exc import NoResultFound
from sqlalchemy.ext.asyncio import AsyncSession

from src.api.endpoints.proposals.agencies.approve.response import ProposalAgencyApproveResponse
from src.api.endpoints.proposals.agencies.by_id.approve.response import ProposalAgencyApproveResponse
from src.db.models.impl.agency.enums import JurisdictionType, AgencyType
from src.db.models.impl.agency.sqlalchemy import Agency
from src.db.models.impl.link.agency_location.sqlalchemy import LinkAgencyLocation
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from sqlalchemy import delete

Check warning on line 1 in src/api/endpoints/proposals/agencies/by_id/locations/delete/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/delete/query.py#L1 <100>

Missing docstring in public module
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/delete/query.py:1:1: D100 Missing docstring in public module
from sqlalchemy.ext.asyncio import AsyncSession

from src.db.models.impl.link.agency_location.sqlalchemy import LinkAgencyLocation

Check warning on line 4 in src/api/endpoints/proposals/agencies/by_id/locations/delete/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/delete/query.py#L4 <401>

'src.db.models.impl.link.agency_location.sqlalchemy.LinkAgencyLocation' imported but unused
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/delete/query.py:4:1: F401 'src.db.models.impl.link.agency_location.sqlalchemy.LinkAgencyLocation' imported but unused
from src.db.models.impl.proposals.agency_.link__location import ProposalLinkAgencyLocation
from src.db.queries.base.builder import QueryBuilderBase


class DeleteProposalAgencyLocationQueryBuilder(QueryBuilderBase):

Check warning on line 9 in src/api/endpoints/proposals/agencies/by_id/locations/delete/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/delete/query.py#L9 <101>

Missing docstring in public class
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/delete/query.py:9:1: D101 Missing docstring in public class

def __init__(

Check warning on line 11 in src/api/endpoints/proposals/agencies/by_id/locations/delete/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/delete/query.py#L11 <107>

Missing docstring in __init__
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/delete/query.py:11:1: D107 Missing docstring in __init__
self,
agency_id: int,
location_id: int,
):
super().__init__()
self.agency_id = agency_id
self.location_id = location_id

async def run(self, session: AsyncSession) -> None:

Check warning on line 20 in src/api/endpoints/proposals/agencies/by_id/locations/delete/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/delete/query.py#L20 <102>

Missing docstring in public method
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/delete/query.py:20:1: D102 Missing docstring in public method
statement = (
delete(ProposalLinkAgencyLocation)
.where(
(ProposalLinkAgencyLocation.proposal_agency_id == self.agency_id)
& (ProposalLinkAgencyLocation.location_id == self.location_id)
)
)

await session.execute(statement)

Check warning on line 30 in src/api/endpoints/proposals/agencies/by_id/locations/delete/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/delete/query.py#L30 <391>

blank line at end of file
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/delete/query.py:30:1: W391 blank line at end of file
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
from typing import Sequence

Check warning on line 1 in src/api/endpoints/proposals/agencies/by_id/locations/get/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/get/query.py#L1 <100>

Missing docstring in public module
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/get/query.py:1:1: D100 Missing docstring in public module

from sqlalchemy import select, RowMapping
from sqlalchemy.ext.asyncio import AsyncSession

from src.api.endpoints.agencies.by_id.locations.get.response import AgencyGetLocationsResponse
from src.api.endpoints.proposals.agencies.by_id.locations.get.response import ProposalAgencyGetLocationsOuterResponse
from src.db.models.impl.link.agency_location.sqlalchemy import LinkAgencyLocation

Check warning on line 8 in src/api/endpoints/proposals/agencies/by_id/locations/get/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/get/query.py#L8 <401>

'src.db.models.impl.link.agency_location.sqlalchemy.LinkAgencyLocation' imported but unused
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/get/query.py:8:1: F401 'src.db.models.impl.link.agency_location.sqlalchemy.LinkAgencyLocation' imported but unused
from src.db.models.impl.proposals.agency_.link__location import ProposalLinkAgencyLocation
from src.db.models.views.location_expanded import LocationExpandedView
from src.db.queries.base.builder import QueryBuilderBase


class GetProposalAgencyLocationsQueryBuilder(QueryBuilderBase):

Check warning on line 14 in src/api/endpoints/proposals/agencies/by_id/locations/get/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/get/query.py#L14 <101>

Missing docstring in public class
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/get/query.py:14:1: D101 Missing docstring in public class

def __init__(

Check warning on line 16 in src/api/endpoints/proposals/agencies/by_id/locations/get/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/get/query.py#L16 <107>

Missing docstring in __init__
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/get/query.py:16:1: D107 Missing docstring in __init__
self,
agency_id: int,
):
super().__init__()
self.agency_id = agency_id

async def run(self, session: AsyncSession) -> ProposalAgencyGetLocationsOuterResponse:

Check warning on line 23 in src/api/endpoints/proposals/agencies/by_id/locations/get/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/get/query.py#L23 <102>

Missing docstring in public method
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/get/query.py:23:1: D102 Missing docstring in public method
query = (
select(
ProposalLinkAgencyLocation.location_id,
LocationExpandedView.full_display_name
)
.where(
ProposalLinkAgencyLocation.proposal_agency_id == self.agency_id
)
.join(
LocationExpandedView,
LocationExpandedView.id == ProposalLinkAgencyLocation.location_id
)
)

result: Sequence[RowMapping] = await self.sh.mappings(session, query=query)
return ProposalAgencyGetLocationsOuterResponse(
results=[AgencyGetLocationsResponse(**row) for row in result]
)

Check warning on line 41 in src/api/endpoints/proposals/agencies/by_id/locations/get/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/get/query.py#L41 <292>

no newline at end of file
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/get/query.py:41:10: W292 no newline at end of file
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from pydantic import BaseModel

Check warning on line 1 in src/api/endpoints/proposals/agencies/by_id/locations/get/response.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/get/response.py#L1 <100>

Missing docstring in public module
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/get/response.py:1:1: D100 Missing docstring in public module

from src.api.endpoints.agencies.by_id.locations.get.response import AgencyGetLocationsResponse


class ProposalAgencyGetLocationsOuterResponse(BaseModel):

Check warning on line 6 in src/api/endpoints/proposals/agencies/by_id/locations/get/response.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/get/response.py#L6 <101>

Missing docstring in public class
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/get/response.py:6:1: D101 Missing docstring in public class
results: list[AgencyGetLocationsResponse]

Check warning on line 7 in src/api/endpoints/proposals/agencies/by_id/locations/get/response.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/get/response.py#L7 <292>

no newline at end of file
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/get/response.py:7:46: W292 no newline at end of file
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from sqlalchemy.ext.asyncio import AsyncSession

Check warning on line 1 in src/api/endpoints/proposals/agencies/by_id/locations/post/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/post/query.py#L1 <100>

Missing docstring in public module
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/post/query.py:1:1: D100 Missing docstring in public module

from src.db.models.impl.proposals.agency_.link__location import ProposalLinkAgencyLocation
from src.db.queries.base.builder import QueryBuilderBase


class AddProposalAgencyLocationQueryBuilder(QueryBuilderBase):

Check warning on line 7 in src/api/endpoints/proposals/agencies/by_id/locations/post/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/post/query.py#L7 <101>

Missing docstring in public class
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/post/query.py:7:1: D101 Missing docstring in public class

def __init__(

Check warning on line 9 in src/api/endpoints/proposals/agencies/by_id/locations/post/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/post/query.py#L9 <107>

Missing docstring in __init__
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/post/query.py:9:1: D107 Missing docstring in __init__
self,
agency_id: int,
location_id: int
):
super().__init__()
self.agency_id = agency_id
self.location_id = location_id

async def run(self, session: AsyncSession) -> None:

Check warning on line 18 in src/api/endpoints/proposals/agencies/by_id/locations/post/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/post/query.py#L18 <102>

Missing docstring in public method
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/post/query.py:18:1: D102 Missing docstring in public method
lal = ProposalLinkAgencyLocation(
proposal_agency_id=self.agency_id,
location_id=self.location_id,
)
session.add(lal)

Check warning on line 23 in src/api/endpoints/proposals/agencies/by_id/locations/post/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/locations/post/query.py#L23 <292>

no newline at end of file
Raw output
./src/api/endpoints/proposals/agencies/by_id/locations/post/query.py:23:25: W292 no newline at end of file
Empty file.
45 changes: 45 additions & 0 deletions src/api/endpoints/proposals/agencies/by_id/put/query.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
from fastapi import HTTPException

Check warning on line 1 in src/api/endpoints/proposals/agencies/by_id/put/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/put/query.py#L1 <100>

Missing docstring in public module
Raw output
./src/api/endpoints/proposals/agencies/by_id/put/query.py:1:1: D100 Missing docstring in public module
from sqlalchemy import select
from sqlalchemy.ext.asyncio import AsyncSession

from src.api.endpoints.proposals.agencies.by_id.put.request import ProposalAgencyPutRequest
from src.db.models.impl.proposals.agency_.core import ProposalAgency
from src.db.queries.base.builder import QueryBuilderBase


class UpdateProposalAgencyQueryBuilder(QueryBuilderBase):

Check warning on line 10 in src/api/endpoints/proposals/agencies/by_id/put/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/put/query.py#L10 <101>

Missing docstring in public class
Raw output
./src/api/endpoints/proposals/agencies/by_id/put/query.py:10:1: D101 Missing docstring in public class

def __init__(

Check warning on line 12 in src/api/endpoints/proposals/agencies/by_id/put/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/put/query.py#L12 <107>

Missing docstring in __init__
Raw output
./src/api/endpoints/proposals/agencies/by_id/put/query.py:12:1: D107 Missing docstring in __init__
self,
agency_id: int,
request: ProposalAgencyPutRequest,
):
super().__init__()
self.agency_id = agency_id
self.request = request

async def run(self, session: AsyncSession) -> None:

Check warning on line 21 in src/api/endpoints/proposals/agencies/by_id/put/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/put/query.py#L21 <102>

Missing docstring in public method
Raw output
./src/api/endpoints/proposals/agencies/by_id/put/query.py:21:1: D102 Missing docstring in public method

query = (
select(
ProposalAgency
)
.where(
ProposalAgency.id == self.agency_id
)
)

agency: ProposalAgency | None = await self.sh.one_or_none(session, query=query)
if not agency:
raise HTTPException(status_code=400, detail="Proposed Agency not found")

if self.request.name is not None:
agency.name = self.request.name
if self.request.type is not None:
agency.agency_type = self.request.type
if self.request.jurisdiction_type is not None:
agency.jurisdiction_type = self.request.jurisdiction_type




Check warning on line 45 in src/api/endpoints/proposals/agencies/by_id/put/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/put/query.py#L45 <391>

blank line at end of file
Raw output
./src/api/endpoints/proposals/agencies/by_id/put/query.py:45:1: W391 blank line at end of file
10 changes: 10 additions & 0 deletions src/api/endpoints/proposals/agencies/by_id/put/request.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from src.api.shared.models.request_base import RequestBase

Check warning on line 1 in src/api/endpoints/proposals/agencies/by_id/put/request.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/put/request.py#L1 <100>

Missing docstring in public module
Raw output
./src/api/endpoints/proposals/agencies/by_id/put/request.py:1:1: D100 Missing docstring in public module
from src.db.models.impl.agency.enums import AgencyType, JurisdictionType


class ProposalAgencyPutRequest(RequestBase):

Check warning on line 5 in src/api/endpoints/proposals/agencies/by_id/put/request.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/put/request.py#L5 <101>

Missing docstring in public class
Raw output
./src/api/endpoints/proposals/agencies/by_id/put/request.py:5:1: D101 Missing docstring in public class
name: str | None = None
type: AgencyType | None = None
jurisdiction_type: JurisdictionType | None = None


Check warning on line 10 in src/api/endpoints/proposals/agencies/by_id/put/request.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/agencies/by_id/put/request.py#L10 <391>

blank line at end of file
Raw output
./src/api/endpoints/proposals/agencies/by_id/put/request.py:10:1: W391 blank line at end of file
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from sqlalchemy import select, RowMapping, update
from sqlalchemy.ext.asyncio import AsyncSession

from src.api.endpoints.proposals.agencies.reject.request import ProposalAgencyRejectRequestModel
from src.api.endpoints.proposals.agencies.reject.response import ProposalAgencyRejectResponse
from src.api.endpoints.proposals.agencies.by_id.reject.request import ProposalAgencyRejectRequestModel
from src.api.endpoints.proposals.agencies.by_id.reject.response import ProposalAgencyRejectResponse
from src.db.models.impl.proposals.agency_.core import ProposalAgency
from src.db.models.impl.proposals.agency_.decision_info import ProposalAgencyDecisionInfo
from src.db.models.impl.proposals.enums import ProposalStatus
Expand Down
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from sqlalchemy.orm import joinedload

from src.api.endpoints.agencies.by_id.locations.get.response import AgencyGetLocationsResponse
from src.api.endpoints.proposals.agencies.get.response import ProposalAgencyGetOuterResponse, ProposalAgencyGetResponse
from src.api.endpoints.proposals.agencies.root.get.response import ProposalAgencyGetOuterResponse, ProposalAgencyGetResponse
from src.db.models.impl.proposals.agency_.core import ProposalAgency
from src.db.models.impl.proposals.enums import ProposalStatus
from src.db.queries.base.builder import QueryBuilderBase
Expand Down
78 changes: 70 additions & 8 deletions src/api/endpoints/proposals/routes.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
from fastapi import APIRouter, Depends, Path

from src.api.dependencies import get_async_core
from src.api.endpoints.proposals.agencies.approve.query import ProposalAgencyApproveQueryBuilder
from src.api.endpoints.proposals.agencies.approve.response import ProposalAgencyApproveResponse
from src.api.endpoints.proposals.agencies.get.query import ProposalAgencyGetQueryBuilder
from src.api.endpoints.proposals.agencies.get.response import ProposalAgencyGetOuterResponse
from src.api.endpoints.proposals.agencies.reject.query import ProposalAgencyRejectQueryBuilder
from src.api.endpoints.proposals.agencies.reject.request import ProposalAgencyRejectRequestModel
from src.api.endpoints.proposals.agencies.reject.response import ProposalAgencyRejectResponse
from src.api.endpoints.agencies.by_id.locations.get.response import AgencyGetLocationsResponse

Check warning on line 4 in src/api/endpoints/proposals/routes.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/routes.py#L4 <401>

'src.api.endpoints.agencies.by_id.locations.get.response.AgencyGetLocationsResponse' imported but unused
Raw output
./src/api/endpoints/proposals/routes.py:4:1: F401 'src.api.endpoints.agencies.by_id.locations.get.response.AgencyGetLocationsResponse' imported but unused
from src.api.endpoints.proposals.agencies.by_id.approve.query import ProposalAgencyApproveQueryBuilder
from src.api.endpoints.proposals.agencies.by_id.approve.response import ProposalAgencyApproveResponse
from src.api.endpoints.proposals.agencies.by_id.locations.delete.query import DeleteProposalAgencyLocationQueryBuilder
from src.api.endpoints.proposals.agencies.by_id.locations.get.query import GetProposalAgencyLocationsQueryBuilder
from src.api.endpoints.proposals.agencies.by_id.locations.get.response import ProposalAgencyGetLocationsOuterResponse
from src.api.endpoints.proposals.agencies.by_id.locations.post.query import AddProposalAgencyLocationQueryBuilder
from src.api.endpoints.proposals.agencies.by_id.put.query import UpdateProposalAgencyQueryBuilder
from src.api.endpoints.proposals.agencies.by_id.put.request import ProposalAgencyPutRequest
from src.api.endpoints.proposals.agencies.root.get.query import ProposalAgencyGetQueryBuilder
from src.api.endpoints.proposals.agencies.root.get.response import ProposalAgencyGetOuterResponse
from src.api.endpoints.proposals.agencies.by_id.reject.query import ProposalAgencyRejectQueryBuilder
from src.api.endpoints.proposals.agencies.by_id.reject.request import ProposalAgencyRejectRequestModel
from src.api.endpoints.proposals.agencies.by_id.reject.response import ProposalAgencyRejectResponse
from src.api.shared.models.message_response import MessageResponse
from src.core.core import AsyncCore
from src.security.dtos.access_info import AccessInfo
from src.security.manager import get_access_info
Expand Down Expand Up @@ -53,4 +61,58 @@
deciding_user_id=access_info.user_id,
request_model=request,
)
)
)

@proposal_router.get("/agencies/{proposed_agency_id}/locations")
async def get_agency_locations(

Check warning on line 67 in src/api/endpoints/proposals/routes.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/routes.py#L67 <103>

Missing docstring in public function
Raw output
./src/api/endpoints/proposals/routes.py:67:1: D103 Missing docstring in public function
proposed_agency_id: int = Path(
description="Agency ID to get locations for"
),
async_core: AsyncCore = Depends(get_async_core),
) -> ProposalAgencyGetLocationsOuterResponse:
return await async_core.adb_client.run_query_builder(
GetProposalAgencyLocationsQueryBuilder(agency_id=proposed_agency_id)
)

@proposal_router.post("/agencies/{proposed_agency_id}/locations/{location_id}")
async def add_location_to_agency(

Check warning on line 78 in src/api/endpoints/proposals/routes.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/routes.py#L78 <103>

Missing docstring in public function
Raw output
./src/api/endpoints/proposals/routes.py:78:1: D103 Missing docstring in public function
proposed_agency_id: int = Path(
description="Agency ID to add location to"
),
location_id: int = Path(
description="Location ID to add"
),
async_core: AsyncCore = Depends(get_async_core),
) -> MessageResponse:
await async_core.adb_client.run_query_builder(
AddProposalAgencyLocationQueryBuilder(agency_id=proposed_agency_id, location_id=location_id)
)
return MessageResponse(message="Location added to agency.")

@proposal_router.delete("/agencies/{proposed_agency_id}/locations/{location_id}")
async def remove_location_from_agency(

Check warning on line 93 in src/api/endpoints/proposals/routes.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/routes.py#L93 <103>

Missing docstring in public function
Raw output
./src/api/endpoints/proposals/routes.py:93:1: D103 Missing docstring in public function
proposed_agency_id: int = Path(
description="Agency ID to remove location from"
),
location_id: int = Path(
description="Location ID to remove"
),
async_core: AsyncCore = Depends(get_async_core),
) -> MessageResponse:
await async_core.adb_client.run_query_builder(
DeleteProposalAgencyLocationQueryBuilder(agency_id=proposed_agency_id, location_id=location_id)
)
return MessageResponse(message="Location removed from agency.")

@proposal_router.put("/agencies/{proposed_agency_id}")
async def update_agency(

Check warning on line 108 in src/api/endpoints/proposals/routes.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/proposals/routes.py#L108 <103>

Missing docstring in public function
Raw output
./src/api/endpoints/proposals/routes.py:108:1: D103 Missing docstring in public function
request: ProposalAgencyPutRequest,
proposed_agency_id: int = Path(
description="Agency ID to update"
),
async_core: AsyncCore = Depends(get_async_core),
) -> MessageResponse:
await async_core.adb_client.run_query_builder(
UpdateProposalAgencyQueryBuilder(agency_id=proposed_agency_id, request=request)
)
return MessageResponse(message="Proposed agency updated.")
Loading