Skip to content

misc/make-clippy-happier #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 6, 2025
Merged

misc/make-clippy-happier #7

merged 2 commits into from
May 6, 2025

Conversation

mfuntowicz
Copy link
Member

@mfuntowicz mfuntowicz commented May 6, 2025

Summary

This Pull Request refactors the code to introduce a new type alias for error handling and context-binding in multiple modules. The EndpointResult type is introduced to standardize result types, and RequestWithContext type alias improves clarity for context-bundled requests. Changes primarily impact request handling and endpoint definitions in audio transcription, embeddings, and core logic.

Main Changes

  • Added EndpointResult and RequestWithContext type aliases for improved readability and standardized error/result handling.

  • Refactored EndpointContext structures and function signatures to use EndpointResult and RequestWithContext in the hfendpoints-core module.

  • Updated routes and handlers in audio/transcriptions and embeddings to align with the new type aliases.

  • Enhanced documentation by including new tags for OpenAPI endpoints (EMBEDDINGS_DESC and EMBEDDINGS_TAG) alongside existing ones.

This refactor simplifies code readability and consistency while preserving functionality.

@mfuntowicz mfuntowicz added this pull request to the merge queue May 6, 2025
Merged via the queue into main with commit 11716e6 May 6, 2025
12 checks passed
@mfuntowicz mfuntowicz deleted the misc/make-clippy-happier branch May 6, 2025 20:22
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.

1 participant