dF-iC, d dl mZ d dlmZ d dlmZmZ d dlmZ d dl m Z d dlmZ d dl mZ d dlmZ erd d lmZ G d de ZddZdS ) )annotations) TYPE_CHECKING)Instancenodes)UninferableBase)BaseChecker) safe_infer)DUNDER_METHODS)HIGH)PyLinterc N e Zd ZdZdZdZddiZdZdd Ze dd Z ddZdS )DunderCallCheckera Check for unnecessary dunder method calls. Docs: https://docs.python.org/3/reference/datamodel.html#basic-customization We exclude names in list pylint.constants.EXTRA_DUNDER_METHODS such as __index__ (see https://github.com/PyCQA/pylint/issues/6795) since these either have no alternative method of being called or have a genuine use case for being called manually. Additionally, we exclude classes that are not instantiated since these might be used to access the dunder methods of a base class of an instance. We also exclude dunder method calls on super() since these can't be written in an alternative manner. unnecessary-dunder-callC2801)z)Unnecessarily calls dunder method %s. %s.r ziUsed when a dunder method is manually called instead of using the corresponding function/method/operator. returnNonec i | _ t j D ]4\ }}|| j j j k r| j | 5d S N)_dunder_methodsr itemslinterconfig py_versionupdate)self since_versdunder_methodss p/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pylint/checkers/dunder_methods.pyopenzDunderCallChecker.open0 s\ /1*8*>*@*@ <