Format: application/x-python-code
1 o
2
3 ��hm
4 � @ sv d Z ddlZddlZddlZddlZddlmZ ddlmZ G dd� de �Z
5 G dd � d ejj�Z
6 G d
7 d� dej�ZdS )z%A shim module for deprecated imports
8 � N)�
9 import_module� )�import_itemc @ s e Zd ZdZdS )�ShimWarningzFA warning to show when a module has moved, and a shim is in its place.N)�__name__�
10 __module__�__qualname__�__doc__� r
11 r
12 �Nc:\Users\shubh\Videos\agent\nova\Lib\site-packages\IPython/utils/shimmodule.pyr s r c @ s* e Zd ZdZdd� Zdd� Zd dd�ZdS )
13 �ShimImporterz�Import hook for a shim.
14
15 This ensures that submodule imports return the real target module,
16 not a clone that will confuse `is` and `isinstance` checks.
17 c C s || _ || _d S �N��src�mirror)�selfr r r
18 r
19 r �__init__ s
20 zShimImporter.__init__c C s | j |t| j�d� S )z#get the name of the mirrored moduleN)r �lenr )r �fullnamer
21 r
22 r �_mirror_name s zShimImporter._mirror_nameNc C s* |� | jd �r| �|�}tj�|�S d S )N�.)�
23 startswithr r � importlib�util� find_spec)r r �path�targetZmirror_namer
24 r
25 r r "