Format: application/x-python-code
1 o
2
3 �h� � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m
4 Z
5 ddlmZ ddl
6 mZ d d
7 � Zdd� Zd
8 d� Zdd� Zdd� Zdd� ZdS )a�
9 Searching for names with given scope and name. This is very central in Jedi and
10 Python. The name resolution is quite complicated with descripter,
11 ``__getattribute__``, ``__getattr__``, ``global``, etc.
12
13 If you want to understand name resolution, please read the first few chapters
14 in http://blog.ionelmc.ro/2015/02/09/understanding-python-metaclasses/.
15
16 Flow checks
17 +++++++++++
18
19 Flow checks are not really mature. There's only a check for ``isinstance``. It
20 would check whether a flow has the form of ``if isinstance(a, type_or_tuple)``.
21 Unfortunately every other thing is being ignored (e.g. a == '' would be easy to
22 check for -> a is a string). There's big potential in these checks.
23 � )�search_ancestor)�Name)�settings)�
24 TreeArguments)�iterable)� NO_VALUES)�is_scopec C s@ t |t�r|jn|}g }| D ]}|�|�}|r nqtt|��S )zh
25 Searches names that are defined in a scope (the different
26 ``filters``), until a name fits.
27 )�
28 isinstancer �value�get�list�_remove_del_stmt)�filtersZname_or_strZstring_name�names�filter� r �Kc:\Users\shubh\Videos\agent\nova\Lib\site-packages\jedi/inference/finder.py�filter_name s
29 �r c c s>