Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/pylint/checkers/__pycache__/modified_iterating_checker.cpython-39.pyc
Ðазад
a n�hF � @ s� d dl mZ d dlmZ d dlmZ d dlmZmZ d dl m Z erPd dlmZ ddhZ h d �ZG d d� dej�Zdd d�dd�ZdS )� )�annotations)� TYPE_CHECKING)�nodes)�checkers� interfaces)�utils)�PyLinter�append�remove> �add�clear�popr �discardc @ s� e Zd ZdZdZdddd�ZdZe�dd d �ddd �dd��Z dddd�dd�Z dddd�dd�Zeddd �dd��Z eddddd�dd��Zeddd �d d!��Zdddd�d"d#�Zdddd�d$d%�Zdddd�d&d'�Zd(ddd�d)d*�Zd+S ),�ModifiedIterationCheckerz�Checks for modified iterators in for loops iterations. Currently supports `for` loops for Sets, Dictionaries and Lists. Zmodified_iteration)zkIterated list '%s' is being modified inside for loop body, consider iterating through a copy of it instead.�modified-iterating-listz�Emitted when items are added or removed to a list being iterated through. Doing so can result in unexpected behaviour, that is why it is preferred to use a copy of the list.)z`Iterated dict '%s' is being modified inside for loop body, iterate through a copy of it instead.�modified-iterating-dictziEmitted when items are added or removed to a dict being iterated through. Doing so raises a RuntimeError.)z_Iterated set '%s' is being modified inside for loop body, iterate through a copy of it instead.�modified-iterating-setzhEmitted when items are added or removed to a set being iterated through. Doing so raises a RuntimeError.)ZW4701ZE4702ZE4703� r r r z nodes.For�None)�node�returnc C s"