mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 21:21:15 -07:00
Add future 0.18.2
This commit is contained in:
parent
08c8ee0774
commit
fa97d3f88d
210 changed files with 43159 additions and 0 deletions
21
lib/libpasteurize/fixes/fix_memoryview.py
Normal file
21
lib/libpasteurize/fixes/fix_memoryview.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
u"""
|
||||
Fixer for memoryview(s) -> buffer(s).
|
||||
Explicit because some memoryview methods are invalid on buffer objects.
|
||||
"""
|
||||
|
||||
from lib2to3 import fixer_base
|
||||
from lib2to3.fixer_util import Name
|
||||
|
||||
|
||||
class FixMemoryview(fixer_base.BaseFix):
|
||||
|
||||
explicit = True # User must specify that they want this.
|
||||
|
||||
PATTERN = u"""
|
||||
power< name='memoryview' trailer< '(' [any] ')' >
|
||||
rest=any* >
|
||||
"""
|
||||
|
||||
def transform(self, node, results):
|
||||
name = results[u"name"]
|
||||
name.replace(Name(u"buffer", prefix=name.prefix))
|
Loading…
Add table
Add a link
Reference in a new issue