U
    lh                     @   s&   e ee d ddZdedddZdS )	)
dictionary
valid_keysreturnc                 C   s0   i }t |  D ]}||kr| |||< q|S )z[ remove and create new dict with key value pairs of dictionary, where key is in valid_keys )listkeyspop)r   r   Znew_dictionarykey r   [/tmp/pip-unpacked-wheel-ckatmccg/customtkinter/windows/widgets/utility/utility_functions.pypop_from_dict_by_set   s
    r
   F)r   c                 C   s6   t | dkr.|r(tt|   dq2dS ndS dS )zN returns True if kwargs are empty, False otherwise, raises error if not empty     zP are not supported arguments. Look at the documentation for supported arguments.TFN)len
ValueErrorr   r   )Zkwargs_dictZraise_errorr   r   r	   check_kwargs_empty   s
    r   N)F)dictsetr
   boolr   r   r   r   r	   <module>   s   