| Server IP : 35.80.110.71 / Your IP : 216.73.216.52 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 : |
�
}�eqq � � � d Z ddlmZ ede� ddlZddlZddlZddlZddlZddl Z ddlZddl
mZmZm
Z
mZ ddlmZ ddlmZmZmZmZmZmZmZmZmZmZ ddlmZ dd lmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z' ejP d
jS g d�� � Z* ejP d� Z+ ejP d
� Z,d� Z-e j\ Z/e j\ dz Z0 G d� d� Z1 G d� d� Z2d� Z3de4fd�Z5d� Z6 ejP dejn � Z8 ejP dejn � Z9d� Z:d� Z;d� Z< G d� de=� Z> G d� d e>� Z?y)!a6 DEPRECATED: Input handling and transformation machinery.
This module was deprecated in IPython 7.0, in favour of inputtransformer2.
The first class in this module, :class:`InputSplitter`, is designed to tell when
input from a line-oriented frontend is complete and should be executed, and when
the user should be prompted for another line of code instead. The name 'input
splitter' is largely for historical reasons.
A companion, :class:`IPythonInputSplitter`, provides the same functionality but
with full support for the extended IPython syntax (magics, system calls, etc).
The code to actually do these transformations is in :mod:`IPython.core.inputtransformer`.
:class:`IPythonInputSplitter` feeds the raw code to the transformers in order
and stores the results.
For more details, see the class docstrings below.
� )�warnzeIPython.core.inputsplitter is deprecated since IPython 7 in favor of `IPython.core.inputtransformer2`N)�List�Tuple�Union�Optional)�CodeType)
�leading_indent�classic_prompt�
ipy_prompt� cellmagic�assemble_logical_lines�help_end�escaped_commands�assign_from_magic�assign_from_system�assemble_python_lines)� tokenutil)
� ESC_SHELL�
ESC_SH_CAP�ESC_HELP� ESC_HELP2� ESC_MAGIC�
ESC_MAGIC2� ESC_QUOTE�
ESC_QUOTE2� ESC_PAREN�
ESC_SEQUENCES�|)z^\s+raise(\s.*)?$z^\s+raise\([^\)]*\).*$z^\s+return(\s.*)?$z^\s+return\([^\)]*\).*$z^\s+pass\s*$z
^\s+break\s*$z^\s+continue\s*$z^([ \t\r\f\v]+)z^\s*\#c � � t j ddt �� t j | � }|r|j � S y)a Return the number of initial spaces in a string.
Note that tabs are counted as a single space. For now, we do *not* support
mixing of tabs and spaces in the user's input.
Parameters
----------
s : string
Returns
-------
n : int
z�`num_ini_spaces` is Pending Deprecation since IPython 8.17.It is considered fro removal in in future version. Please open an issue if you believe it should be kept.� )�
stacklevel�categoryr )�warningsr �PendingDeprecationWarning�
ini_spaces_re�match�end)�s�
ini_spacess �</usr/lib/python3/dist-packages/IPython/core/inputsplitter.py�num_ini_spacesr+ Q sC � �
�M�M� A� �*�� �$�$�Q�'�J���~�~���� � c � � e Zd ZexZZd� Zy)�IncompleteStringc �<