관리-도구
편집 파일: non_ascii_names.cpython-311.pyc
� �܋f� � �x � d Z ddlmZ ddlmZ ddlmZmZmZ ddl m Z mZ dZ G d� de j � � Zdd �ZdS )a All alphanumeric unicode character are allowed in Python but due to similarities in how they look they can be confused. See: https://peps.python.org/pep-0672/#confusing-features The following checkers are intended to make users are aware of these issues. � )�annotations)�nodes)� constants� interfaces�lint)�base_checker�utilsac Used when the name contains at least one non-ASCII unicode character. See https://peps.python.org/pep-0672/#confusing-features for a background why this could be bad. If your programming guideline defines that you are programming in English, then there should be no need for non ASCII characters in Python Names. If not you can simply disable this check.c �� � e Zd ZdZddeddgifdddefd �Zd Zd(d�Z ej dd� � d)d�� � Z ej d� � d*d�� � ZeZ ej d� � d+d�� � Z ej d� � d,d�� � Z ej d� � d-d�� � Zd.d �Z ej dd� � d/d"�� � Z ej dd� � d0d$�� � Z ej d� � d1d&�� � Zd'S )2�NonAsciiNameCheckerz�A strict name checker only allowing ASCII. Note: This check only checks Names, so it ignores the content of docstrings and comments! zB%s name "%s" contains a non-ASCII character, consider renaming it.�non-ascii-name� old_names)�C0144zold-non-ascii-name)z,%s name "%s" contains a non-ASCII character.�non-ascii-file-namez�Under python 3.5, PEP 3131 allows non-ascii identifiers, but not non-ascii file names.Since Python 3.5, even though Python supports UTF-8 files, some editors or tools don't.zP%s name "%s" contains a non-ASCII character, use an ASCII-only alias for import.�non-ascii-module-import)�C2401�W2402�C2403zNonASCII-Checker� node_type�str�name� str | None�node�nodes.NodeNG�return�Nonec � � |�dS t |� � � � � s`t j | }|� � � |f}d}|dk rd}n|dk rd}| � |||t j �� � dS dS )z3Check whether a name is using non-ASCII characters.Nr �filer �moduler )r �args� confidence)r �isasciir �HUMAN_READABLE_TYPES� capitalize�add_messager �HIGH)�selfr r r � type_labelr �msgs �p/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pylint/checkers/non_ascii_names.py�_check_namezNonAsciiNameChecker._check_nameB s� � � �<��F��4�y�y� � �"�"� T�"�7� �B�J��)�)�+�+�T�2�D�"�C� �F�"�"�+����h�&�&�/�����S�t�$�:�?��S�S�S�S�S� T� T� r �nodes.Modulec �p � | � d|j � d� � d |� � d S )Nr �.���)r* r �split�r&