| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/IPython/core/magics/__pycache__/ |
Upload File : |
�
�@�c. � � � d Z ddlZddlmZ ddlmZmZmZ ddlm Z ej
d� � Ze G d� de� � � � ZdS ) z9Implementation of configuration-related magic functions.
� N)�
UsageError)�Magics�magics_class�
line_magic)�errorz
^\w+\.\w+$c �4 � � e Zd Z� fd�Zed� � � Z� xZS )�ConfigMagicsc �f �� t t | � � � |� � g | _ d S �N)�superr �__init__�
configurables)�self�shell� __class__s ��</usr/lib/python3/dist-packages/IPython/core/magics/config.pyr
zConfigMagics.__init__ s/ �� �
�l�D�!�!�*�*�5�1�1�1������ c �L � ddl m} t t d� | j j D � � � � d� �� � }d� |D � � }|� � � }|s&t d� � |D ]}t d|� � �d S ||v r{||� |� � }|j }|�
|� � } t j t j
d
t j � � d| � � } t | � � d S t � |� � rA|� d� � \ }}
t% ||� |� � |
� � S d
|vrOd}|� � � }|D ]$}
||
� � � k r
|d|
z z } n�%t) ||z � � � |� � }t+ d|z | j j t/ � � � � |D ]>} |� |� � �# t2 $ r}t5 |� � Y d }~�7d }~ww xY wd S )a configure IPython
%config Class[.trait=value]
This magic exposes most of the IPython config system. Any
Configurable class should be able to be configured with the simple
line::
%config Class.trait=value
Where `value` will be resolved in the user's namespace, if it is an
expression or variable name.
Examples
--------
To see what classes are available for config, pass no arguments::
In [1]: %config
Available objects for config:
AliasManager
DisplayFormatter
HistoryManager
IPCompleter
LoggingMagics
MagicsManager
OSMagics
PrefilterManager
ScriptMagics
TerminalInteractiveShell
To view what is configurable on a given class, just pass the class
name::
In [2]: %config IPCompleter
IPCompleter(Completer) options
----------------------------
IPCompleter.backslash_combining_completions=<Bool>
Enable unicode completions, e.g. \alpha<tab> . Includes completion of latex
commands, unicode names, and expanding unicode characters back to latex
commands.
Current: True
IPCompleter.debug=<Bool>
Enable debug for the Completer. Mostly print extra information for
experimental jedi integration.
Current: False
IPCompleter.greedy=<Bool>
Activate greedy completion
PENDING DEPRECATION. this is now mostly taken care of with Jedi.
This will enable completion on elements of lists, results of function calls, etc.,
but can be unsafe because the code is actually evaluated on TAB.
Current: False
IPCompleter.jedi_compute_type_timeout=<Int>
Experimental: restrict time (in milliseconds) during which Jedi can compute types.
Set to 0 to stop computing types. Non-zero value lower than 100ms may hurt
performance by preventing jedi to build its cache.
Current: 400
IPCompleter.limit_to__all__=<Bool>
DEPRECATED as of version 5.0.
Instruct the completer to use __all__ for the completion
Specifically, when completing on ``object.<tab>``.
When True: only those names in obj.__all__ will be included.
When False [default]: the __all__ attribute is ignored
Current: False
IPCompleter.merge_completions=<Bool>
Whether to merge completion results into a single list
If False, only the completion results from the first non-empty
completer will be returned.
Current: True
IPCompleter.omit__names=<Enum>
Instruct the completer to omit private method names
Specifically, when completing on ``object.<tab>``.
When 2 [default]: all names that start with '_' will be excluded.
When 1: all 'magic' names (``__foo__``) will be excluded.
When 0: nothing will be excluded.
Choices: any of [0, 1, 2]
Current: 2
IPCompleter.profile_completions=<Bool>
If True, emit profiling data for completion subsystem using cProfile.
Current: False
IPCompleter.profiler_output_dir=<Unicode>
Template for path at which to output profile data for completions.
Current: '.completion_profiles'
IPCompleter.use_jedi=<Bool>
Experimental: Use Jedi to generate autocompletions. Default to True if jedi
is installed.
Current: True
but the real use is in setting values::
In [3]: %config IPCompleter.greedy = True
and these values are read from the user_ns if they are variables::
In [4]: feeling_greedy=False
In [5]: %config IPCompleter.greedy = feeling_greedy
r )�Configc �H � g | ]}|j � d �� � �|�� S )T)�config)r �class_traits��.0�cs r �
<listcomp>z'ConfigMagics.config.<locals>.<listcomp>� s? � � $'� $'� $'�1�()��(@�(@��(@�(M�(M�$'�Q� $'� $'� $'r c � � | j j S r �r �__name__)�xs r �<lambda>z%ConfigMagics.config.<locals>.<lambda>� s � �q�{�7K� r )�keyc �&