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
/
testutils
/
functional
/
__pycache__
[ HOME ]
Exec
Submit
lint_module_output_update.cpython-311.pyc
� � h_ � �~ � d dl mZ d dlZd dlZd dlmZ d dlmZ d dlm Z d dl mZmZ d dl mZ G d� d e� � ZdS ) � )�annotationsN)�Config)� PY38_PLUS)�FunctionalTestFile)�LintModuleTest�MessageCounter)� OutputLinec �x � � e Zd ZdZ G d� dej � � Z ej de� � dd� fd� Zdd�Z � xZ S )�LintModuleOutputUpdatezXClass to be used if expected output files should be updated instead of checked. c � � e Zd ZdZdZdZdS )�"LintModuleOutputUpdate.TestDialectzDialect used by the csv writer.�:� N)�__name__� __module__�__qualname__�__doc__� delimiter�lineterminator� � ��/builddir/build/BUILD/cloudlinux-venv-1.0.8/venv/lib/python3.11/site-packages/pylint/testutils/functional/lint_module_output_update.py�TestDialectr s � � � � � �-�-�� ����r r �testN� test_filer �config� Config | None�return�Nonec �x �� t st d� � �t � � � ||� � d S )Nz�You need at least python 3.8 for the functional test updater to work. This is because python 3.8 includes a new AST parser, which amongst others returns the end line and end column of most nodes.)r �RuntimeError�super�__init__)�selfr r � __class__s �r r# zLintModuleOutputUpdate.__init__ sG �� � � ��E�� � � ������F�+�+�+�+�+r �_r �expected_output�list[OutputLine]� actual_outputc � � |sK|sIt j � | j j � � rt j | j j � � dS t | j j dd�� � 5 }t j |d�� � }|D ])}|� |� � � � � �* ddd� � dS # 1 swxY w Y dS )zDOverwrite or remove the expected output file based on actual output.N�wzutf-8)�encodingr )�dialect)�os�path�exists� _test_filer'