pyconfs/readers/ini.py
def _convert_types(entries: Dict[str, str]) -> Dict[str, Any]:
    """Convert values inside entries dictionary based on type information

    Ini-files by default does not support type information (everything is a
    string) Add possibility to specify types using a special :-syntax (see
    _TYPE_SUFFIX)
    """
    for key, value in entries.copy().items():
        # Recursively convert types in subdictionaries
        if isinstance(value, dict):
            _convert_types(value)
            continue

        # Find type information
        if not key.endswith(_TYPE_SUFFIX):
            continue
        master = key.partition(_TYPE_SUFFIX)[0]
        if master not in entries:
            continue

        # Convert entry to the given type
        entries[master] = _converters.convert(f"to_{value}", value=entries[master])
        del entries[key]

    return entries
Convert values inside entries dictionary based on type information

    Ini-files by default does not support type information (everything is a
    string) Add possibility to specify types using a special :-syntax (see
    _TYPE_SUFFIX)
    
Convert values inside entries dictionary based on type information
Ini-files by default does not support type information (everything is a
string) Add possibility to specify types using a special :-syntax (see
_TYPE_SUFFIX)
Convert values inside entries dictionary based on type information Ini - files by default does not support type information ( everything is a string ) Add possibility to specify types using a special : - syntax ( see _TYPE_SUFFIX )
def _convert_types(entries: Dict[str, str]) -> Dict[str, Any]:
    for key, value in entries.copy().items():
        if isinstance(value, dict):
            _convert_types(value)
            continue
        if not key.endswith(_TYPE_SUFFIX):
            continue
        master = key.partition(_TYPE_SUFFIX)[0]
        if master not in entries:
            continue
        entries[master] = _converters.convert(f"to_{value}", value=entries[master])
        del entries[key]
    return entries
def _convert_types ( entries : Dict [ str , str ] ) -> Dict [ str , Any ] : for key , value in entries . copy ( ) . items ( ) : if isinstance ( value , dict ) : _convert_types ( value ) continue if not key . endswith ( _TYPE_SUFFIX ) : continue master = key . partition ( _TYPE_SUFFIX ) [ 0 ] if master not in entries : continue entries [ master ] = _converters . convert ( f"to_{value}" , value = entries [ master ] ) del entries [ key ] return entries
Convert values inside entries dictionary based on type information
Ini-files by default does not support type information (everything is a
string) Add possibility to specify types using a special :-syntax (see
_TYPE_SUFFIX)
Convert values inside entries dictionary based on type information Ini - files by default does not support type information ( everything is a string ) Add possibility to specify types using a special : - syntax ( see _TYPE_SUFFIX )
"""Convert values inside entries dictionary based on type information

    Ini-files by default does not support type information (everything is a
    string) Add possibility to specify types using a special :-syntax (see
    _TYPE_SUFFIX)
    """ # Recursively convert types in subdictionaries # Find type information # Convert entry to the given type
entries
Dict[str, str]