관리-도구
편집 파일: brain_functools.cpython-311.pyc
� �܋fb � �� � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m Z mZmZm Z mZmZ ddlmZ ddlmZmZ dd lmZ dd lmZ ddlmZ ddlmZmZmZmZ dd l m!Z! ddl"m#Z# dZ$ G d� dej% � � Z&d!d"d�Z' d!d#d�Z(d$d�Z)d$d�Z* ee*d� � � Z+ e� � �, e!e'e)� � e� � �, e ee(� � e+� � dS )%z9Astroid hooks for understanding functools library module.� )�annotations)�Iterator)�partial)�chain)�BoundMethod� arguments�extract_node�helpers�nodes�objects)�InferenceContext)�InferenceError�UseInferenceDefault)� inference_tip)�objectmodel)�AstroidManager)� AssignName� Attribute�Call�Name)�FunctionDef)�UninferableBasezfunctools.lru_cachec �T � e Zd ZdZed� � � Zed� � � Zed� � � ZdS )�LruWrappedModelz�Special attribute model for functions decorated with functools.lru_cache. The said decorators patches at decoration time some functions onto the decorated function. c � � | j S �N)� _instance)�selfs �n/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/astroid/brain/brain_functools.py�attr___wrapped__z LruWrappedModel.attr___wrapped__! s � ��~�� c �z �� t d� � � G �fd�dt � � } || j | j �� � S )NzQ from functools import _CacheInfo _CacheInfo(0, 0, 0, 0) c � �� e Zd Z dd� fd� ZdS )�=LruWrappedModel.attr_cache_info.<locals>.CacheInfoBoundMethodN�context�InferenceContext | Nonec 3 �8 �K � t j �� � V � d S r )r � safe_infer)r �callerr% � cache_infos �r �infer_call_resultzOLruWrappedModel.attr_cache_info.<locals>.CacheInfoBoundMethod.infer_call_result/ s&