mkdocs_table_reader_plugin/safe_eval.py
def parse_argkwarg(string: str):
    """
    Parses a string to detect both args and kwargs.
    
    Adapted code from 
    https://stackoverflow.com/questions/9305387/string-of-kwargs-to-kwargs

    Args:
        string (str): string with positional and keyword arguments
        
    Returns:
        args[List], kwargs[Dict]
    """

    argkwargs = re.split(r"(?<!\=)(?:,{1} )(?!\=)", string)

    args = []
    kwargs = []

    for i in argkwargs:
        i = i.strip()
        if "=" in i:
            kwargs.append(i)
        else:
            if len(kwargs) != 0:
                raise AssertionError(
                    "[table-reader-plugin] Make sure the python in your reader tag is correct: Positional arguments follow keyword arguments in '%s'"
                    % string
                )
            args.append(literal_eval(i))

    # kwargs as dict
    kwargs = [re.split(" ?= ?", x) for x in kwargs]
    kwargs = dict([(x[0], safe_eval(x[1])) for x in kwargs])

    return args, kwargs

    Parses a string to detect both args and kwargs.
    
    Adapted code from 
    https://stackoverflow.com/questions/9305387/string-of-kwargs-to-kwargs

    Args:
        string (str): string with positional and keyword arguments
        
    Returns:
        args[List], kwargs[Dict]
    
Parses a string to detect both args and kwargs.
Parses a string to detect both args and kwargs .
def parse_argkwarg(string: str):
    argkwargs = re.split(r"(?<!\=)(?:,{1} )(?!\=)", string)
    args = []
    kwargs = []
    for i in argkwargs:
        i = i.strip()
        if "=" in i:
            kwargs.append(i)
        else:
            if len(kwargs) != 0:
                raise AssertionError(
                    "[table-reader-plugin] Make sure the python in your reader tag is correct: Positional arguments follow keyword arguments in '%s'"
                    % string
                )
            args.append(literal_eval(i))
    kwargs = [re.split(" ?= ?", x) for x in kwargs]
    kwargs = dict([(x[0], safe_eval(x[1])) for x in kwargs])
    return args, kwargs
def parse_argkwarg ( string : str ) : argkwargs = re . split ( r"(?<!\=)(?:,{1} )(?!\=)" , string ) args = [ ] kwargs = [ ] for i in argkwargs : i = i . strip ( ) if "=" in i : kwargs . append ( i ) else : if len ( kwargs ) != 0 : raise AssertionError ( "[table-reader-plugin] Make sure the python in your reader tag is correct: Positional arguments follow keyword arguments in '%s'" % string ) args . append ( literal_eval ( i ) ) kwargs = [ re . split ( " ?= ?" , x ) for x in kwargs ] kwargs = dict ( [ ( x [ 0 ] , safe_eval ( x [ 1 ] ) ) for x in kwargs ] ) return args , kwargs
Parses a string to detect both args and kwargs.
Parses a string to detect both args and kwargs .
"""
    Parses a string to detect both args and kwargs.
    
    Adapted code from 
    https://stackoverflow.com/questions/9305387/string-of-kwargs-to-kwargs

    Args:
        string (str): string with positional and keyword arguments
        
    Returns:
        args[List], kwargs[Dict]
    """ # kwargs as dict
None
string
str
string with positional and keyword arguments
string with positional and keyword arguments