split platform
This commit is contained in:
commit
8c9b09577d
2261 changed files with 676163 additions and 0 deletions
5
lib/python3.5/lib2to3/tests/data/fixers/bad_order.py
Normal file
5
lib/python3.5/lib2to3/tests/data/fixers/bad_order.py
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
from lib2to3.fixer_base import BaseFix
|
||||
|
||||
class FixBadOrder(BaseFix):
|
||||
|
||||
order = "crazy"
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
from lib2to3.fixer_base import BaseFix
|
||||
|
||||
class FixExplicit(BaseFix):
|
||||
explicit = True
|
||||
|
||||
def match(self): return False
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
from lib2to3.fixer_base import BaseFix
|
||||
|
||||
class FixFirst(BaseFix):
|
||||
run_order = 1
|
||||
|
||||
def match(self, node): return False
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
from lib2to3.fixer_base import BaseFix
|
||||
|
||||
class FixLast(BaseFix):
|
||||
|
||||
run_order = 10
|
||||
|
||||
def match(self, node): return False
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
from lib2to3.fixer_base import BaseFix
|
||||
from lib2to3.fixer_util import Name
|
||||
|
||||
class FixParrot(BaseFix):
|
||||
"""
|
||||
Change functions named 'parrot' to 'cheese'.
|
||||
"""
|
||||
|
||||
PATTERN = """funcdef < 'def' name='parrot' any* >"""
|
||||
|
||||
def transform(self, node, results):
|
||||
name = results["name"]
|
||||
name.replace(Name("cheese", name.prefix))
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
from lib2to3.fixer_base import BaseFix
|
||||
|
||||
class FixPreorder(BaseFix):
|
||||
order = "pre"
|
||||
|
||||
def match(self, node): return False
|
||||
1
lib/python3.5/lib2to3/tests/data/fixers/no_fixer_cls.py
Normal file
1
lib/python3.5/lib2to3/tests/data/fixers/no_fixer_cls.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
# This is empty so trying to fetch the fixer class gives an AttributeError
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
def parrot():
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue