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

convert deprecated methods #26

Open
JarbasAl opened this issue Nov 6, 2024 · 0 comments
Open

convert deprecated methods #26

JarbasAl opened this issue Nov 6, 2024 · 0 comments

Comments

@JarbasAl
Copy link

JarbasAl commented Nov 6, 2024

if a skill is detected calling any of these methods, they can be directly upgraded

    @deprecated("Use `self.resources.render_dialog`", "0.1.0")
    def translate(self, text: str, data: Optional[dict] = None):
        """
        Deprecated method for translating a dialog file.
        use self.resources.render_dialog(text, data) instead
        """
        return self.resources.render_dialog(text, data)

    @deprecated("Use `self.resources.load_named_value_file`", "0.1.0")
    def translate_namedvalues(self, name: str, delim: str = ','):
        """
        Deprecated method for translating a name/value file.
        use self.resources.load_named_value_filetext, data) instead
        """
        return self.resources.load_named_value_file(name, delim)

    @deprecated("Use `self.resources.load_list_file`", "0.1.0")
    def translate_list(self, list_name: str, data: Optional[dict] = None):
        """
        Deprecated method for translating a list.
        use self.resources.load_list_file(text, data) instead
        """
        return self.resources.load_list_file(list_name, data)

    @deprecated("Use `self.resources.load_template_file`", "0.1.0")
    def translate_template(self, template_name: str,
                           data: Optional[dict] = None):
        """
        Deprecated method for translating a template file
        use self.resources.template_file(text, data) instead
        """
        return self.resources.load_template_file(template_name, data)

    @deprecated("Use `activate`", "0.1.0")
    def make_active(self):
        """
        Bump skill to active_skill list in intent_service.

        This enables converse method to be called even without skill being
        used in last 5 minutes.

        deprecated: use self.activate() instead
        """
        self.activate()
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