Skip to content

Correct Backend Return Types #106

@bamarler

Description

@bamarler

Description

Our strict linting enforces all methods to have a return type, and I have encouraged us to not return raw dict types, and instead create Pydantic schemas. After a brief audit of our repositories, I can see that we have functions that are still returning dict and some that claim they return a Pydantic schema, but instead they actually return raw dict because they don't cast the data fetched from Supabase.

Below are examples from the athlete repository which are correct, these should be used as reference:
Image

Expectations

  • Detailed Audit of what functions throughout our backend (in all directories) are not following the correct pattern included in the PR notes.
  • All corresponding issues corrected
  • Any tests updated to align with corrected types if needed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions