U
    a                     @   s(   d dl Z ddlmZ eedddZdS )    N   )ModuleAware)thingreturnc                 C   sP   t j| j j}|dg }t|ts6tdt| | j	|krL|
| j	 | S )aV  Remove names from __all__

    This decorator documents private names and ensures that the names do not
    appear in the module's __all__.

    :param thing: An object with both a __module__ and a __name__ argument.
    :return: The original `thing` object.
    :raises ValueError: When this function finds a non-list __all__ attribute.
    __all__z__all__ must be a list not: )sysmodules
__module____dict__
setdefault
isinstancelist
ValueErrortype__name__remove)r   ZmdictZ
dunder_all r   a/mounts/lovelace/software/anaconda3/envs/rescript-2/lib/python3.8/site-packages/public/private.pyprivate   s    


r   )r   typesr   r   r   r   r   r   <module>   s   