
    hx                    F   S SK Jr  S SKJr  \(       a  S SKJrJr   " S S\5      r " S S\	5      r
 " S S	\
\5      r " S
 S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\\5      r " S S\5      r " S S\5      r " S S\5      rg)    )annotations)TYPE_CHECKING)
CollectionIterablec                      \ rS rSrSrSrg)NarwhalsError	   z'Base class for all Narwhals exceptions. N__name__
__module____qualname____firstlineno____doc____static_attributes__r
       fC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\narwhals/exceptions.pyr   r   	   s    1r   r   c                  ,    \ rS rSrSrSS jrSS jrSrg)	FormattedKeyError   a#  KeyError with formatted error message.

Python's `KeyError` has special casing around formatting
(see https://bugs.python.org/issue2651). Use this class when the error
message has newlines and other special format characters.
Needed by https://github.com/tensorflow/tensorflow/issues/36857.
c                    Xl         g Nmessage)selfr   s     r   __init__FormattedKeyError.__init__   s    r   c                    U R                   $ r   r   )r   s    r   __str__FormattedKeyError.__str__   s    ||r   r   Nr   strreturnNone)r#   r"   )r   r   r   r   r   r   r   r   r
   r   r   r   r      s    r   r   c                  l   ^  \ rS rSrSrSU 4S jjr\      SS j5       r\    S	S j5       rSr	U =r
$ )
ColumnNotFoundError   z0Exception raised when column name isn't present.c                D   > Xl         [        TU ]	  U R                   5        g r   r   superr   r   r   	__class__s     r   r   ColumnNotFoundError.__init__        &r   c               N    S[        U5       S[        U5       S3n[        U5      $ )Nz&The following columns were not found: z+

Hint: Did you mean one of these columns: ?)sortedlistr&   )clsmissing_columnsavailable_columnsr   s       r   'from_missing_and_available_column_names;ColumnNotFoundError.from_missing_and_available_column_names$   s:    
 5VO5L4M;DAR<S;TTUW 	 #7++r   c                6    S[        U5       S3n[        U5      $ )NzOThe selected columns were not found.

Hint: Did you mean one of these columns: r0   )r2   r&   )r3   r5   r   s      r   from_available_column_names/ColumnNotFoundError.from_available_column_names.   s.    
<<@AR<S;TTUW 	 #7++r   r   r!   )r4   zIterable[str]r5   Collection[str]r#   r&   )r5   r;   r#   r&   )r   r   r   r   r   r   classmethodr6   r9   r   __classcell__r,   s   @r   r&   r&      s[    :' ,+,@O,	, , , /,	, ,r   r&   c                      \ rS rSrSrSrg)ComputeError9   zHException raised when the underlying computation could not be evaluated.r
   Nr   r
   r   r   r@   r@   9   s    Rr   r@   c                      \ rS rSrSrSrg)
ShapeError=   z_Exception raised when trying to perform operations on data structures with incompatible shapes.r
   Nr   r
   r   r   rC   rC   =       ir   rC   c                      \ rS rSrSrSrg)MultiOutputExpressionErrorA   zKException raised when using multi-output expression in unsupported context.r
   Nr   r
   r   r   rG   rG   A   s    Ur   rG   c                      \ rS rSrSrSrg)DuplicateErrorE   z6Exception when duplicate column names are encountered.r
   Nr   r
   r   r   rJ   rJ   E   s    @r   rJ   c                      \ rS rSrSrSrg)InvalidOperationErrorI   z+Exception raised during invalid operations.r
   Nr   r
   r   r   rM   rM   I   s    5r   rM   c                  D   ^  \ rS rSrSrSU 4S jjr\SS j5       rSrU =r	$ )InvalidIntoExprErrorM   z>Exception raised when object can't be converted to expression.c                D   > Xl         [        TU ]	  U R                   5        g r   r)   r+   s     r   r   InvalidIntoExprError.__init__P   r.   r   c                $    SU S3n[        U5      $ )NzBExpected an object which can be converted into an expression, got a  

Hint:
- if you were trying to select a column which does not have a string
  column name, then you should explicitly use `nw.col`.
  For example, `df.select(nw.col(0))` if you have a column named `0`.
- if you were trying to create a new literal column, then you 
  should explicitly use `nw.lit`.
  For example, `df.select(nw.lit(0))` if you want to create a new
  column with literal value `0`.)rP   )r3   invalid_typer   s      r   from_invalid_type&InvalidIntoExprError.from_invalid_typeT   s+     QQ]P^ _/ / 	 $G,,r   r   r!   )r3   typerU   rX   r#   rP   )
r   r   r   r   r   r   r<   rV   r   r=   r>   s   @r   rP   rP   M   s    H' - -r   rP   c                      \ rS rSrSrSrg)UnsupportedDTypeErrord   z_Exception raised when trying to convert to a DType which is not supported by the given backend.r
   Nr   r
   r   r   rZ   rZ   d   rE   r   rZ   c                      \ rS rSrSrSrg)NarwhalsUnstableWarningh   zRWarning issued when a method or function is considered unstable in the stable api.r
   Nr   r
   r   r   r]   r]   h   s    \r   r]   c                      \ rS rSrSrg)PerformanceWarningl   r
   N)r   r   r   r   r   r
   r   r   r`   r`   l   s    3r   r`   N)
__future__r   typingr   collections.abcr   r   
ValueErrorr   KeyErrorr   r&   r@   rC   rG   rJ   rM   	TypeErrorrP   rZ   UserWarningr]   Warningr`   r
   r   r   <module>rj      s    "  42J 2  ,+] ,8S= Sj jV VA] A6M 6-9m -.jM j]k ] ' &r   