8000 refactor Python API to be more pythonic - part 2 by hendrikmuhs · Pull Request #321 · KeyviDev/keyvi · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

refactor Python API to be more pythonic - part 2 #321

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 15 commits into from
Feb 18, 2025

Conversation

hendrikmuhs
Copy link
Contributor

This PR is a continuation of #267, it changes more API's to be more consistent with naming in python. The old naming is still possible, but causes a deprecation message.

@hendrikmuhs hendrikmuhs force-pushed the deprecate-old-methods branch from fa239f2 to 9201557 Compare January 22, 2025 20:17
@hendrikmuhs hendrikmuhs marked this pull request as ready for review January 26, 2025 22:06
Copy link
Member
@narekgharibyan narekgharibyan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, added 2 minor comments/questions.



def GetCompletions(self, *args):
return call_deprecated_method("GetCompletions", "complete", self.complete, *args)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't get_completions better ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

In a previous change I named it like this:

  • complete_prefix
  • complete_multiword
  • complete_fuzzy

avoiding prefixes like get_

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, okie ...

@hendrikmuhs hendrikmuhs merged commit acb496b into KeyviDev:master Feb 18, 2025
16 checks passed
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.

2 participants
0