
    ^hN                     N    S SK r S SKrS SKJrJrJr  S SKJr  SqSq	S r
S rS rg)    N)QtCoreQtGuienum_helper)get_ipythonFc                 h    [        U S5      (       a  U R                  5         g U R                  5         g )Nexec)hasattrr   exec_)objs    [/home/james-whalen/.local/lib/python3.13/site-packages/IPython/terminal/pt_inputhooks/qt.py_execr      s    #v&&CHHJCIIK    c                  J    [        5       n U b  U R                  [        l        g g N)r   
excepthooksys)shells    r   _reclaim_excepthookr      s!    ME)) r   c                   ^ [         R                  R                  5       nU(       Gd6  [        R                  S:X  ak  [
        R                  R                  S5      (       dG  [
        R                  R                  S5      (       d#  SS Kn[        (       d  Sq	UR                  S5        g  [         R                  R                  [         R                  R                  5         [         R                  R!                  [         R                  R"                  R$                  5        [&        R                  " S/5      =qn[         R*                  R-                  S[.        5        [         R0                  " U5      m[        R                  S:X  a  [         R*                  " 5       nUR2                  R5                  TR6                  5        U R9                  5       (       dC  UR;                  S	5        [=        T5        UR?                  5         U R9                  5       (       d  MC  O[         R@                  " U RC                  5       [E        S
5      RF                  5      n URH                  R5                  U4S j5        URK                  S5        U R9                  5       (       d  [=        T5        URK                  S5        TRM                  S 5        g ! [         a     GNf = f! [         a     GNf = f! URK                  S5        f = f)NlinuxDISPLAYWAYLAND_DISPLAYr   TzThe DISPLAY or WAYLAND_DISPLAY environment variable is not set or empty and Qt5 requires this environment variable. Deactivate Qt5 code. win322   zQtCore.QSocketNotifier.Typec                  $   > T R                  5       $ r   )exit)
event_loops   r   <lambda>inputhook.<locals>.<lambda>P   s    z/@r   F)'r   QCoreApplicationinstancer   platformosenvirongetwarnings_already_warnedwarnQApplicationsetAttributeQtAA_EnableHighDpiScalingAttributeError#setHighDpiScaleFactorRoundingPolicy HighDpiScaleFactorRoundingPolicyPassThroughr   _apprefQTimer
singleShotr   
QEventLooptimeoutconnectquitinput_is_readystartr   stopQSocketNotifierfilenor   Read	activated
setEnabled	setParent)contextappr'   timernotifierr   s        @r   	inputhookrF      s.   

!
!
*
*
,C<<7"::>>),,JJNN+<==&&*OMM9
 	,,VYY-N-NO	CC		::FF
 **C511# 	  $78""3'J
||w joo.((**KKO*JJL	 ((** ))NNk*GHMM

	' &&'@A%))++j!& a  		  		L &s2   (7K  AK AK) 
KK
K&%K&)K<)r   r$   IPython.external.qt_for_kernelr   r   r   IPythonr   r2   r(   r   r   rF    r   r   <module>rJ      s0    
 	 E E  8
*Cr   