Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/pylint/extensions/__pycache__/code_style.cpython-39.pyc
Ðазад
a n�hk5 � @ s� d dl mZ d dlZd dlmZmZ d dlmZ d dlm Z m Z d dlmZm Z d dlmZ erld dlmZ ejd kr�d d lmZ nd d lmZ G dd� de �Zd dd�dd�ZdS )� )�annotationsN)� TYPE_CHECKING�cast)�nodes)�BaseChecker�utils)�only_required_for_messages� safe_infer)� INFERENCE)�PyLinter)� � )� TypeGuardc @ s: e Zd ZdZdZddddddd d ifddd d d ifd�Zdddddd�ffZdd�dd�Zed�ddd�dd��Z ed�ddd�dd ��Z ed!�d"dd�d#d$��Zed!�d%dd�d&d'��Zed(�d)dd�d*d+��Z ddd�d,d-�Zd)dd�d.d/�Zed0d1d2d3�d4d5��Zed)d1d6d7�d8d9��Zed�d:dd�d;d<��Zd=S )>�CodeStyleCheckeram Checkers that can improve code consistency. As such they don't necessarily provide a performance benefit and are often times opinionated. Before adding another checker here, consider this: 1. Does the checker provide a clear benefit, i.e. detect a common issue or improve performance => it should probably be part of the core checker classes 2. Is it something that would improve code consistency, maybe because it's slightly better with regard to performance and therefore preferred => this is the right place 3. Everything else should go into another extension Z code_style)z<Consider using namedtuple or dataclass for dictionary values�&consider-using-namedtuple-or-dataclasszUEmitted when dictionary values can be replaced by namedtuples or dataclass instances.)z0Consider using an in-place tuple instead of list�consider-using-tuplez�Only for style consistency! Emitted where an in-place defined ``list`` can be replaced by a ``tuple``. Due to optimizations by CPython, there is no performance benefit from it.)zUse '%s' instead�consider-using-assignment-exprz�Emitted when an if assignment is directly followed by an if statement and both can be combined by using an assignment expression ``:=``. Requires Python 3.8 and ``py-version >= 3.8``.z+Use '%s' to do an augmented assign directly�consider-using-augmented-assignz�Emitted when an assignment is referring to the object that it is assigning to. This can be changed to be an augmented assign. Disabled by default!Zdefault_enabledFz8Prefer 'typing.NamedTuple' over 'collections.namedtuple'�prefer-typing-namedtuplez�'typing.NamedTuple' uses the well-known 'class' keyword with type-hints for readability (it's also faster as it avoids an internal exec call). Disabled by default!)ZR6101ZR6102ZR6103ZR6104ZR6105zmax-line-length-suggestions�intr z<int>z�Max line length for which to sill emit suggestions. Used to prevent optional suggestions which would get split by a code formatter (e.g., black). Will default to the setting for ``max-line-length``.)�type�default�metavar�help�None)�returnc C s8 | j jj}|dk| _|dk| _| j jjp0| j jj| _d S )N)r � )r � )�linter�config� py_version� _py36_plus� _py38_plusZmax_line_length_suggestions�max_line_length�_max_length)�selfr � r&