sltxpkg/dep.py
def detect_driver(idx: str, url: str) -> str:
    """Tries to match the given patterns to [description]
    This could be optimized by pre-compile the given patterns.

    Args:
        idx (str): the current index number for logging
        url (str): the url to adapt the driver from

    Returns:
        (str): The driver key to use
    """
    print_idx(idx, " - Auto-detecting driver...")
    for key, patterns in sg.configuration[C_DRIVER_PATTERNS].items():
        for pattern in patterns:
            if re.search(pattern, url):
                return key
    print_idx(idx, " ! No driver found...")
    sys.exit(1)
Tries to match the given patterns to [description]
    This could be optimized by pre-compile the given patterns.

    Args:
        idx (str): the current index number for logging
        url (str): the url to adapt the driver from

    Returns:
        (str): The driver key to use
    
Tries to match the given patterns to [description]
This could be optimized by pre-compile the given patterns.
Tries to match the given patterns to [ description ] This could be optimized by pre - compile the given patterns .
def detect_driver(idx: str, url: str) -> str:
    print_idx(idx, " - Auto-detecting driver...")
    for key, patterns in sg.configuration[C_DRIVER_PATTERNS].items():
        for pattern in patterns:
            if re.search(pattern, url):
                return key
    print_idx(idx, " ! No driver found...")
    sys.exit(1)
def detect_driver ( idx : str , url : str ) -> str : print_idx ( idx , " - Auto-detecting driver..." ) for key , patterns in sg . configuration [ C_DRIVER_PATTERNS ] . items ( ) : for pattern in patterns : if re . search ( pattern , url ) : return key print_idx ( idx , " ! No driver found..." ) sys . exit ( 1 )
Tries to match the given patterns to [description]
This could be optimized by pre-compile the given patterns.
Tries to match the given patterns to [ description ] This could be optimized by pre - compile the given patterns .
"""Tries to match the given patterns to [description]
    This could be optimized by pre-compile the given patterns.

    Args:
        idx (str): the current index number for logging
        url (str): the url to adapt the driver from

    Returns:
        (str): The driver key to use
    """
The driver key to use
The driver key to use
(str)
idx
str
the current index number for logging
the current index number for logging
url
str
the url to adapt the driver from
the url to adapt the driver from