Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Make BlossomResponse generic over the returned data #6

Open
TimJentzsch opened this issue Jun 14, 2021 · 0 comments
Open

Make BlossomResponse generic over the returned data #6

TimJentzsch opened this issue Jun 14, 2021 · 0 comments

Comments

@TimJentzsch
Copy link
Contributor

Currently, the data attribute of BlossomResponse is fixed to the type Union[Dict[str, Any], None]. Instead, it should be a generic type parameter so that me can provide more type information for specific endpoints.

Also, most endpoints currently return List[Dict[str, Any]] instead, making the type information misleading.

Relevant definitions:

class BlossomResponse:
data: Union[Dict[str, Any], None] = None
status: BlossomStatus = BlossomStatus.ok

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant