o
    ùT·jƒ
  ã                   @   s”   G d d„ de ƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd	„ d	eƒZG d
d„ deƒZG dd„ deƒZG dd„ deƒZ	G dd„ deƒZ
dS )c                       s   e Zd Zd‡ fdd„	Z‡  ZS )ÚYFExceptionÚ c                    s   t ƒ  |¡ d S ©N©ÚsuperÚ__init__)ÚselfÚdescription©Ú	__class__© úV/home/dinkstrade/pdmp-scanner/venv/lib/python3.10/site-packages/yfinance/exceptions.pyr      ó   zYFException.__init__)r   ©Ú__name__Ú
__module__Ú__qualname__r   Ú__classcell__r   r   r	   r   r      s    r   c                   @   s   e Zd ZdS )ÚYFDataExceptionN)r   r   r   r   r   r   r   r      s    r   c                       ó   e Zd Z‡ fdd„Z‡  ZS )ÚYFNotImplementedErrorc                    s   t ƒ  d|› d�¡ d S )NzHave not implemented fetching 'z' from Yahoo APIr   )r   Úmethod_namer	   r   r   r      s   zYFNotImplementedError.__init__r   r   r   r	   r   r   
   ó    r   c                       ó"   e Zd ZdZd‡ fdd„	Z‡  ZS )ÚYFTickerMissingErrorzóExpected ticker data is missing.

    By default the message speculates the ticker is delisted, because Yahoo
    rarely explains the absence. Pass possibly_delisted=False when the real
    cause is known, so the message does not mislead.
    Tc                    s8   |rdnd}t ƒ  d|› d|› |› �¡ || _|| _d S )Nzpossibly delisted; r   ú$z: )r   r   Ú	rationaleÚticker)r   r   r   Úpossibly_delistedÚprefixr	   r   r   r      s   
zYFTickerMissingError.__init__)T©r   r   r   Ú__doc__r   r   r   r   r	   r   r      s    r   c                       r   )ÚYFTzMissingErrorc                    ó   t ƒ  |d¡ d S )Nzno timezone foundr   ©r   r   r	   r   r   r      ó   zYFTzMissingError.__init__r   r   r   r	   r   r!      r   r!   c                       r   )ÚYFPricesMissingErroraµ  Yahoo returned no price data for the requested range/interval.

    When Yahoo states an explicit reason, pass it as yahoo_reason: that
    reason becomes the whole message and the speculative 'possibly delisted'
    prefix and generic 'no price data found' text are dropped, because Yahoo
    has already explained the absence. Otherwise the message reports the
    request context (debug_info) and keeps the delisting speculation.
    Nc                    s\   || _ || _|d urtƒ j||dd� d S |dkr%tƒ  |d|› �¡ d S tƒ  |d¡ d S )NF)r   r   zno price data found zno price data found)Ú
debug_infoÚyahoo_reasonr   r   )r   r   r&   r'   r	   r   r   r   +   s   zYFPricesMissingError.__init__r   r   r   r   r	   r   r%   "   s    r%   c                       r   )ÚYFEarningsDateMissingc                    r"   )Nzno earnings dates foundr   r#   r	   r   r   r   8   r$   zYFEarningsDateMissing.__init__r   r   r   r	   r   r(   6   s    r(   c                       r   )ÚYFInvalidPeriodErrorc                    s4   || _ || _|| _tƒ  | j › d|› d|› �¡ d S )Nz
: Period 'z' is invalid, must be one of: )r   Úinvalid_periodÚvalid_rangesr   r   )r   r   r*   r+   r	   r   r   r   =   s   ÿzYFInvalidPeriodError.__init__r   r   r   r	   r   r)   <   r   r)   c                       r   )ÚYFRateLimitErrorc                    s   t ƒ  d¡ d S )Nz3Too Many Requests. Rate limited. Try after a while.r   )r   r	   r   r   r   F   r   zYFRateLimitError.__init__r   r   r   r	   r   r,   E   r   r,   N)Ú	Exceptionr   r   ÚNotImplementedErrorr   r   r!   r%   r(   r)   r,   r   r   r   r   Ú<module>   s    	