lazydata/config/config.py
def add_source(self, entry: dict, source_url: str) -> Dict[str, str]:
        """
        Make sure the source string is present.

        This function modifies the `entry` input parameter and only has side-effects.

        :param entry: The dict with the config file entry that needs to be modified
        :param source_url: The str with url to the source of file
        :return:
        """

        config_changed = False
        if "source_url" in entry:
            if entry["source_url"] != source_url:
                entry = self.add_file_entry(path=entry["path"], script_path=entry["usage"])
                config_changed = True
        else:
            entry["source_url"] = source_url
            config_changed = True
        if config_changed:
            self.save_config()
        return entry

        Make sure the source string is present.

        This function modifies the `entry` input parameter and only has side-effects.

        :param entry: The dict with the config file entry that needs to be modified
        :param source_url: The str with url to the source of file
        :return:
        
Make sure the source string is present.
This function modifies the `entry` input parameter and only has side-effects.
Make sure the source string is present . This function modifies the ` entry ` input parameter and only has side - effects .
def add_source(self, entry: dict, source_url: str) -> Dict[str, str]:
        config_changed = False
        if "source_url" in entry:
            if entry["source_url"] != source_url:
                entry = self.add_file_entry(path=entry["path"], script_path=entry["usage"])
                config_changed = True
        else:
            entry["source_url"] = source_url
            config_changed = True
        if config_changed:
            self.save_config()
        return entry
def add_source ( self , entry : dict , source_url : str ) -> Dict [ str , str ] : config_changed = False if "source_url" in entry : if entry [ "source_url" ] != source_url : entry = self . add_file_entry ( path = entry [ "path" ] , script_path = entry [ "usage" ] ) config_changed = True else : entry [ "source_url" ] = source_url config_changed = True if config_changed : self . save_config ( ) return entry
Make sure the source string is present.
Make sure the source string is present .
"""
        Make sure the source string is present.

        This function modifies the `entry` input parameter and only has side-effects.

        :param entry: The dict with the config file entry that needs to be modified
        :param source_url: The str with url to the source of file
        :return:
        """
None
self
entry
dict
The dict with the config file entry that needs to be modified
The dict with the config file entry that needs to be modified
source_url
str
The str with url to the source of file
The str with url to the source of file