~ubuntu-branches/debian/stretch/electrum/stretch

« back to all changes in this revision

Viewing changes to gui/kivy/tools/.buildozer/android/platform/python-for-android/dist/kivy/python-install/lib/python2.7/lib2to3/fixes/fix_buffer.py

  • Committer: Package Import Robot
  • Author(s): Tristan Seligmann
  • Date: 2016-04-04 03:02:39 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20160404030239-0szgkio8yryjv7c9
Tags: 2.6.3-1
* New upstream release.
  - Drop backported install-wizard-connect.patch.
* Add Suggests: python-zbar and update the installation hint to suggest
  apt-get instead of pip (closes: #819517).
* Bump Standards-Version to 3.9.7 (no changes).
* Update Vcs-* links.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2007 Google, Inc. All Rights Reserved.
 
2
# Licensed to PSF under a Contributor Agreement.
 
3
 
 
4
"""Fixer that changes buffer(...) into memoryview(...)."""
 
5
 
 
6
# Local imports
 
7
from .. import fixer_base
 
8
from ..fixer_util import Name
 
9
 
 
10
 
 
11
class FixBuffer(fixer_base.BaseFix):
 
12
    BM_compatible = True
 
13
 
 
14
    explicit = True # The user must ask for this fixer
 
15
 
 
16
    PATTERN = """
 
17
              power< name='buffer' trailer< '(' [any] ')' > any* >
 
18
              """
 
19
 
 
20
    def transform(self, node, results):
 
21
        name = results["name"]
 
22
        name.replace(Name(u"memoryview", prefix=name.prefix))