Current Path: > > opt > alt > python311 > lib64 > python3.11 > lib2to3 > __pycache__
Operation : Linux premium131.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 Software : Apache Server IP : 162.0.232.56 | Your IP: 216.73.216.111 Domains : 1034 Domain(s) Permission : [ 0755 ]
Name | Type | Size | Last Modified | Actions |
---|---|---|---|---|
__init__.cpython-311.opt-1.pyc | File | 387 bytes | June 23 2025 15:48:01. | |
__init__.cpython-311.opt-2.pyc | File | 387 bytes | June 23 2025 15:48:01. | |
__init__.cpython-311.pyc | File | 387 bytes | June 23 2025 15:48:01. | |
__main__.cpython-311.opt-1.pyc | File | 331 bytes | June 23 2025 15:48:01. | |
__main__.cpython-311.opt-2.pyc | File | 331 bytes | June 23 2025 15:48:01. | |
__main__.cpython-311.pyc | File | 331 bytes | June 23 2025 15:48:01. | |
btm_matcher.cpython-311.opt-1.pyc | File | 7814 bytes | June 23 2025 15:48:01. | |
btm_matcher.cpython-311.opt-2.pyc | File | 6264 bytes | June 23 2025 15:48:05. | |
btm_matcher.cpython-311.pyc | File | 7814 bytes | June 23 2025 15:48:01. | |
btm_utils.cpython-311.opt-1.pyc | File | 11530 bytes | June 23 2025 15:48:01. | |
btm_utils.cpython-311.opt-2.pyc | File | 10056 bytes | June 23 2025 15:48:05. | |
btm_utils.cpython-311.pyc | File | 11530 bytes | June 23 2025 15:48:01. | |
fixer_base.cpython-311.opt-1.pyc | File | 8431 bytes | June 23 2025 15:48:01. | |
fixer_base.cpython-311.opt-2.pyc | File | 5752 bytes | June 23 2025 15:48:06. | |
fixer_base.cpython-311.pyc | File | 8431 bytes | June 23 2025 15:48:01. | |
fixer_util.cpython-311.opt-1.pyc | File | 22381 bytes | June 23 2025 15:48:01. | |
fixer_util.cpython-311.opt-2.pyc | File | 20368 bytes | June 23 2025 15:48:06. | |
fixer_util.cpython-311.pyc | File | 22381 bytes | June 23 2025 15:48:01. | |
main.cpython-311.opt-1.pyc | File | 15220 bytes | June 23 2025 15:48:03. | |
main.cpython-311.opt-2.pyc | File | 13484 bytes | June 23 2025 15:48:05. | |
main.cpython-311.pyc | File | 15266 bytes | June 23 2025 15:48:01. | |
patcomp.cpython-311.opt-1.pyc | File | 10223 bytes | June 23 2025 15:48:03. | |
patcomp.cpython-311.opt-2.pyc | File | 9744 bytes | June 23 2025 15:48:05. | |
patcomp.cpython-311.pyc | File | 10725 bytes | June 23 2025 15:48:01. | |
pygram.cpython-311.opt-1.pyc | File | 2070 bytes | June 23 2025 15:48:01. | |
pygram.cpython-311.opt-2.pyc | File | 1873 bytes | June 23 2025 15:48:05. | |
pygram.cpython-311.pyc | File | 2070 bytes | June 23 2025 15:48:01. | |
pytree.cpython-311.opt-1.pyc | File | 35210 bytes | June 23 2025 15:48:03. | |
pytree.cpython-311.opt-2.pyc | File | 26861 bytes | June 23 2025 15:48:05. | |
pytree.cpython-311.pyc | File | 36993 bytes | June 23 2025 15:48:01. | |
refactor.cpython-311.opt-1.pyc | File | 38444 bytes | June 23 2025 15:48:03. | |
refactor.cpython-311.opt-2.pyc | File | 34539 bytes | June 23 2025 15:48:05. | |
refactor.cpython-311.pyc | File | 38526 bytes | June 23 2025 15:48:01. |
� !A?h" � �n � d Z ddlZddlmZ ddlmZ ddlmZ G d� de� � Z G d � d e � � Z dS )z2Base class for fixers (optional, but recommended).� N� )�PatternCompiler)�pygram)�does_tree_importc �� � e Zd ZdZdZdZdZdZdZ e j d� � Z e� � Z dZdZdZdZdZdZej Zd� Zd� Zd � Zd � Zd� Zdd �Zd� Zdd�Zd� Zd� Z d� Z!dS )�BaseFixa Optional base class for fixers. The subclass name must be FixFooBar where FooBar is the result of removing underscores and capitalizing the words of the fix name. For example, the class name for a fixer named 'has_key' should be FixHasKey. Nr �postF� c �J � || _ || _ | � � � dS )a Initializer. Subclass may override. Args: options: a dict containing the options passed to RefactoringTool that could be used to customize the fixer through the command line. log: a list to append warnings and other messages to. N)�options�log�compile_pattern)�selfr r s �9/opt/alt/python311/lib64/python3.11/lib2to3/fixer_base.py�__init__zBaseFix.__init__/ s* � � �������������� c � � | j �9t � � }|� | j d�� � \ | _ | _ dS dS )z�Compiles self.PATTERN into self.pattern. Subclass may override if it doesn't want to use self.{pattern,PATTERN} in .match(). NT)� with_tree)�PATTERNr r �pattern�pattern_tree)r �PCs r r zBaseFix.compile_pattern; sS � � �<�#� �"�"�B�.0�.@�.@���KO� /A� /Q� /Q�+�D�L�$�+�+�+� $�#r c � � || _ dS )zOSet the filename. The main refactoring tool should call this. N)�filename)r r s r �set_filenamezBaseFix.set_filenameF s � � !�� � � r c �D � d|i}| j � ||� � o|S )a Returns match for a given parse tree node. Should return a true or false object (not necessarily a bool). It may return a non-empty dict of matching sub-nodes as returned by a matching pattern. Subclass may override. �node)r �match�r r �resultss r r z BaseFix.matchM s* � � �4�.���|�!�!�$��0�0�<�W�<r c � � t � � �)a� Returns the transformation for a given parse tree node. Args: node: the root of the parse tree that matched the fixer. results: a dict mapping symbolic names to part of the match. Returns: None, or a node that is a modified copy of the argument node. The node argument may also be modified in-place to effect the same change. Subclass *must* override. )�NotImplementedErrorr s r � transformzBaseFix.transformY s � � "�#�#�#r �xxx_todo_changemec � � |}|| j v r-|t t | j � � � � z }|| j v �-| j � |� � |S )z�Return a string suitable for use as an identifier The new name is guaranteed not to conflict with other identifiers. )� used_names�str�next�numbers�add)r �template�names r �new_namezBaseFix.new_namei s\ � � ���d�o�%�%��c�$�t�|�"4�"4�5�5�5�D� �d�o�%�%�����D�!�!�!��r c � � | j r)d| _ | j � d| j z � � | j � |� � d S )NFz### In file %s ###)� first_logr �appendr )r �messages r �log_messagezBaseFix.log_messaget sJ � ��>� B�"�D�N��H�O�O�0�4�=�@�A�A�A������ � � � � r c �� � |� � � }|� � � }d|_ d}| � |||fz � � |r| � |� � dS dS )a Warn the user that a given chunk of code is not valid Python 3, but that it cannot be converted automatically. First argument is the top-level node for the code in question. Optional second argument is why it can't be converted. � zLine %d: could not convert: %sN)� get_lineno�clone�prefixr2 )r r �reason�lineno� for_output�msgs r �cannot_convertzBaseFix.cannot_convertz sw � � ���"�"���Z�Z�\�\� �� ��.������� �3�3�4�4�4�� %����V�$�$�$�$�$� %� %r c �b � |� � � }| � d||fz � � dS )z�Used for warning the user about possible uncertainty in the translation. First argument is the top-level node for the code in question. Optional second argument is why it can't be converted. zLine %d: %sN)r5 r2 )r r r8 r9 s r �warningzBaseFix.warning� s7 � � ���"�"������&�&�)9�9�:�:�:�:�:r c � � |j | _ | � |� � t j d� � | _ d| _ dS )z�Some fixers need to maintain tree-wide state. This method is called once, at the start of tree fix-up. tree - the root node of the tree to be processed. filename - the name of the file the tree came from. r TN)r&