
    ^h                     V    S r SSKrSSKJr  \R                  " S5      r " S S\5      rg)z)Support for interactive macros in IPython    N)DEFAULT_ENCODINGz#\s*coding[:=]\s*([-\w.]+)c                   6    \ rS rSrSrS rS rS rS rS r	Sr
g	)
Macro   zSimple class to store the value of macros as strings.

Macro is just a callable that executes a string of IPython
input when called.
c                 V   / nSnUR                  5        HC  n[        R                  U5      nU(       a  UR                  S5      nM2  UR	                  U5        ME     SR                  U5      n[        U[        5      (       a  UR                  U=(       d    [        5      nUS-   U l
        g)z?store the macro value, as a single string which can be executedN   
)
splitlinescoding_declarationmatchgroupappendjoin
isinstancebytesdecoder   value)selfcodelinesenclinecoding_matchs         L/home/james-whalen/.local/lib/python3.13/site-packages/IPython/core/macro.py__init__Macro.__init__   s    OO%D-33D9L"((+T" & yydE"";;s6&67DD[
    c                     U R                   $ Nr   r   s    r   __str__Macro.__str__&   s    zzr   c                 2    S[        U R                  5      -  $ )NzIPython.macro.Macro(%s))reprr   r!   s    r   __repr__Macro.__repr__)   s    (4

+;;;r   c                     SU R                   0$ )z$needed for safe pickling via %store r   r    r!   s    r   __getstate__Macro.__getstate__,   s    $$r   c                     [        U[        5      (       a"  [        U R                  UR                  -   5      $ [        U[        5      (       a  [        U R                  U-   5      $ [        er   )r   r   r   str	TypeError)r   others     r   __add__Macro.__add__0   sM    eU##ekk122s##e+,,r   r    N)__name__
__module____qualname____firstlineno____doc__r   r"   r&   r)   r/   __static_attributes__ r   r   r   r      s     !<%r   r   )r5   reIPython.utils.encodingr   compiler   objectr   r7   r   r   <module>r<      s,    / 
 3ZZ => %F %r   