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
@@ -0,0 +1,109 @@
"""Enable data source/agency submission

Revision ID: 6adf9d894180
Revises: 9d57b3b79d35
Create Date: 2025-10-20 16:20:44.081736

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects.postgresql import ENUM, ARRAY


# revision identifiers, used by Alembic.
revision: str = '6adf9d894180'
down_revision: Union[str, None] = '9d57b3b79d35'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None

def upgrade() -> None:

Check warning on line 21 in alembic/versions/2025_10_20_1620-6adf9d894180_enable_data_source_agency_submission.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] alembic/versions/2025_10_20_1620-6adf9d894180_enable_data_source_agency_submission.py#L21 <103>

Missing docstring in public function
Raw output
./alembic/versions/2025_10_20_1620-6adf9d894180_enable_data_source_agency_submission.py:21:1: D103 Missing docstring in public function
_add_autogenerated_agency_id()
_add_new_columns_to_optional_ds_metadata()

def _add_new_columns_to_optional_ds_metadata():
table_name: str = "url_optional_data_source_metadata"

agency_aggregation_enum = ENUM(
'federal',
'state',
'county',
'local',
name='agency_aggregation_enum',
create_type=True,
)
agency_aggregation_enum.create(op.get_bind())

update_method_enum = ENUM(
'Overwrite',
'Insert',
'No updates',
name='update_method_enum',
create_type=True
)
update_method_enum.create(op.get_bind())

retention_schedule_enum = ENUM(
'Future only',
'1 month',
'1 day',
'1 week',
'1-10 years',
'< 1 day',
'< 1 week',
'< 1 year',
'> 10 years',
name='retention_schedule_enum',
create_type=True
)
retention_schedule_enum.create(op.get_bind())

access_type_enum = ENUM(
'Webpage',
'Download',
'API',
name='access_type_enum',
create_type=True,
)
access_type_enum.create(op.get_bind())

for column in [
sa.Column('coverage_start', sa.Date(), nullable=True),
sa.Column('coverage_end', sa.Date(), nullable=True),
sa.Column("agency_supplied", sa.Boolean(), nullable=True),
sa.Column('agency_originated', sa.Boolean(), nullable=True),
sa.Column('agency_aggregation', agency_aggregation_enum),
sa.Column('agency_described_not_in_database', sa.Text(), nullable=True),
sa.Column('update_method', update_method_enum, nullable=True),
sa.Column('readme_url', sa.Text(), nullable=True),
sa.Column('originating_entity', sa.Text(), nullable=True),
sa.Column('retention_schedule', retention_schedule_enum, nullable=True),
sa.Column('scraper_url', sa.Text(), nullable=True),
sa.Column('submission_notes', sa.Text(), nullable=True),
sa.Column('access_notes', sa.Text(), nullable=True),
sa.Column('access_types', ARRAY(
access_type_enum
), nullable=True),
]:
op.add_column(
table_name,
column,
)

def _add_autogenerated_agency_id():
op.execute(
"""
CREATE SEQUENCE agencies_agency_id START WITH 23191;
"""
)

Check failure on line 99 in alembic/versions/2025_10_20_1620-6adf9d894180_enable_data_source_agency_submission.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] alembic/versions/2025_10_20_1620-6adf9d894180_enable_data_source_agency_submission.py#L99 <123>

closing bracket does not match indentation of opening bracket's line
Raw output
./alembic/versions/2025_10_20_1620-6adf9d894180_enable_data_source_agency_submission.py:99:9: E123 closing bracket does not match indentation of opening bracket's line

op.execute(
"""
ALTER TABLE agencies
ALTER COLUMN agency_id SET DEFAULT nextval('agencies_agency_id');
"""
)

def downgrade() -> None:

Check warning on line 108 in alembic/versions/2025_10_20_1620-6adf9d894180_enable_data_source_agency_submission.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] alembic/versions/2025_10_20_1620-6adf9d894180_enable_data_source_agency_submission.py#L108 <103>

Missing docstring in public function
Raw output
./alembic/versions/2025_10_20_1620-6adf9d894180_enable_data_source_agency_submission.py:108:1: D103 Missing docstring in public function
pass
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ timeout = 300
asyncio_default_fixture_loop_scope=function
markers =
manual: mark test as manual-only (excluded from default test runs)
asyncio_mode = auto
Empty file.
22 changes: 22 additions & 0 deletions src/api/endpoints/agencies/by_id/delete/query.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from sqlalchemy import delete

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

View workflow job for this annotation

GitHub Actions / flake8

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

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

from src.db.models.impl.agency.sqlalchemy import Agency
from src.db.queries.base.builder import QueryBuilderBase


class DeleteAgencyQueryBuilder(QueryBuilderBase):

Check warning on line 8 in src/api/endpoints/agencies/by_id/delete/query.py

View workflow job for this annotation

GitHub Actions / flake8

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

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

def __init__(

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

View workflow job for this annotation

GitHub Actions / flake8

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

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

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

Check warning on line 17 in src/api/endpoints/agencies/by_id/delete/query.py

View workflow job for this annotation

GitHub Actions / flake8

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

Missing docstring in public method
Raw output
./src/api/endpoints/agencies/by_id/delete/query.py:17:1: D102 Missing docstring in public method
statement = (
delete(Agency)
.where(Agency.agency_id == self.agency_id)
)
await session.execute(statement)

Check warning on line 22 in src/api/endpoints/agencies/by_id/delete/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/agencies/by_id/delete/query.py#L22 <292>

no newline at end of file
Raw output
./src/api/endpoints/agencies/by_id/delete/query.py:22:41: W292 no newline at end of file
Empty file.
Empty file.
Empty file.
29 changes: 29 additions & 0 deletions src/api/endpoints/agencies/by_id/locations/delete/query.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from sqlalchemy import delete

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

View workflow job for this annotation

GitHub Actions / flake8

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

Missing docstring in public module
Raw output
./src/api/endpoints/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
from src.db.queries.base.builder import QueryBuilderBase


class DeleteAgencyLocationQueryBuilder(QueryBuilderBase):

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

View workflow job for this annotation

GitHub Actions / flake8

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

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

def __init__(

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

View workflow job for this annotation

GitHub Actions / flake8

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

Missing docstring in __init__
Raw output
./src/api/endpoints/agencies/by_id/locations/delete/query.py:10: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 19 in src/api/endpoints/agencies/by_id/locations/delete/query.py

View workflow job for this annotation

GitHub Actions / flake8

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

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

await session.execute(statement)

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

View workflow job for this annotation

GitHub Actions / flake8

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

blank line at end of file
Raw output
./src/api/endpoints/agencies/by_id/locations/delete/query.py:29:1: W391 blank line at end of file
Empty file.
37 changes: 37 additions & 0 deletions src/api/endpoints/agencies/by_id/locations/get/query.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
from typing import Sequence

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

View workflow job for this annotation

GitHub Actions / flake8

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

Missing docstring in public module
Raw output
./src/api/endpoints/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.db.models.impl.link.agency_location.sqlalchemy import LinkAgencyLocation
from src.db.models.views.location_expanded import LocationExpandedView
from src.db.queries.base.builder import QueryBuilderBase


class GetAgencyLocationsQueryBuilder(QueryBuilderBase):

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

View workflow job for this annotation

GitHub Actions / flake8

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

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

def __init__(

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

View workflow job for this annotation

GitHub Actions / flake8

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

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

async def run(self, session: AsyncSession) -> list[AgencyGetLocationsResponse]:

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

View workflow job for this annotation

GitHub Actions / flake8

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

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

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

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

View workflow job for this annotation

GitHub Actions / flake8

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

no newline at end of file
Raw output
./src/api/endpoints/agencies/by_id/locations/get/query.py:37:69: W292 no newline at end of file
6 changes: 6 additions & 0 deletions src/api/endpoints/agencies/by_id/locations/get/response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from pydantic import BaseModel

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

View workflow job for this annotation

GitHub Actions / flake8

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

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


class AgencyGetLocationsResponse(BaseModel):

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

View workflow job for this annotation

GitHub Actions / flake8

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

Missing docstring in public class
Raw output
./src/api/endpoints/agencies/by_id/locations/get/response.py:4:1: D101 Missing docstring in public class
location_id: int
full_display_name: str
Empty file.
23 changes: 23 additions & 0 deletions src/api/endpoints/agencies/by_id/locations/post/query.py
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/agencies/by_id/locations/post/query.py

View workflow job for this annotation

GitHub Actions / flake8

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

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

from src.db.models.impl.link.agency_location.sqlalchemy import LinkAgencyLocation
from src.db.queries.base.builder import QueryBuilderBase


class AddAgencyLocationQueryBuilder(QueryBuilderBase):

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

View workflow job for this annotation

GitHub Actions / flake8

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

Missing docstring in public class
Raw output
./src/api/endpoints/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/agencies/by_id/locations/post/query.py

View workflow job for this annotation

GitHub Actions / flake8

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

Missing docstring in __init__
Raw output
./src/api/endpoints/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/agencies/by_id/locations/post/query.py

View workflow job for this annotation

GitHub Actions / flake8

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

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

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

View workflow job for this annotation

GitHub Actions / flake8

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

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

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

View workflow job for this annotation

GitHub Actions / flake8

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

Missing docstring in public module
Raw output
./src/api/endpoints/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.agencies.by_id.put.request import AgencyPutRequest
from src.db.models.impl.agency.sqlalchemy import Agency
from src.db.queries.base.builder import QueryBuilderBase


class UpdateAgencyQueryBuilder(QueryBuilderBase):

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

View workflow job for this annotation

GitHub Actions / flake8

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

Missing docstring in public class
Raw output
./src/api/endpoints/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/agencies/by_id/put/query.py

View workflow job for this annotation

GitHub Actions / flake8

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

Missing docstring in __init__
Raw output
./src/api/endpoints/agencies/by_id/put/query.py:12:1: D107 Missing docstring in __init__
self,
agency_id: int,
request: AgencyPutRequest,
):
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/agencies/by_id/put/query.py

View workflow job for this annotation

GitHub Actions / flake8

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

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

query = (
select(
Agency
)
.where(
Agency.agency_id == self.agency_id
)
)

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

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

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

View workflow job for this annotation

GitHub Actions / flake8

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

blank line at end of file
Raw output
./src/api/endpoints/agencies/by_id/put/query.py:42:1: W391 blank line at end of file
9 changes: 9 additions & 0 deletions src/api/endpoints/agencies/by_id/put/request.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from pydantic import BaseModel

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

View workflow job for this annotation

GitHub Actions / flake8

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

Missing docstring in public module
Raw output
./src/api/endpoints/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 AgencyPutRequest(BaseModel):

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

View workflow job for this annotation

GitHub Actions / flake8

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

Missing docstring in public class
Raw output
./src/api/endpoints/agencies/by_id/put/request.py:6:1: D101 Missing docstring in public class
name: str | None = None
type: AgencyType | None = None
jurisdiction_type: JurisdictionType | None = None
Empty file.
Empty file.
52 changes: 52 additions & 0 deletions src/api/endpoints/agencies/root/get/query.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
from sqlalchemy import select, Result

Check warning on line 1 in src/api/endpoints/agencies/root/get/query.py

View workflow job for this annotation

GitHub Actions / flake8

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

Missing docstring in public module
Raw output
./src/api/endpoints/agencies/root/get/query.py:1:1: D100 Missing docstring in public module
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy.orm import joinedload, selectinload

Check warning on line 3 in src/api/endpoints/agencies/root/get/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/agencies/root/get/query.py#L3 <401>

'sqlalchemy.orm.joinedload' imported but unused
Raw output
./src/api/endpoints/agencies/root/get/query.py:3:1: F401 'sqlalchemy.orm.joinedload' imported but unused

from src.api.endpoints.agencies.by_id.locations.get.response import AgencyGetLocationsResponse
from src.api.endpoints.agencies.root.get.response import AgencyGetResponse
from src.db.models.impl.agency.sqlalchemy import Agency
from src.db.queries.base.builder import QueryBuilderBase


class GetAgenciesQueryBuilder(QueryBuilderBase):

Check warning on line 11 in src/api/endpoints/agencies/root/get/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/agencies/root/get/query.py#L11 <101>

Missing docstring in public class
Raw output
./src/api/endpoints/agencies/root/get/query.py:11:1: D101 Missing docstring in public class

def __init__(

Check warning on line 13 in src/api/endpoints/agencies/root/get/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/agencies/root/get/query.py#L13 <107>

Missing docstring in __init__
Raw output
./src/api/endpoints/agencies/root/get/query.py:13:1: D107 Missing docstring in __init__
self,
page: int,
):
super().__init__()
self.page = page

async def run(self, session: AsyncSession) -> list[AgencyGetResponse]:

Check warning on line 20 in src/api/endpoints/agencies/root/get/query.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/agencies/root/get/query.py#L20 <102>

Missing docstring in public method
Raw output
./src/api/endpoints/agencies/root/get/query.py:20:1: D102 Missing docstring in public method

query = (
select(
Agency
)
.options(
selectinload(Agency.locations)
)
.offset((self.page - 1) * 100)
.limit(100)
)

results: Result[tuple[Agency]] = await session.execute(query)
responses: list[AgencyGetResponse] = []
for result in results:
agency: Agency = result[0]
locations: list[AgencyGetLocationsResponse] = [
AgencyGetLocationsResponse(
location_id=location.id,
full_display_name=location.full_display_name,
)
for location in agency.locations
]
responses.append(AgencyGetResponse(
id=agency.agency_id,
name=agency.name,
type=agency.agency_type,
jurisdiction_type=agency.jurisdiction_type,
locations=locations,
))

return responses
12 changes: 12 additions & 0 deletions src/api/endpoints/agencies/root/get/response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from pydantic import BaseModel

Check warning on line 1 in src/api/endpoints/agencies/root/get/response.py

View workflow job for this annotation

GitHub Actions / flake8

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

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

from src.api.endpoints.agencies.by_id.locations.get.response import AgencyGetLocationsResponse
from src.db.models.impl.agency.enums import AgencyType, JurisdictionType


class AgencyGetResponse(BaseModel):

Check warning on line 7 in src/api/endpoints/agencies/root/get/response.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/agencies/root/get/response.py#L7 <101>

Missing docstring in public class
Raw output
./src/api/endpoints/agencies/root/get/response.py:7:1: D101 Missing docstring in public class
id: int
name: str
type: AgencyType
jurisdiction_type: JurisdictionType
locations: list[AgencyGetLocationsResponse]

Check warning on line 12 in src/api/endpoints/agencies/root/get/response.py

View workflow job for this annotation

GitHub Actions / flake8

[flake8] src/api/endpoints/agencies/root/get/response.py#L12 <292>

no newline at end of file
Raw output
./src/api/endpoints/agencies/root/get/response.py:12:48: W292 no newline at end of file
Empty file.
Loading