Current Path: > > opt > alt > python310 > lib64 > python3.10 > 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-310.opt-1.pyc | File | 319 bytes | June 18 2025 15:55:26. | |
__init__.cpython-310.opt-2.pyc | File | 319 bytes | June 18 2025 15:55:26. | |
__init__.cpython-310.pyc | File | 319 bytes | June 18 2025 15:55:26. | |
__main__.cpython-310.opt-1.pyc | File | 232 bytes | June 18 2025 15:55:26. | |
__main__.cpython-310.opt-2.pyc | File | 232 bytes | June 18 2025 15:55:26. | |
__main__.cpython-310.pyc | File | 232 bytes | June 18 2025 15:55:26. | |
btm_matcher.cpython-310.opt-1.pyc | File | 4916 bytes | June 18 2025 15:55:26. | |
btm_matcher.cpython-310.opt-2.pyc | File | 3373 bytes | June 18 2025 15:55:29. | |
btm_matcher.cpython-310.pyc | File | 4916 bytes | June 18 2025 15:55:26. | |
btm_utils.cpython-310.opt-1.pyc | File | 6177 bytes | June 18 2025 15:55:26. | |
btm_utils.cpython-310.opt-2.pyc | File | 4697 bytes | June 18 2025 15:55:29. | |
btm_utils.cpython-310.pyc | File | 6177 bytes | June 18 2025 15:55:26. | |
fixer_base.cpython-310.opt-1.pyc | File | 6295 bytes | June 18 2025 15:55:26. | |
fixer_base.cpython-310.opt-2.pyc | File | 3597 bytes | June 18 2025 15:55:29. | |
fixer_base.cpython-310.pyc | File | 6295 bytes | June 18 2025 15:55:26. | |
fixer_util.cpython-310.opt-1.pyc | File | 12084 bytes | June 18 2025 15:55:26. | |
fixer_util.cpython-310.opt-2.pyc | File | 10041 bytes | June 18 2025 15:55:29. | |
fixer_util.cpython-310.pyc | File | 12084 bytes | June 18 2025 15:55:26. | |
main.cpython-310.opt-1.pyc | File | 8700 bytes | June 18 2025 15:55:28. | |
main.cpython-310.opt-2.pyc | File | 6967 bytes | June 18 2025 15:55:29. | |
main.cpython-310.pyc | File | 8718 bytes | June 18 2025 15:55:26. | |
patcomp.cpython-310.opt-1.pyc | File | 5354 bytes | June 18 2025 15:55:28. | |
patcomp.cpython-310.opt-2.pyc | File | 4871 bytes | June 18 2025 15:55:29. | |
patcomp.cpython-310.pyc | File | 5552 bytes | June 18 2025 15:55:26. | |
pygram.cpython-310.opt-1.pyc | File | 1283 bytes | June 18 2025 15:55:26. | |
pygram.cpython-310.opt-2.pyc | File | 1086 bytes | June 18 2025 15:55:29. | |
pygram.cpython-310.pyc | File | 1283 bytes | June 18 2025 15:55:26. | |
pytree.cpython-310.opt-1.pyc | File | 23801 bytes | June 18 2025 15:55:28. | |
pytree.cpython-310.opt-2.pyc | File | 15311 bytes | June 18 2025 15:55:29. | |
pytree.cpython-310.pyc | File | 24420 bytes | June 18 2025 15:55:26. | |
refactor.cpython-310.opt-1.pyc | File | 20727 bytes | June 18 2025 15:55:28. | |
refactor.cpython-310.opt-2.pyc | File | 16762 bytes | June 18 2025 15:55:29. | |
refactor.cpython-310.pyc | File | 20755 bytes | June 18 2025 15:55:26. |
o �=?h" � @ sT d Z ddlZddlmZ ddlmZ ddlmZ G dd� de�Z G d d � d e �Z dS )z2Base class for fixers (optional, but recommended).� N� )�PatternCompiler)�pygram)�does_tree_importc @ s� e Zd ZdZdZdZdZdZdZe � d�Ze� Z dZdZdZdZdZdZejZdd� Zd d � Zdd� Zd d� Zdd� Zddd�Zdd� Zddd�Zdd� Zdd� Z dd� 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 ZpostF� c C s || _ || _| �� 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 � r �9/opt/alt/python310/lib64/python3.10/lib2to3/fixer_base.py�__init__/ s zBaseFix.__init__c C s0 | j durt� }|j| j dd�\| _| _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)Z with_tree)�PATTERNr r �pattern�pattern_tree)r ZPCr r r r ; s ��zBaseFix.compile_patternc C s || _ dS )zOSet the filename. The main refactoring tool should call this. N)�filename)r r r r r �set_filenameF s zBaseFix.set_filenamec C s 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 Zresultsr r r r M s z BaseFix.matchc C s 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 r r r � transformY s zBaseFix.transform�xxx_todo_changemec C s: |}|| j v r|tt| j�� }|| j v s| 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�namer r r �new_namei s �zBaseFix.new_namec C s. | j rd| _ | j�d| j � | j�|� d S )NFz### In file %s ###)� first_logr �appendr )r �messager r r �log_messaget s zBaseFix.log_messagec C sB |� � }|�� }d|_d}| �|||f � |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_linenoZclone�prefixr% )r r �reason�linenoZ for_output�msgr r r �cannot_convertz s �zBaseFix.cannot_convertc C s |� � }| �d||f � 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)r'