B
    ÔùÓ`~  ã               @   s.   d Z ddlZG dd„ dƒZG dd„ deƒZdS )z0Basic mixin classes for anyconfig.backend.**.*.
é    Nc               @   s@   e Zd ZU dZdZejeef ed< e	dd„ ƒZ
e	dd„ ƒZdS )	ÚTextFilesMixina  Mixin class to open configuration files as a plain text.

    Arguments of :func:`open` is different depends on python versions.

    - python 2: https://docs.python.org/2/library/functions.html#open
    - python 3: https://docs.python.org/3/library/functions.html#open
    )ÚrÚwÚ_open_flagsc             K   s   t || jd f|ŽS )zD
        :param filepath: Path to file to open to read data
        r   )Úopenr   )ÚclsÚfilepathÚkwargs© r
   úA/tmp/pip-unpacked-wheel-bpftjxoo/anyconfig/backend/base/mixins.pyÚropen   s    zTextFilesMixin.ropenc             K   s   t || jd f|ŽS )zH
        :param filepath: Path to file to open to write data to
        é   )r   r   )r   r   r	   r
   r
   r   Úwopen   s    zTextFilesMixin.wopenN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   ÚtypingZTupleÚstrÚ__annotations__Úclassmethodr   r   r
   r
   r
   r   r      s   
r   c               @   s   e Zd ZdZdZdS )ÚBinaryFilesMixinzBMixin class to open binary (byte string) configuration files.
    )ÚrbÚwbN)r   r   r   r   r   r
   r
   r
   r   r   $   s   r   )r   r   r   r   r
   r
   r
   r   Ú<module>   s   