
    Yi
                     z    S r SSKJr  SSKJr  SSKJr  SSKJr  \" \	5      r
S\\   S\S\4S	 jrS\S\S\4S
 jrg)aE  This module contains helper functions related to inspecting the program stack.

.. versionadded:: 20.0

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.
    )Path)	FrameType)Optional)
get_loggerframecallerreturnc                 x    U c  g [        X5      $ ! [         a  n[        R                  SUS9   SnAgSnAff = f)a  Checks if the passed frame was called by the specified file.

Example:
    .. code:: pycon

        >>> was_called_by(inspect.currentframe(), Path(__file__))
        True

Arguments:
    frame (:obj:`FrameType`): The frame - usually the return value of
        ``inspect.currentframe()``. If :obj:`None` is passed, the return value will be
        :obj:`False`.
    caller (:obj:`pathlib.Path`): File that should be the caller.

Returns:
    :obj:`bool`: Whether the frame was called by the specified file.
NFzJFailed to check if frame was called by `caller`. Assuming that it was not.)exc_info)_was_called_by	Exception_LOGGERdebug)r   r   excs      D/app/.venv/lib/python3.13/site-packages/telegram/ext/_utils/stack.pywas_called_byr   %   sH    $ }e,, X 	 	
 s   
 
949c                 ,   [        U R                  R                  5      R                  5       U:X  a  gU R                  (       aQ  U R                  n [        U R                  R                  5      R                  5       U:X  a  gU R                  (       a  MQ  g)NTF)r   f_codeco_filenameresolvef_back)r   r   s     r   r   r   D   sh    ELL$$%--/69
,,(()113v= ,,,     N)__doc__pathlibr   typesr   typingr   telegram._utils.loggingr   __name__r   boolr   r    r   r   <module>r!      s[   &    .
X
), d t >) T d r   