Skip to content

Incorrect type annotation for synonym_sets in CollectionCreateSchema #126

@mrfroebi

Description

@mrfroebi

First of all, thank you for building and maintaining such a great tool: we rely on it heavily in our applications.

While working with collection creation, we noticed a mismatch in the type annotation of the synonym_sets property in CollectionCreateSchema.

Specifically, the current implementation defines synonym_sets as:

synonym_sets: typing.NotRequired[typing.List[typing.List[str]]]

However, according to the official documentation:
Typesense Synonyms Documentation

synonym_sets should instead be:

list[str]

This discrepancy leads to type-checking issues on our side. As a temporary workaround, we had to suppress the errors using # type: ignore, which is not ideal.

I’d be happy to open a pull request to address this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions