| Server IP : 35.80.110.71 / Your IP : 216.73.216.170 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/IPython/core/__pycache__/ |
Upload File : |
�
}�e�r � � � d Z ddlZddlmZmZ ddlZddlZddlZddlm Z m
Z
mZmZ ddl
Z
ddlmZ ej d� Zd� Zd� Z G d � d
� Z e ej d� ej d� �
� Z e ej dej, � � Zd� Zdee fd�Zdefd�Zde
eef defd�Z G d� d� Z G d� de� Z G d� de� ZdZ dZ!dZ"d Z#d!Z$d"Z%d#Z&d$Z'd%Z(h d&�Z)dd hZ*d'� Z+d(� Z,d)� Z-d*� Z.d+� Z/d,� Z0d-� Z1e d.jd e!d/jd e"e,e#e-e$e.e&e/e'e0e(e1iZ3 G d0� d1e� Z4 ej d2ej, � Z5 G d3� d4e� Z6d5e e7 fd6�Z8d7e ejr fd8�Z:d9e7fd:�Z;d;Z< G d<� d=� Z=d>� Z> G d?� d@e� Z? G dA� dBe� Z@ej� ZB e@eB�C� ZCy)Da5 Input transformer machinery to support IPython special syntax.
This includes the machinery to recognise and transform ``%magic`` commands,
``!system`` commands, ``help?`` querying, prompt stripping, and so forth.
Added: IPython 7.0. Replaces inputsplitter and inputtransformer which were
deprecated in 7.0.
� N)�CommandCompiler�Compile)�List�Tuple�Optional�Any)� tokenutilz^[ \t]+c �h � | s| S t | � D ] \ }}|s� |j � r�| |d c S | S )zyRemove leading empty lines
If the leading lines are empty or contain only whitespace, they will be
removed.
N)� enumerate�isspace)�lines�i�lines �@/usr/lib/python3/dist-packages/IPython/core/inputtransformer2.py�leading_empty_linesr sB � � ����U�#� ���4���������9��� �L� c �� � | s| S t j | d � }|s| S |j d� }t |� }| D �cg c] }|j |� r||d n|�� c}S c c}w )z�Remove leading indentation.
If the first line starts with a spaces or tabs, the same whitespace will be
removed from each following line in the cell.
r N)�
_indent_re�match�group�len�
startswith)r
�m�space�n�ls r �leading_indentr &