U
    g	                     @   s~   d Z ddlmZmZmZmZ ddlmZ ddlm	Z	 edZ
eee
  ee
df ddd	Zee e	e e	e d
ddZdS )a:  This module contains helper functions related to parsing arguments for classes and methods.

Warning:
    Contents of this module are intended to be used internally by the library and *not* by the
    user. Changes to this module are not considered breaking changes and may not be documented in
    the changelog.
    )OptionalSequenceTupleTypeVar)LinkPreviewOptions)ODVInputT.)argreturnc                 C   s   | rt | S dS )zParses an optional sequence into a tuple

    Args:
        arg (:obj:`Sequence`): The sequence to parse.

    Returns:
        :obj:`Tuple`: The sequence converted to a tuple or an empty tuple.
     )tuple)r	   r   r   C/tmp/pip-unpacked-wheel-swnnwir2/telegram/_utils/argumentparsing.pyparse_sequence_arg"   s    	r   )disable_web_page_previewlink_preview_optionsr
   c                 C   s&   | r|rt d| dk	r"t| d}|S )zWrapper around warn_about_deprecated_arg_return_new_arg. Takes care of converting
    disable_web_page_preview to LinkPreviewOptions.
    zXParameters `disable_web_page_preview` and `link_preview_options` are mutually exclusive.N)Zis_disabled)
ValueErrorr   )r   r   r   r   r   parse_lpo_and_dwpp.   s    
r   N)__doc__typingr   r   r   r   Ztelegram._linkpreviewoptionsr   Ztelegram._utils.typesr   r   r   boolr   r   r   r   r   <module>   s     