Skip to content
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

Matching Return Type of HybridRouteLayer and RouteLayer #291

Open
Kim-Eungseo opened this issue May 18, 2024 · 0 comments
Open

Matching Return Type of HybridRouteLayer and RouteLayer #291

Kim-Eungseo opened this issue May 18, 2024 · 0 comments

Comments

@Kim-Eungseo
Copy link

Matching Return Type of HybridRouteLayer and RouteLayer

Feature Request

Description

I think matching the return type of HybridRouteLayer and RouteLayer is a good idea. This would ensure consistency across different route layers and simplify the integration process.

Rationale

  1. Consistency: Having consistent return types across different route layers will make the codebase easier to understand and maintain.
  2. Ease of Use: Developers will find it easier to work with both layers if they have the same return type, reducing the learning curve and potential for errors.
  3. Integration: Simplifies the process of integrating different route layers within the same application, leading to a more seamless development experience.

Possible Implementation

# Example of aligning return types (pseudocode)
class HybridRouteLayer:
    ...
    def __call__(self, query: Optional[str] = None) -> RouteChoice:
        # Implementation

class RouteLayer:
    ...
    def __call__(self, query: Optional[str] = None) -> RouteChoice:
        # Implementation
@Kim-Eungseo Kim-Eungseo changed the title How about returning value of calling HybridRouteLayer with class RouteChoice? Matching Return Type of HybridRouteLayer and RouteLayer May 18, 2024
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

No branches or pull requests

1 participant