pyconfs/writers/ini.py
def _as_str(key: str, entry: Any) -> Dict[str, str]:
    """Convert an entry to a string"""
    if isinstance(entry, dict):
        values = {}
        for subkey, subentry in entry.items():
            values.update(_as_str(f"{key}__{subkey}", subentry))
        return values
    elif isinstance(entry, list):
        return {key: ", ".join(str(item) for item in entry)}
    else:
        return {key: str(entry)}
Convert an entry to a string
Convert an entry to a string
Convert an entry to a string
def _as_str(key: str, entry: Any) -> Dict[str, str]:
    if isinstance(entry, dict):
        values = {}
        for subkey, subentry in entry.items():
            values.update(_as_str(f"{key}__{subkey}", subentry))
        return values
    elif isinstance(entry, list):
        return {key: ", ".join(str(item) for item in entry)}
    else:
        return {key: str(entry)}
def _as_str ( key : str , entry : Any ) -> Dict [ str , str ] : if isinstance ( entry , dict ) : values = { } for subkey , subentry in entry . items ( ) : values . update ( _as_str ( f"{key}__{subkey}" , subentry ) ) return values elif isinstance ( entry , list ) : return { key : ", " . join ( str ( item ) for item in entry ) } else : return { key : str ( entry ) }
Convert an entry to a string
Convert an entry to a string
"""Convert an entry to a string"""
key
str
entry
Any