src/aoikhotkey/mediator.py
def sys_use_decide(uri, mod_uri_s_reloaded):
        """
        Decide whether use existing module or reload module for given URI.

        :param uri: Object URI.

        :param mod_uri_s_reloaded: List of module URIs that have been reloaded.

        :return: Whether use existing module.
        """
        # Get module URI from given object URI
        _, mod_uri, _ = uri_split(uri)

        # If the module URI starts with `aoikhotkey.`
        if mod_uri.startswith('aoikhotkey.'):
            # Set use existing module be True
            sys_use = True

        # If the module URI exists in the reloaded list
        elif mod_uri in mod_uri_s_reloaded:
            # Set use existing module be True
            sys_use = True

        # If the module URI not exists in the reloaded list
        else:
            # Set use existing module be False
            sys_use = False

            # Add the module URI to the reloaded list
            mod_uri_s_reloaded.append(mod_uri)

        # Return whether use existing module
        return sys_use

        Decide whether use existing module or reload module for given URI.

        :param uri: Object URI.

        :param mod_uri_s_reloaded: List of module URIs that have been reloaded.

        :return: Whether use existing module.
        
Decide whether use existing module or reload module for given URI.
Decide whether use existing module or reload module for given URI .
def sys_use_decide(uri, mod_uri_s_reloaded):
        _, mod_uri, _ = uri_split(uri)
        if mod_uri.startswith('aoikhotkey.'):
            sys_use = True
        elif mod_uri in mod_uri_s_reloaded:
            sys_use = True
        else:
            sys_use = False
            mod_uri_s_reloaded.append(mod_uri)
        return sys_use
def sys_use_decide ( uri , mod_uri_s_reloaded ) : _ , mod_uri , _ = uri_split ( uri ) if mod_uri . startswith ( 'aoikhotkey.' ) : sys_use = True elif mod_uri in mod_uri_s_reloaded : sys_use = True else : sys_use = False mod_uri_s_reloaded . append ( mod_uri ) return sys_use
Decide whether use existing module or reload module for given URI.
Decide whether use existing module or reload module for given URI .
"""
        Decide whether use existing module or reload module for given URI.

        :param uri: Object URI.

        :param mod_uri_s_reloaded: List of module URIs that have been reloaded.

        :return: Whether use existing module.
        """ # Get module URI from given object URI # If the module URI starts with `aoikhotkey.` # Set use existing module be True # If the module URI exists in the reloaded list # Set use existing module be True # If the module URI not exists in the reloaded list # Set use existing module be False # Add the module URI to the reloaded list # Return whether use existing module
Whether use existing module.
Whether use existing module .
uri
None
mod_uri_s_reloaded
List of module URIs that have been reloaded.
List of module URIs that have been reloaded .