Skip to content

Protocol vs ABC #2

@johschmidt42

Description

@johschmidt42

Hi there!

appreciate the work. Quick question: What's the point of using Protocol instead of ABC here? Is this just a mypy issue? As someone looking at the codebase for the first time, there is basically no reference in the concrete implementations (e.g. QdrantSearch). This makes is harder to understand that the concrete implementation conforms the the abstract class if you don't happen to look in the /src/types directory. With an ABC class you have that connection and additionally can use the @overload decorator to make it clear. Let me know what you think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions