o
    GCh	                     @   s   d Z ddlmZ ddlmZmZ ddlmZ ddlm	Z	 edZ
deee
  dee
d	f fd
dZdee de	e de	e f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.
    )Sequence)OptionalTypeVar)LinkPreviewOptions)ODVInputTargreturn.c                 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
   X/var/www/html/govbot/env/lib/python3.10/site-packages/telegram/_utils/argumentparsing.pyparse_sequence_arg#   s   	r   disable_web_page_previewlink_preview_optionsc                 C   s&   | r|rt d| du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)is_disabled)
ValueErrorr   )r   r   r
   r
   r   parse_lpo_and_dwpp/   s   
r   N)__doc__collections.abcr   typingr   r   telegram._linkpreviewoptionsr   telegram._utils.typesr   r   r   r   boolr   r
   r
   r
   r   <module>   s   "