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

Use set method to save cos in find_similar instead of save cos directly #60

Open
quillcraftsman opened this issue Oct 29, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@quillcraftsman
Copy link
Member

Is your feature request related to a problem? Please describe.
In the django package django-find-similar I use adapter from django model to TextToken in find-similar.
__init__ method works well. But I need to add new behavior the cos will be saved.

Describe the solution you'd like
Here we save cos directly.
text.cos = cos
create special method or setter to do in the TextToken class:

def set_cos(cos):
    self.cos = cos

Describe alternatives you've considered
we can create python @setter. But in this way we should make cos property protected and create @getter. It's not a problem, just need more attention and replacements.

Additional context

@quillcraftsman quillcraftsman added enhancement New feature or request good first issue Good for newcomers labels Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant