Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/pylint/checkers/base/__pycache__/docstring_checker.cpython-39.pyc
Ðазад
a n�hj � @ s� d Z ddlmZ ddlZddlmZ ddlZddlmZ ddlm Z ddl mZ ddlm Z dd lmZmZmZ e�d �Zddd �dd�ZG dd� de �ZdS )z)Docstring checker from the basic checker.� )�annotationsN)�Literal)�nodes)� interfaces)�utils)� _BasicChecker)�is_overload_stub�is_property_deleter�is_property_setterz^_�1nodes.Module | nodes.ClassDef | nodes.FunctionDefz str | None��node�returnc C sN z| d }W n t y Y d S 0 t�|�}|s4d S t|tj�sDd S t|j�S )N�__doc__)�KeyErrorr � safe_infer� isinstancer ZConst�str�value)r � docstring� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/pylint/checkers/base/docstring_checker.py�_infer_dunder_doc_attribute s r c @ s� e Zd Zdddddgifddddd gifd dddd gifd dddd gifd�Zdedddd�fdddddd�ffZdd�dd�Ze�dd�ddd �d!d"��Z e�dd�d#dd �d$d%��Z e�dd�d&dd �d'd(��ZeZd)e jfd*d+d,d-dd.�d/d0�Zd1S )2�DocStringCheckerzEmpty %s docstring�empty-docstringz^Used when a module, function, class or method has an empty docstring (it would be too easy ;).Z old_names)ZW0132zold-empty-docstringzMissing module docstring�missing-module-docstringzNUsed when a module has no docstring. Empty modules do not require a docstring.)ZC0111zmissing-docstringzMissing class docstring�missing-class-docstringzNUsed when a class has no docstring. Even an empty class must have a docstring.z$Missing function or method docstring�missing-function-docstringzoUsed when a function or method has no docstring. Some special methods like __init__ do not require a docstring.)ZC0112ZC0114ZC0115ZC0116zno-docstring-rgx�regexpz<regexp>zcRegular expression which should only match function or class names that do not require a docstring.)�default�type�metavar�helpzdocstring-min-length����intz<int>z[Minimum line length for functions/classes that require docstrings, shorter ones are exempt.�None)r c C s | j j�� d S )N)�linter�statsZreset_undocumented)�selfr r r �openg s zDocStringChecker.openznodes.Moduler c C s | � d|� d S )N�module)�_check_docstring�r( r r r r �visit_modulej s zDocStringChecker.visit_moduleznodes.ClassDefc C s&