← Back
Editing: tree.cpython-311.pyc
� ̑�a? � � � d dl mZmZ d dlmZmZmZmZ d dlm Z ddde ddfd �Z G d � d� � Z G d� de� � Z G d � de � � Z G d� de� � Z G d� de� � Z G d� de� � Z G d� de � � ZdS )� )�abstractmethod�abstractproperty)�List�Optional�Tuple�Union)�split_lines�node� NodeOrLeaf� node_types�return�Optional[BaseNode]c �@ � | j }|�|j |v r|S |j }|�dS )an Recursively looks at the parents of a node and returns the first found node that matches ``node_types``. Returns ``None`` if no matching node is found. This function is deprecated, use :meth:`NodeOrLeaf.search_ancestor` instead. :param node: The ancestors of this node will be checked. :param node_types: type names that are searched for. N��parent�type)r r �ns �,/usr/lib/python3/dist-packages/parso/tree.py�search_ancestorr s7 � � ��A� �-��6�Z����H� �H�� �-� �4� c �B � e Zd ZU dZdZeed<