Uname : Linux premium36.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Soft : LiteSpeed
Ip : 198.54.115.237
Port : 443
~
/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
pylint
/
extensions
/
__pycache__
[ HOME ]
Exec
Submit
dict_init_mutate.cpython-311.pyc
� � h? � � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m Z ddlmZ erddl mZ G d � d e� � Zdd�ZdS )z:Check for use of dictionary mutation after initialization.� )�annotations)� TYPE_CHECKING)�nodes)�BaseChecker)�only_required_for_messages)�HIGH)�PyLinterc �D � e Zd ZdZddiZ ed� � d d�� � Zd S )�DictInitMutateChecker�dict-init-mutate�C3401)z>Declare all known key/values when initializing the dictionary.r zXDictionaries can be initialized with a single statement using dictionary literal syntax.�node�nodes.Assign�return�Nonec �T � t |j t j � � sdS |j d }t |j � � dk st |t j � � sdS |� � � }|r2t |t j � � rt |j � � dk rdS |j d }t |t j � � sdS |j }t |t j � � sdS |j |j k r| � d|t �� � dS dS )z� Detect dictionary mutation immediately after initialization. At this time, detecting nested mutation is not supported. Nr � r )r � confidence)� isinstance�valuer �Dict�targets�len� AssignName�next_sibling�Assign� Subscript�Name�name�add_messager )�selfr � dict_name� first_sibling�sibling_target�sibling_names �s/builddir/build/BUILD/cloudlinux-venv-1.0.8/venv/lib/python3.11/site-packages/pylint/extensions/dict_init_mutate.py�visit_assignz"DictInitMutateChecker.visit_assign s! � � �$�*�e�j�1�1� ��F��L��O� ��t�|����!�!��I�u�?O�)P�)P�!��F��)�)�+�+� �� ��m�U�\�:�:� � �=�(�)�)�Q�.�.��F�&�.�q�1���.�%�/�:�:� ��F�%�+���,�� �3�3� ��F��� ��.�.����/�d�t��L�L�L�L�L� /�.� N)r r r r )�__name__� __module__�__qualname__r �msgsr r'