Skip to content

fix: get tasks endpoint to a enum#1578

Open
ZohebShaikh wants to merge 4 commits into
mainfrom
add-enum-for-endpoint
Open

fix: get tasks endpoint to a enum#1578
ZohebShaikh wants to merge 4 commits into
mainfrom
add-enum-for-endpoint

Conversation

@ZohebShaikh

Copy link
Copy Markdown
Contributor

Currently get_tasks takes a string to filter on task_status, but it should be a enum.

@ZohebShaikh ZohebShaikh requested a review from a team as a code owner June 30, 2026 07:05
@ZohebShaikh ZohebShaikh force-pushed the add-enum-for-endpoint branch from 075e64b to ba64006 Compare June 30, 2026 07:08
@ZohebShaikh ZohebShaikh force-pushed the add-enum-for-endpoint branch from ba64006 to a5fbf0a Compare June 30, 2026 07:23
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.91%. Comparing base (32c57b9) to head (fcd053f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1578      +/-   ##
==========================================
- Coverage   95.93%   95.91%   -0.03%     
==========================================
  Files          44       44              
  Lines        3270     3253      -17     
==========================================
- Hits         3137     3120      -17     
  Misses        133      133              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/blueapi/service/main.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if we accept an enum, fastapi will do this validation for us so the block can be removed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is true, While I was going through the code I thought I will remove the get_tasks function as well and simplify it a little bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants