Current File : /home/mmdealscpanel/yummmdeals.com/fixes.zip
PK':�Z)��EE
fix_reduce.pynu�[���# Copyright 2008 Armin Ronacher.
# Licensed to PSF under a Contributor Agreement.

"""Fixer for reduce().

Makes sure reduce() is imported from the functools module if reduce is
used in that module.
"""

from lib2to3 import fixer_base
from lib2to3.fixer_util import touch_import



class FixReduce(fixer_base.BaseFix):

    BM_compatible = True
    order = "pre"

    PATTERN = """
    power< 'reduce'
        trailer< '('
            arglist< (
                (not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any) |
                (not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any)
            ) >
        ')' >
    >
    """

    def transform(self, node, results):
        touch_import('functools', 'reduce', node)
PK':�ZZ6��fix_print.pynu�[���# Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Fixer for print.

Change:
    'print'          into 'print()'
    'print ...'      into 'print(...)'
    'print ... ,'    into 'print(..., end=" ")'
    'print >>x, ...' into 'print(..., file=x)'

No changes are applied if print_function is imported from __future__

"""

# Local imports
from .. import patcomp
from .. import pytree
from ..pgen2 import token
from .. import fixer_base
from ..fixer_util import Name, Call, Comma, String


parend_expr = patcomp.compile_pattern(
              """atom< '(' [atom|STRING|NAME] ')' >"""
              )


class FixPrint(fixer_base.BaseFix):

    BM_compatible = True

    PATTERN = """
              simple_stmt< any* bare='print' any* > | print_stmt
              """

    def transform(self, node, results):
        assert results

        bare_print = results.get("bare")

        if bare_print:
            # Special-case print all by itself
            bare_print.replace(Call(Name("print"), [],
                               prefix=bare_print.prefix))
            return
        assert node.children[0] == Name("print")
        args = node.children[1:]
        if len(args) == 1 and parend_expr.match(args[0]):
            # We don't want to keep sticking parens around an
            # already-parenthesised expression.
            return

        sep = end = file = None
        if args and args[-1] == Comma():
            args = args[:-1]
            end = " "
        if args and args[0] == pytree.Leaf(token.RIGHTSHIFT, ">>"):
            assert len(args) >= 2
            file = args[1].clone()
            args = args[3:] # Strip a possible comma after the file expression
        # Now synthesize a print(args, sep=..., end=..., file=...) node.
        l_args = [arg.clone() for arg in args]
        if l_args:
            l_args[0].prefix = ""
        if sep is not None or end is not None or file is not None:
            if sep is not None:
                self.add_kwarg(l_args, "sep", String(repr(sep)))
            if end is not None:
                self.add_kwarg(l_args, "end", String(repr(end)))
            if file is not None:
                self.add_kwarg(l_args, "file", file)
        n_stmt = Call(Name("print"), l_args)
        n_stmt.prefix = node.prefix
        return n_stmt

    def add_kwarg(self, l_nodes, s_kwd, n_expr):
        # XXX All this prefix-setting may lose comments (though rarely)
        n_expr.prefix = ""
        n_argument = pytree.Node(self.syms.argument,
                                 (Name(s_kwd),
                                  pytree.Leaf(token.EQUAL, "="),
                                  n_expr))
        if l_nodes:
            l_nodes.append(Comma())
            n_argument.prefix = " "
        l_nodes.append(n_argument)
PK':�Z�=���fix_asserts.pynu�[���"""Fixer that replaces deprecated unittest method names."""

# Author: Ezio Melotti

from ..fixer_base import BaseFix
from ..fixer_util import Name

NAMES = dict(
    assert_="assertTrue",
    assertEquals="assertEqual",
    assertNotEquals="assertNotEqual",
    assertAlmostEquals="assertAlmostEqual",
    assertNotAlmostEquals="assertNotAlmostEqual",
    assertRegexpMatches="assertRegex",
    assertRaisesRegexp="assertRaisesRegex",
    failUnlessEqual="assertEqual",
    failIfEqual="assertNotEqual",
    failUnlessAlmostEqual="assertAlmostEqual",
    failIfAlmostEqual="assertNotAlmostEqual",
    failUnless="assertTrue",
    failUnlessRaises="assertRaises",
    failIf="assertFalse",
)


class FixAsserts(BaseFix):

    PATTERN = """
              power< any+ trailer< '.' meth=(%s)> any* >
              """ % '|'.join(map(repr, NAMES))

    def transform(self, node, results):
        name = results["meth"][0]
        name.replace(Name(NAMES[str(name)], prefix=name.prefix))
PK':�Z2�ۭ�fix_renames.pynu�[���"""Fix incompatible renames

Fixes:
  * sys.maxint -> sys.maxsize
"""
# Author: Christian Heimes
# based on Collin Winter's fix_import

# Local imports
from .. import fixer_base
from ..fixer_util import Name, attr_chain

MAPPING = {"sys":  {"maxint" : "maxsize"},
          }
LOOKUP = {}

def alternates(members):
    return "(" + "|".join(map(repr, members)) + ")"


def build_pattern():
    #bare = set()
    for module, replace in list(MAPPING.items()):
        for old_attr, new_attr in list(replace.items()):
            LOOKUP[(module, old_attr)] = new_attr
            #bare.add(module)
            #bare.add(old_attr)
            #yield """
            #      import_name< 'import' (module=%r
            #          | dotted_as_names< any* module=%r any* >) >
            #      """ % (module, module)
            yield """
                  import_from< 'from' module_name=%r 'import'
                      ( attr_name=%r | import_as_name< attr_name=%r 'as' any >) >
                  """ % (module, old_attr, old_attr)
            yield """
                  power< module_name=%r trailer< '.' attr_name=%r > any* >
                  """ % (module, old_attr)
    #yield """bare_name=%s""" % alternates(bare)


class FixRenames(fixer_base.BaseFix):
    BM_compatible = True
    PATTERN = "|".join(build_pattern())

    order = "pre" # Pre-order tree traversal

    # Don't match the node if it's within another match
    def match(self, node):
        match = super(FixRenames, self).match
        results = match(node)
        if results:
            if any(match(obj) for obj in attr_chain(node, "parent")):
                return False
            return results
        return False

    #def start_tree(self, tree, filename):
    #    super(FixRenames, self).start_tree(tree, filename)
    #    self.replace = {}

    def transform(self, node, results):
        mod_name = results.get("module_name")
        attr_name = results.get("attr_name")
        #bare_name = results.get("bare_name")
        #import_mod = results.get("module")

        if mod_name and attr_name:
            new_attr = LOOKUP[(mod_name.value, attr_name.value)]
            attr_name.replace(Name(new_attr, prefix=attr_name.prefix))
PK':�Z�E[//__init__.pynu�[���# Dummy file to make this directory a package.
PK':�Z5Y��
�

fix_filter.pynu�[���# Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Fixer that changes filter(F, X) into list(filter(F, X)).

We avoid the transformation if the filter() call is directly contained
in iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or
for V in <>:.

NOTE: This is still not correct if the original code was depending on
filter(F, X) to return a string if X is a string and a tuple if X is a
tuple.  That would require type inference, which we don't do.  Let
Python 2.6 figure it out.
"""

# Local imports
from .. import fixer_base
from ..pytree import Node
from ..pygram import python_symbols as syms
from ..fixer_util import Name, ArgList, ListComp, in_special_context, parenthesize


class FixFilter(fixer_base.ConditionalFix):
    BM_compatible = True

    PATTERN = """
    filter_lambda=power<
        'filter'
        trailer<
            '('
            arglist<
                lambdef< 'lambda'
                         (fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any
                >
                ','
                it=any
            >
            ')'
        >
        [extra_trailers=trailer*]
    >
    |
    power<
        'filter'
        trailer< '(' arglist< none='None' ',' seq=any > ')' >
        [extra_trailers=trailer*]
    >
    |
    power<
        'filter'
        args=trailer< '(' [any] ')' >
        [extra_trailers=trailer*]
    >
    """

    skip_on = "future_builtins.filter"

    def transform(self, node, results):
        if self.should_skip(node):
            return

        trailers = []
        if 'extra_trailers' in results:
            for t in results['extra_trailers']:
                trailers.append(t.clone())

        if "filter_lambda" in results:
            xp = results.get("xp").clone()
            if xp.type == syms.test:
                xp.prefix = ""
                xp = parenthesize(xp)

            new = ListComp(results.get("fp").clone(),
                           results.get("fp").clone(),
                           results.get("it").clone(), xp)
            new = Node(syms.power, [new] + trailers, prefix="")

        elif "none" in results:
            new = ListComp(Name("_f"),
                           Name("_f"),
                           results["seq"].clone(),
                           Name("_f"))
            new = Node(syms.power, [new] + trailers, prefix="")

        else:
            if in_special_context(node):
                return None

            args = results['args'].clone()
            new = Node(syms.power, [Name("filter"), args], prefix="")
            new = Node(syms.power, [Name("list"), ArgList([new])] + trailers)
            new.prefix = ""
        new.prefix = node.prefix
        return new
PK':�Z�)xx
fix_intern.pynu�[���# Copyright 2006 Georg Brandl.
# Licensed to PSF under a Contributor Agreement.

"""Fixer for intern().

intern(s) -> sys.intern(s)"""

# Local imports
from .. import fixer_base
from ..fixer_util import ImportAndCall, touch_import


class FixIntern(fixer_base.BaseFix):
    BM_compatible = True
    order = "pre"

    PATTERN = """
    power< 'intern'
           trailer< lpar='('
                    ( not(arglist | argument<any '=' any>) obj=any
                      | obj=arglist<(not argument<any '=' any>) any ','> )
                    rpar=')' >
           after=any*
    >
    """

    def transform(self, node, results):
        if results:
            # I feel like we should be able to express this logic in the
            # PATTERN above but I don't know how to do it so...
            obj = results['obj']
            if obj:
                if (obj.type == self.syms.argument and
                    obj.children[0].value in {'**', '*'}):
                    return  # Make no change.
        names = ('sys', 'intern')
        new = ImportAndCall(node, results, names)
        touch_import(None, 'sys', node)
        return new
PK':�Zp2�I


fix_except.pynu�[���"""Fixer for except statements with named exceptions.

The following cases will be converted:

- "except E, T:" where T is a name:

    except E as T:

- "except E, T:" where T is not a name, tuple or list:

        except E as t:
            T = t

    This is done because the target of an "except" clause must be a
    name.

- "except E, T:" where T is a tuple or list literal:

        except E as t:
            T = t.args
"""
# Author: Collin Winter

# Local imports
from .. import pytree
from ..pgen2 import token
from .. import fixer_base
from ..fixer_util import Assign, Attr, Name, is_tuple, is_list, syms

def find_excepts(nodes):
    for i, n in enumerate(nodes):
        if n.type == syms.except_clause:
            if n.children[0].value == 'except':
                yield (n, nodes[i+2])

class FixExcept(fixer_base.BaseFix):
    BM_compatible = True

    PATTERN = """
    try_stmt< 'try' ':' (simple_stmt | suite)
                  cleanup=(except_clause ':' (simple_stmt | suite))+
                  tail=(['except' ':' (simple_stmt | suite)]
                        ['else' ':' (simple_stmt | suite)]
                        ['finally' ':' (simple_stmt | suite)]) >
    """

    def transform(self, node, results):
        syms = self.syms

        tail = [n.clone() for n in results["tail"]]

        try_cleanup = [ch.clone() for ch in results["cleanup"]]
        for except_clause, e_suite in find_excepts(try_cleanup):
            if len(except_clause.children) == 4:
                (E, comma, N) = except_clause.children[1:4]
                comma.replace(Name("as", prefix=" "))

                if N.type != token.NAME:
                    # Generate a new N for the except clause
                    new_N = Name(self.new_name(), prefix=" ")
                    target = N.clone()
                    target.prefix = ""
                    N.replace(new_N)
                    new_N = new_N.clone()

                    # Insert "old_N = new_N" as the first statement in
                    #  the except body. This loop skips leading whitespace
                    #  and indents
                    #TODO(cwinter) suite-cleanup
                    suite_stmts = e_suite.children
                    for i, stmt in enumerate(suite_stmts):
                        if isinstance(stmt, pytree.Node):
                            break

                    # The assignment is different if old_N is a tuple or list
                    # In that case, the assignment is old_N = new_N.args
                    if is_tuple(N) or is_list(N):
                        assign = Assign(target, Attr(new_N, Name('args')))
                    else:
                        assign = Assign(target, new_N)

                    #TODO(cwinter) stopgap until children becomes a smart list
                    for child in reversed(suite_stmts[:i]):
                        e_suite.insert_child(0, child)
                    e_suite.insert_child(i, assign)
                elif N.prefix == "":
                    # No space after a comma is legal; no space after "as",
                    # not so much.
                    N.prefix = " "

        #TODO(cwinter) fix this when children becomes a smart list
        children = [c.clone() for c in node.children[:3]] + try_cleanup + tail
        return pytree.Node(node.type, children)
PK':�Zl�Hfix_numliterals.pynu�[���"""Fixer that turns 1L into 1, 0755 into 0o755.
"""
# Copyright 2007 Georg Brandl.
# Licensed to PSF under a Contributor Agreement.

# Local imports
from ..pgen2 import token
from .. import fixer_base
from ..fixer_util import Number


class FixNumliterals(fixer_base.BaseFix):
    # This is so simple that we don't need the pattern compiler.

    _accept_type = token.NUMBER

    def match(self, node):
        # Override
        return (node.value.startswith("0") or node.value[-1] in "Ll")

    def transform(self, node, results):
        val = node.value
        if val[-1] in 'Ll':
            val = val[:-1]
        elif val.startswith('0') and val.isdigit() and len(set(val)) > 1:
            val = "0o" + val[1:]

        return Number(val, prefix=node.prefix)
PK':�Z��|�b
b
fix_operator.pynu�[���"""Fixer for operator functions.

operator.isCallable(obj)       -> callable(obj)
operator.sequenceIncludes(obj) -> operator.contains(obj)
operator.isSequenceType(obj)   -> isinstance(obj, collections.abc.Sequence)
operator.isMappingType(obj)    -> isinstance(obj, collections.abc.Mapping)
operator.isNumberType(obj)     -> isinstance(obj, numbers.Number)
operator.repeat(obj, n)        -> operator.mul(obj, n)
operator.irepeat(obj, n)       -> operator.imul(obj, n)
"""

import collections.abc

# Local imports
from lib2to3 import fixer_base
from lib2to3.fixer_util import Call, Name, String, touch_import


def invocation(s):
    def dec(f):
        f.invocation = s
        return f
    return dec


class FixOperator(fixer_base.BaseFix):
    BM_compatible = True
    order = "pre"

    methods = """
              method=('isCallable'|'sequenceIncludes'
                     |'isSequenceType'|'isMappingType'|'isNumberType'
                     |'repeat'|'irepeat')
              """
    obj = "'(' obj=any ')'"
    PATTERN = """
              power< module='operator'
                trailer< '.' %(methods)s > trailer< %(obj)s > >
              |
              power< %(methods)s trailer< %(obj)s > >
              """ % dict(methods=methods, obj=obj)

    def transform(self, node, results):
        method = self._check_method(node, results)
        if method is not None:
            return method(node, results)

    @invocation("operator.contains(%s)")
    def _sequenceIncludes(self, node, results):
        return self._handle_rename(node, results, "contains")

    @invocation("callable(%s)")
    def _isCallable(self, node, results):
        obj = results["obj"]
        return Call(Name("callable"), [obj.clone()], prefix=node.prefix)

    @invocation("operator.mul(%s)")
    def _repeat(self, node, results):
        return self._handle_rename(node, results, "mul")

    @invocation("operator.imul(%s)")
    def _irepeat(self, node, results):
        return self._handle_rename(node, results, "imul")

    @invocation("isinstance(%s, collections.abc.Sequence)")
    def _isSequenceType(self, node, results):
        return self._handle_type2abc(node, results, "collections.abc", "Sequence")

    @invocation("isinstance(%s, collections.abc.Mapping)")
    def _isMappingType(self, node, results):
        return self._handle_type2abc(node, results, "collections.abc", "Mapping")

    @invocation("isinstance(%s, numbers.Number)")
    def _isNumberType(self, node, results):
        return self._handle_type2abc(node, results, "numbers", "Number")

    def _handle_rename(self, node, results, name):
        method = results["method"][0]
        method.value = name
        method.changed()

    def _handle_type2abc(self, node, results, module, abc):
        touch_import(None, module, node)
        obj = results["obj"]
        args = [obj.clone(), String(", " + ".".join([module, abc]))]
        return Call(Name("isinstance"), args, prefix=node.prefix)

    def _check_method(self, node, results):
        method = getattr(self, "_" + results["method"][0].value)
        if isinstance(method, collections.abc.Callable):
            if "module" in results:
                return method
            else:
                sub = (str(results["obj"]),)
                invocation_str = method.invocation % sub
                self.warning(node, "You should use '%s' here." % invocation_str)
        return None
PK':�Z%TW688
fix_map.pynu�[���# Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Fixer that changes map(F, ...) into list(map(F, ...)) unless there
exists a 'from future_builtins import map' statement in the top-level
namespace.

As a special case, map(None, X) is changed into list(X).  (This is
necessary because the semantics are changed in this case -- the new
map(None, X) is equivalent to [(x,) for x in X].)

We avoid the transformation (except for the special case mentioned
above) if the map() call is directly contained in iter(<>), list(<>),
tuple(<>), sorted(<>), ...join(<>), or for V in <>:.

NOTE: This is still not correct if the original code was depending on
map(F, X, Y, ...) to go on until the longest argument is exhausted,
substituting None for missing values -- like zip(), it now stops as
soon as the shortest argument is exhausted.
"""

# Local imports
from ..pgen2 import token
from .. import fixer_base
from ..fixer_util import Name, ArgList, Call, ListComp, in_special_context
from ..pygram import python_symbols as syms
from ..pytree import Node


class FixMap(fixer_base.ConditionalFix):
    BM_compatible = True

    PATTERN = """
    map_none=power<
        'map'
        trailer< '(' arglist< 'None' ',' arg=any [','] > ')' >
        [extra_trailers=trailer*]
    >
    |
    map_lambda=power<
        'map'
        trailer<
            '('
            arglist<
                lambdef< 'lambda'
                         (fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any
                >
                ','
                it=any
            >
            ')'
        >
        [extra_trailers=trailer*]
    >
    |
    power<
        'map' args=trailer< '(' [any] ')' >
        [extra_trailers=trailer*]
    >
    """

    skip_on = 'future_builtins.map'

    def transform(self, node, results):
        if self.should_skip(node):
            return

        trailers = []
        if 'extra_trailers' in results:
            for t in results['extra_trailers']:
                trailers.append(t.clone())

        if node.parent.type == syms.simple_stmt:
            self.warning(node, "You should use a for loop here")
            new = node.clone()
            new.prefix = ""
            new = Call(Name("list"), [new])
        elif "map_lambda" in results:
            new = ListComp(results["xp"].clone(),
                           results["fp"].clone(),
                           results["it"].clone())
            new = Node(syms.power, [new] + trailers, prefix="")

        else:
            if "map_none" in results:
                new = results["arg"].clone()
                new.prefix = ""
            else:
                if "args" in results:
                    args = results["args"]
                    if args.type == syms.trailer and \
                       args.children[1].type == syms.arglist and \
                       args.children[1].children[0].type == token.NAME and \
                       args.children[1].children[0].value == "None":
                        self.warning(node, "cannot convert map(None, ...) "
                                     "with multiple arguments because map() "
                                     "now truncates to the shortest sequence")
                        return

                    new = Node(syms.power, [Name("map"), args.clone()])
                    new.prefix = ""

                if in_special_context(node):
                    return None

            new = Node(syms.power, [Name("list"), ArgList([new])] + trailers)
            new.prefix = ""

        new.prefix = node.prefix
        return new
PK':�Z=��nnfix_raise.pynu�[���"""Fixer for 'raise E, V, T'

raise         -> raise
raise E       -> raise E
raise E, V    -> raise E(V)
raise E, V, T -> raise E(V).with_traceback(T)
raise E, None, T -> raise E.with_traceback(T)

raise (((E, E'), E''), E'''), V -> raise E(V)
raise "foo", V, T               -> warns about string exceptions


CAVEATS:
1) "raise E, V" will be incorrectly translated if V is an exception
   instance. The correct Python 3 idiom is

        raise E from V

   but since we can't detect instance-hood by syntax alone and since
   any client code would have to be changed as well, we don't automate
   this.
"""
# Author: Collin Winter

# Local imports
from .. import pytree
from ..pgen2 import token
from .. import fixer_base
from ..fixer_util import Name, Call, Attr, ArgList, is_tuple

class FixRaise(fixer_base.BaseFix):

    BM_compatible = True
    PATTERN = """
    raise_stmt< 'raise' exc=any [',' val=any [',' tb=any]] >
    """

    def transform(self, node, results):
        syms = self.syms

        exc = results["exc"].clone()
        if exc.type == token.STRING:
            msg = "Python 3 does not support string exceptions"
            self.cannot_convert(node, msg)
            return

        # Python 2 supports
        #  raise ((((E1, E2), E3), E4), E5), V
        # as a synonym for
        #  raise E1, V
        # Since Python 3 will not support this, we recurse down any tuple
        # literals, always taking the first element.
        if is_tuple(exc):
            while is_tuple(exc):
                # exc.children[1:-1] is the unparenthesized tuple
                # exc.children[1].children[0] is the first element of the tuple
                exc = exc.children[1].children[0].clone()
            exc.prefix = " "

        if "val" not in results:
            # One-argument raise
            new = pytree.Node(syms.raise_stmt, [Name("raise"), exc])
            new.prefix = node.prefix
            return new

        val = results["val"].clone()
        if is_tuple(val):
            args = [c.clone() for c in val.children[1:-1]]
        else:
            val.prefix = ""
            args = [val]

        if "tb" in results:
            tb = results["tb"].clone()
            tb.prefix = ""

            e = exc
            # If there's a traceback and None is passed as the value, then don't
            # add a call, since the user probably just wants to add a
            # traceback. See issue #9661.
            if val.type != token.NAME or val.value != "None":
                e = Call(exc, args)
            with_tb = Attr(e, Name('with_traceback')) + [ArgList([tb])]
            new = pytree.Node(syms.simple_stmt, [Name("raise")] + with_tb)
            new.prefix = node.prefix
            return new
        else:
            return pytree.Node(syms.raise_stmt,
                               [Name("raise"), Call(exc, args)],
                               prefix=node.prefix)
PK':�Z�|�44fix_imports.pynu�[���"""Fix incompatible imports and module references."""
# Authors: Collin Winter, Nick Edds

# Local imports
from .. import fixer_base
from ..fixer_util import Name, attr_chain

MAPPING = {'StringIO':  'io',
           'cStringIO': 'io',
           'cPickle': 'pickle',
           '__builtin__' : 'builtins',
           'copy_reg': 'copyreg',
           'Queue': 'queue',
           'SocketServer': 'socketserver',
           'ConfigParser': 'configparser',
           'repr': 'reprlib',
           'FileDialog': 'tkinter.filedialog',
           'tkFileDialog': 'tkinter.filedialog',
           'SimpleDialog': 'tkinter.simpledialog',
           'tkSimpleDialog': 'tkinter.simpledialog',
           'tkColorChooser': 'tkinter.colorchooser',
           'tkCommonDialog': 'tkinter.commondialog',
           'Dialog': 'tkinter.dialog',
           'Tkdnd': 'tkinter.dnd',
           'tkFont': 'tkinter.font',
           'tkMessageBox': 'tkinter.messagebox',
           'ScrolledText': 'tkinter.scrolledtext',
           'Tkconstants': 'tkinter.constants',
           'Tix': 'tkinter.tix',
           'ttk': 'tkinter.ttk',
           'Tkinter': 'tkinter',
           'markupbase': '_markupbase',
           '_winreg': 'winreg',
           'thread': '_thread',
           'dummy_thread': '_dummy_thread',
           # anydbm and whichdb are handled by fix_imports2
           'dbhash': 'dbm.bsd',
           'dumbdbm': 'dbm.dumb',
           'dbm': 'dbm.ndbm',
           'gdbm': 'dbm.gnu',
           'xmlrpclib': 'xmlrpc.client',
           'DocXMLRPCServer': 'xmlrpc.server',
           'SimpleXMLRPCServer': 'xmlrpc.server',
           'httplib': 'http.client',
           'htmlentitydefs' : 'html.entities',
           'HTMLParser' : 'html.parser',
           'Cookie': 'http.cookies',
           'cookielib': 'http.cookiejar',
           'BaseHTTPServer': 'http.server',
           'SimpleHTTPServer': 'http.server',
           'CGIHTTPServer': 'http.server',
           #'test.test_support': 'test.support',
           'commands': 'subprocess',
           'UserString' : 'collections',
           'UserList' : 'collections',
           'urlparse' : 'urllib.parse',
           'robotparser' : 'urllib.robotparser',
}


def alternates(members):
    return "(" + "|".join(map(repr, members)) + ")"


def build_pattern(mapping=MAPPING):
    mod_list = ' | '.join(["module_name='%s'" % key for key in mapping])
    bare_names = alternates(mapping.keys())

    yield """name_import=import_name< 'import' ((%s) |
               multiple_imports=dotted_as_names< any* (%s) any* >) >
          """ % (mod_list, mod_list)
    yield """import_from< 'from' (%s) 'import' ['(']
              ( any | import_as_name< any 'as' any > |
                import_as_names< any* >)  [')'] >
          """ % mod_list
    yield """import_name< 'import' (dotted_as_name< (%s) 'as' any > |
               multiple_imports=dotted_as_names<
                 any* dotted_as_name< (%s) 'as' any > any* >) >
          """ % (mod_list, mod_list)

    # Find usages of module members in code e.g. thread.foo(bar)
    yield "power< bare_with_attr=(%s) trailer<'.' any > any* >" % bare_names


class FixImports(fixer_base.BaseFix):

    BM_compatible = True
    keep_line_order = True
    # This is overridden in fix_imports2.
    mapping = MAPPING

    # We want to run this fixer late, so fix_import doesn't try to make stdlib
    # renames into relative imports.
    run_order = 6

    def build_pattern(self):
        return "|".join(build_pattern(self.mapping))

    def compile_pattern(self):
        # We override this, so MAPPING can be pragmatically altered and the
        # changes will be reflected in PATTERN.
        self.PATTERN = self.build_pattern()
        super(FixImports, self).compile_pattern()

    # Don't match the node if it's within another match.
    def match(self, node):
        match = super(FixImports, self).match
        results = match(node)
        if results:
            # Module usage could be in the trailer of an attribute lookup, so we
            # might have nested matches when "bare_with_attr" is present.
            if "bare_with_attr" not in results and \
                    any(match(obj) for obj in attr_chain(node, "parent")):
                return False
            return results
        return False

    def start_tree(self, tree, filename):
        super(FixImports, self).start_tree(tree, filename)
        self.replace = {}

    def transform(self, node, results):
        import_mod = results.get("module_name")
        if import_mod:
            mod_name = import_mod.value
            new_name = self.mapping[mod_name]
            import_mod.replace(Name(new_name, prefix=import_mod.prefix))
            if "name_import" in results:
                # If it's not a "from x import x, y" or "import x as y" import,
                # marked its usage to be replaced.
                self.replace[mod_name] = new_name
            if "multiple_imports" in results:
                # This is a nasty hack to fix multiple imports on a line (e.g.,
                # "import StringIO, urlparse"). The problem is that I can't
                # figure out an easy way to make a pattern recognize the keys of
                # MAPPING randomly sprinkled in an import statement.
                results = self.match(node)
                if results:
                    self.transform(node, results)
        else:
            # Replace usage of the module.
            bare_name = results["bare_with_attr"][0]
            new_name = self.replace.get(bare_name.value)
            if new_name:
                bare_name.replace(Name(new_name, prefix=bare_name.prefix))
PK':�Z6u���fix_raw_input.pynu�[���"""Fixer that changes raw_input(...) into input(...)."""
# Author: Andre Roberge

# Local imports
from .. import fixer_base
from ..fixer_util import Name

class FixRawInput(fixer_base.BaseFix):

    BM_compatible = True
    PATTERN = """
              power< name='raw_input' trailer< '(' [any] ')' > any* >
              """

    def transform(self, node, results):
        name = results["name"]
        name.replace(Name("input", prefix=name.prefix))
PK':�Z�x�u..fix_throw.pynu�[���"""Fixer for generator.throw(E, V, T).

g.throw(E)       -> g.throw(E)
g.throw(E, V)    -> g.throw(E(V))
g.throw(E, V, T) -> g.throw(E(V).with_traceback(T))

g.throw("foo"[, V[, T]]) will warn about string exceptions."""
# Author: Collin Winter

# Local imports
from .. import pytree
from ..pgen2 import token
from .. import fixer_base
from ..fixer_util import Name, Call, ArgList, Attr, is_tuple

class FixThrow(fixer_base.BaseFix):
    BM_compatible = True
    PATTERN = """
    power< any trailer< '.' 'throw' >
           trailer< '(' args=arglist< exc=any ',' val=any [',' tb=any] > ')' >
    >
    |
    power< any trailer< '.' 'throw' > trailer< '(' exc=any ')' > >
    """

    def transform(self, node, results):
        syms = self.syms

        exc = results["exc"].clone()
        if exc.type is token.STRING:
            self.cannot_convert(node, "Python 3 does not support string exceptions")
            return

        # Leave "g.throw(E)" alone
        val = results.get("val")
        if val is None:
            return

        val = val.clone()
        if is_tuple(val):
            args = [c.clone() for c in val.children[1:-1]]
        else:
            val.prefix = ""
            args = [val]

        throw_args = results["args"]

        if "tb" in results:
            tb = results["tb"].clone()
            tb.prefix = ""

            e = Call(exc, args)
            with_tb = Attr(e, Name('with_traceback')) + [ArgList([tb])]
            throw_args.replace(pytree.Node(syms.power, with_tb))
        else:
            throw_args.replace(Call(exc, args))
PK':�Z�M��@@fix_basestring.pynu�[���"""Fixer for basestring -> str."""
# Author: Christian Heimes

# Local imports
from .. import fixer_base
from ..fixer_util import Name

class FixBasestring(fixer_base.BaseFix):
    BM_compatible = True

    PATTERN = "'basestring'"

    def transform(self, node, results):
        return Name("str", prefix=node.prefix)
PK':�ZC���
�

fix_xrange.pynu�[���# Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Fixer that changes xrange(...) into range(...)."""

# Local imports
from .. import fixer_base
from ..fixer_util import Name, Call, consuming_calls
from .. import patcomp


class FixXrange(fixer_base.BaseFix):
    BM_compatible = True
    PATTERN = """
              power<
                 (name='range'|name='xrange') trailer< '(' args=any ')' >
              rest=any* >
              """

    def start_tree(self, tree, filename):
        super(FixXrange, self).start_tree(tree, filename)
        self.transformed_xranges = set()

    def finish_tree(self, tree, filename):
        self.transformed_xranges = None

    def transform(self, node, results):
        name = results["name"]
        if name.value == "xrange":
            return self.transform_xrange(node, results)
        elif name.value == "range":
            return self.transform_range(node, results)
        else:
            raise ValueError(repr(name))

    def transform_xrange(self, node, results):
        name = results["name"]
        name.replace(Name("range", prefix=name.prefix))
        # This prevents the new range call from being wrapped in a list later.
        self.transformed_xranges.add(id(node))

    def transform_range(self, node, results):
        if (id(node) not in self.transformed_xranges and
            not self.in_special_context(node)):
            range_call = Call(Name("range"), [results["args"].clone()])
            # Encase the range call in list().
            list_call = Call(Name("list"), [range_call],
                             prefix=node.prefix)
            # Put things that were after the range() call after the list call.
            for n in results["rest"]:
                list_call.append_child(n)
            return list_call

    P1 = "power< func=NAME trailer< '(' node=any ')' > any* >"
    p1 = patcomp.compile_pattern(P1)

    P2 = """for_stmt< 'for' any 'in' node=any ':' any* >
            | comp_for< 'for' any 'in' node=any any* >
            | comparison< any 'in' node=any any*>
         """
    p2 = patcomp.compile_pattern(P2)

    def in_special_context(self, node):
        if node.parent is None:
            return False
        results = {}
        if (node.parent.parent is not None and
               self.p1.match(node.parent.parent, results) and
               results["node"] is node):
            # list(d.keys()) -> list(d.keys()), etc.
            return results["func"].value in consuming_calls
        # for ... in d.iterkeys() -> for ... in d.keys(), etc.
        return self.p2.match(node.parent, results) and results["node"] is node
PK':�Z��S���fix_types.pynu�[���# Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Fixer for removing uses of the types module.

These work for only the known names in the types module.  The forms above
can include types. or not.  ie, It is assumed the module is imported either as:

    import types
    from types import ... # either * or specific types

The import statements are not modified.

There should be another fixer that handles at least the following constants:

   type([]) -> list
   type(()) -> tuple
   type('') -> str

"""

# Local imports
from .. import fixer_base
from ..fixer_util import Name

_TYPE_MAPPING = {
        'BooleanType' : 'bool',
        'BufferType' : 'memoryview',
        'ClassType' : 'type',
        'ComplexType' : 'complex',
        'DictType': 'dict',
        'DictionaryType' : 'dict',
        'EllipsisType' : 'type(Ellipsis)',
        #'FileType' : 'io.IOBase',
        'FloatType': 'float',
        'IntType': 'int',
        'ListType': 'list',
        'LongType': 'int',
        'ObjectType' : 'object',
        'NoneType': 'type(None)',
        'NotImplementedType' : 'type(NotImplemented)',
        'SliceType' : 'slice',
        'StringType': 'bytes', # XXX ?
        'StringTypes' : '(str,)', # XXX ?
        'TupleType': 'tuple',
        'TypeType' : 'type',
        'UnicodeType': 'str',
        'XRangeType' : 'range',
    }

_pats = ["power< 'types' trailer< '.' name='%s' > >" % t for t in _TYPE_MAPPING]

class FixTypes(fixer_base.BaseFix):
    BM_compatible = True
    PATTERN = '|'.join(_pats)

    def transform(self, node, results):
        new_value = _TYPE_MAPPING.get(results["name"].value)
        if new_value:
            return Name(new_value, prefix=node.prefix)
        return None
PK':�Z_� \
fix_idioms.pynu�[���"""Adjust some old Python 2 idioms to their modern counterparts.

* Change some type comparisons to isinstance() calls:
    type(x) == T -> isinstance(x, T)
    type(x) is T -> isinstance(x, T)
    type(x) != T -> not isinstance(x, T)
    type(x) is not T -> not isinstance(x, T)

* Change "while 1:" into "while True:".

* Change both

    v = list(EXPR)
    v.sort()
    foo(v)

and the more general

    v = EXPR
    v.sort()
    foo(v)

into

    v = sorted(EXPR)
    foo(v)
"""
# Author: Jacques Frechet, Collin Winter

# Local imports
from .. import fixer_base
from ..fixer_util import Call, Comma, Name, Node, BlankLine, syms

CMP = "(n='!=' | '==' | 'is' | n=comp_op< 'is' 'not' >)"
TYPE = "power< 'type' trailer< '(' x=any ')' > >"

class FixIdioms(fixer_base.BaseFix):
    explicit = True # The user must ask for this fixer

    PATTERN = r"""
        isinstance=comparison< %s %s T=any >
        |
        isinstance=comparison< T=any %s %s >
        |
        while_stmt< 'while' while='1' ':' any+ >
        |
        sorted=any<
            any*
            simple_stmt<
              expr_stmt< id1=any '='
                         power< list='list' trailer< '(' (not arglist<any+>) any ')' > >
              >
              '\n'
            >
            sort=
            simple_stmt<
              power< id2=any
                     trailer< '.' 'sort' > trailer< '(' ')' >
              >
              '\n'
            >
            next=any*
        >
        |
        sorted=any<
            any*
            simple_stmt< expr_stmt< id1=any '=' expr=any > '\n' >
            sort=
            simple_stmt<
              power< id2=any
                     trailer< '.' 'sort' > trailer< '(' ')' >
              >
              '\n'
            >
            next=any*
        >
    """ % (TYPE, CMP, CMP, TYPE)

    def match(self, node):
        r = super(FixIdioms, self).match(node)
        # If we've matched one of the sort/sorted subpatterns above, we
        # want to reject matches where the initial assignment and the
        # subsequent .sort() call involve different identifiers.
        if r and "sorted" in r:
            if r["id1"] == r["id2"]:
                return r
            return None
        return r

    def transform(self, node, results):
        if "isinstance" in results:
            return self.transform_isinstance(node, results)
        elif "while" in results:
            return self.transform_while(node, results)
        elif "sorted" in results:
            return self.transform_sort(node, results)
        else:
            raise RuntimeError("Invalid match")

    def transform_isinstance(self, node, results):
        x = results["x"].clone() # The thing inside of type()
        T = results["T"].clone() # The type being compared against
        x.prefix = ""
        T.prefix = " "
        test = Call(Name("isinstance"), [x, Comma(), T])
        if "n" in results:
            test.prefix = " "
            test = Node(syms.not_test, [Name("not"), test])
        test.prefix = node.prefix
        return test

    def transform_while(self, node, results):
        one = results["while"]
        one.replace(Name("True", prefix=one.prefix))

    def transform_sort(self, node, results):
        sort_stmt = results["sort"]
        next_stmt = results["next"]
        list_call = results.get("list")
        simple_expr = results.get("expr")

        if list_call:
            list_call.replace(Name("sorted", prefix=list_call.prefix))
        elif simple_expr:
            new = simple_expr.clone()
            new.prefix = ""
            simple_expr.replace(Call(Name("sorted"), [new],
                                     prefix=simple_expr.prefix))
        else:
            raise RuntimeError("should not have reached here")
        sort_stmt.remove()

        btwn = sort_stmt.prefix
        # Keep any prefix lines between the sort_stmt and the list_call and
        # shove them right after the sorted() call.
        if "\n" in btwn:
            if next_stmt:
                # The new prefix should be everything from the sort_stmt's
                # prefix up to the last newline, then the old prefix after a new
                # line.
                prefix_lines = (btwn.rpartition("\n")[0], next_stmt[0].prefix)
                next_stmt[0].prefix = "\n".join(prefix_lines)
            else:
                assert list_call.parent
                assert list_call.next_sibling is None
                # Put a blank line after list_call and set its prefix.
                end_line = BlankLine()
                list_call.parent.append_child(end_line)
                assert list_call.next_sibling is end_line
                # The new prefix should be everything up to the first new line
                # of sort_stmt's prefix.
                end_line.prefix = btwn.rpartition("\n")[0]
PK':�ZD�Iu||fix_has_key.pynu�[���# Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Fixer for has_key().

Calls to .has_key() methods are expressed in terms of the 'in'
operator:

    d.has_key(k) -> k in d

CAVEATS:
1) While the primary target of this fixer is dict.has_key(), the
   fixer will change any has_key() method call, regardless of its
   class.

2) Cases like this will not be converted:

    m = d.has_key
    if m(k):
        ...

   Only *calls* to has_key() are converted. While it is possible to
   convert the above to something like

    m = d.__contains__
    if m(k):
        ...

   this is currently not done.
"""

# Local imports
from .. import pytree
from .. import fixer_base
from ..fixer_util import Name, parenthesize


class FixHasKey(fixer_base.BaseFix):
    BM_compatible = True

    PATTERN = """
    anchor=power<
        before=any+
        trailer< '.' 'has_key' >
        trailer<
            '('
            ( not(arglist | argument<any '=' any>) arg=any
            | arglist<(not argument<any '=' any>) arg=any ','>
            )
            ')'
        >
        after=any*
    >
    |
    negation=not_test<
        'not'
        anchor=power<
            before=any+
            trailer< '.' 'has_key' >
            trailer<
                '('
                ( not(arglist | argument<any '=' any>) arg=any
                | arglist<(not argument<any '=' any>) arg=any ','>
                )
                ')'
            >
        >
    >
    """

    def transform(self, node, results):
        assert results
        syms = self.syms
        if (node.parent.type == syms.not_test and
            self.pattern.match(node.parent)):
            # Don't transform a node matching the first alternative of the
            # pattern when its parent matches the second alternative
            return None
        negation = results.get("negation")
        anchor = results["anchor"]
        prefix = node.prefix
        before = [n.clone() for n in results["before"]]
        arg = results["arg"].clone()
        after = results.get("after")
        if after:
            after = [n.clone() for n in after]
        if arg.type in (syms.comparison, syms.not_test, syms.and_test,
                        syms.or_test, syms.test, syms.lambdef, syms.argument):
            arg = parenthesize(arg)
        if len(before) == 1:
            before = before[0]
        else:
            before = pytree.Node(syms.power, before)
        before.prefix = " "
        n_op = Name("in", prefix=" ")
        if negation:
            n_not = Name("not", prefix=" ")
            n_op = pytree.Node(syms.comp_op, (n_not, n_op))
        new = pytree.Node(syms.comparison, (arg, n_op, before))
        if after:
            new = parenthesize(new)
            new = pytree.Node(syms.power, (new,) + tuple(after))
        if node.parent.type in (syms.comparison, syms.expr, syms.xor_expr,
                                syms.and_expr, syms.shift_expr,
                                syms.arith_expr, syms.term,
                                syms.factor, syms.power):
            new = parenthesize(new)
        new.prefix = prefix
        return new
PK':�Z�+nbcc%__pycache__/fix_reduce.cpython-38.pycnu�[���U

e5dE�@s2dZddlmZddlmZGdd�dej�ZdS)zqFixer for reduce().

Makes sure reduce() is imported from the functools module if reduce is
used in that module.
�)�
fixer_base��touch_importc@s eZdZdZdZdZdd�ZdS)�	FixReduceTZpreai
    power< 'reduce'
        trailer< '('
            arglist< (
                (not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any) |
                (not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any)
            ) >
        ')' >
    >
    cCstdd|�dS)N�	functools�reducer)�selfZnodeZresults�r	�0/usr/lib64/python3.8/lib2to3/fixes/fix_reduce.py�	transform"szFixReduce.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�orderZPATTERNrr	r	r	r
rsrN)�__doc__Zlib2to3rZlib2to3.fixer_utilrZBaseFixrr	r	r	r
�<module>sPK':�Z;�3���0__pycache__/fix_set_literal.cpython-38.opt-1.pycnu�[���U

e5d��@s:dZddlmZmZddlmZmZGdd�dej�ZdS)z:
Optional fixer to transform set() calls to set literals.
�)�
fixer_base�pytree)�token�symsc@s eZdZdZdZdZdd�ZdS)�
FixSetLiteralTajpower< 'set' trailer< '('
                     (atom=atom< '[' (items=listmaker< any ((',' any)* [',']) >
                                |
                                single=any) ']' >
                     |
                     atom< '(' items=testlist_gexp< any ((',' any)* [',']) > ')' >
                     )
                     ')' > >
              c	Cs�|�d�}|r2t�tj|��g�}|�|�|}n|d}t�tj	d�g}|�
dd�|jD��|�t�tj
d��|jj|d_t�tj|�}|j|_t|j�dkr�|jd	}|��|j|jd_|S)
N�single�items�{css|]}|��VqdS)N)�clone)�.0�n�r
�5/usr/lib64/python3.8/lib2to3/fixes/fix_set_literal.py�	<genexpr>'sz*FixSetLiteral.transform.<locals>.<genexpr>�}�����)�getrZNoderZ	listmakerr
�replaceZLeafr�LBRACE�extendZchildren�append�RBRACEZnext_sibling�prefixZdictsetmaker�len�remove)	�selfZnodeZresultsrZfaker�literalZmakerrr
r
r�	transforms"


zFixSetLiteral.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZexplicitZPATTERNrr
r
r
rrs
rN)	�__doc__Zlib2to3rrZlib2to3.fixer_utilrrZBaseFixrr
r
r
r�<module>sPK':�Zn�^3(__pycache__/fix_map.cpython-38.opt-1.pycnu�[���U

e5d8�@sfdZddlmZddlmZddlmZmZmZm	Z	m
Z
ddlmZ
ddlmZGdd�dej�Zd	S)
aFixer that changes map(F, ...) into list(map(F, ...)) unless there
exists a 'from future_builtins import map' statement in the top-level
namespace.

As a special case, map(None, X) is changed into list(X).  (This is
necessary because the semantics are changed in this case -- the new
map(None, X) is equivalent to [(x,) for x in X].)

We avoid the transformation (except for the special case mentioned
above) if the map() call is directly contained in iter(<>), list(<>),
tuple(<>), sorted(<>), ...join(<>), or for V in <>:.

NOTE: This is still not correct if the original code was depending on
map(F, X, Y, ...) to go on until the longest argument is exhausted,
substituting None for missing values -- like zip(), it now stops as
soon as the shortest argument is exhausted.
�)�token)�
fixer_base)�Name�ArgList�Call�ListComp�in_special_context)�python_symbols)�Nodec@s eZdZdZdZdZdd�ZdS)�FixMapTaL
    map_none=power<
        'map'
        trailer< '(' arglist< 'None' ',' arg=any [','] > ')' >
        [extra_trailers=trailer*]
    >
    |
    map_lambda=power<
        'map'
        trailer<
            '('
            arglist<
                lambdef< 'lambda'
                         (fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any
                >
                ','
                it=any
            >
            ')'
        >
        [extra_trailers=trailer*]
    >
    |
    power<
        'map' args=trailer< '(' [any] ')' >
        [extra_trailers=trailer*]
    >
    zfuture_builtins.mapcCs�|�|�rdSg}d|kr6|dD]}|�|���q"|jjtjkrr|�|d�|��}d|_t	t
d�|g�}�n&d|kr�t|d��|d��|d���}ttj
|g|dd	�}n�d
|kr�|d��}d|_n�d|k�rf|d}|jtjk�rH|jd
jtjk�rH|jd
jdjtjk�rH|jd
jdjdk�rH|�|d�dSttj
t
d�|��g�}d|_t|��rtdSttj
t
d�t|g�g|�}d|_|j|_|S)NZextra_trailerszYou should use a for loop here��listZ
map_lambdaZxp�fp�it)�prefixZmap_none�arg�args���Nonezjcannot convert map(None, ...) with multiple arguments because map() now truncates to the shortest sequence�map)Zshould_skip�appendZclone�parent�type�symsZsimple_stmtZwarningrrrrr
ZpowerZtrailerZchildrenZarglistr�NAME�valuerr)�selfZnodeZresultsZtrailers�t�newr�r �-/usr/lib64/python3.8/lib2to3/fixes/fix_map.py�	transform@sN


�
���
zFixMap.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onr"r r r r!rsrN)�__doc__Zpgen2rrrZ
fixer_utilrrrrrZpygramr	rZpytreer
ZConditionalFixrr r r r!�<module>sPK':�Z۷a���/__pycache__/fix_isinstance.cpython-38.opt-2.pycnu�[���U

e5dH�@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�tokenc@s eZdZdZdZdZdd�ZdS)�
FixIsinstanceTz�
    power<
        'isinstance'
        trailer< '(' arglist< any ',' atom< '('
            args=testlist_gexp< any+ >
        ')' > > ')' >
    >
    �cCs�t�}|d}|j}g}t|�}|D]p\}}	|	jtjkrr|	j|krr|t|�dkr�||djtjkr�t	|�q$q$|�
|	�|	jtjkr$|�|	j�q$|r�|djtjkr�|d=t|�dkr�|j}
|
j
|d_
|
�|d�n||dd�<|��dS)N�args�����)�setZchildren�	enumerate�typer�NAME�value�len�COMMA�next�append�add�parent�prefix�replaceZchanged)�selfZnodeZresultsZnames_insertedZtestlistrZnew_args�iterator�idx�argZatom�r�4/usr/lib64/python3.8/lib2to3/fixes/fix_isinstance.py�	transforms*$
zFixIsinstance.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZ	run_orderrrrrrrs	rN)�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK':�Z�@�*__pycache__/fix_apply.cpython-38.opt-2.pycnu�[���U

e5d*	�@sNddlmZddlmZddlmZddlmZmZmZGdd�dej	�Z
dS)�)�pytree)�token)�
fixer_base)�Call�Comma�parenthesizec@seZdZdZdZdd�ZdS)�FixApplyTa.
    power< 'apply'
        trailer<
            '('
            arglist<
                (not argument<NAME '=' any>) func=any ','
                (not argument<NAME '=' any>) args=any [','
                (not argument<NAME '=' any>) kwds=any] [',']
            >
            ')'
        >
    >
    c	Cs,|j}|d}|d}|�d�}|rF|j|jjkrF|jdjdkrFdS|rl|j|jjkrl|jdjdkrldS|j}|��}|jtj	|j
fkr�|j|jks�|jdjtjkr�t
|�}d|_|��}d|_|dk	r�|��}d|_t�tjd	�|g}|dk	�r|�t�t�tjd�|g�d
|d_t|||d�S)N�func�args�kwds�>�**�*r
����r� )�prefix)�syms�get�typeZargumentZchildren�valuerZcloner�NAMEZatomZpower�
DOUBLESTARrrZLeaf�STAR�extendrr)	�selfZnodeZresultsrr	r
rrZ	l_newargs�r�//usr/lib64/python3.8/lib2to3/fixes/fix_apply.py�	transformsF
��
��
�
zFixApply.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)rrZpgen2rrZ
fixer_utilrrrZBaseFixrrrrr�<module>	sPK':�Z�\�"��)__pycache__/fix_exec.cpython-38.opt-2.pycnu�[���U

e5d��@s6ddlmZddlmZmZmZGdd�dej�ZdS)�)�
fixer_base)�Comma�Name�Callc@seZdZdZdZdd�ZdS)�FixExecTzx
    exec_stmt< 'exec' a=any 'in' b=any [',' c=any] >
    |
    exec_stmt< 'exec' (not atom<'(' [any] ')'>) a=any >
    cCs�|j}|d}|�d�}|�d�}|��g}d|d_|dk	rR|�t�|��g�|dk	rn|�t�|��g�ttd�||jd�S)N�a�b�c���exec)�prefix)�syms�getZcloner
�extendrrr)�selfZnodeZresultsrrrr	�args�r�./usr/lib64/python3.8/lib2to3/fixes/fix_exec.py�	transforms



zFixExec.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)r
rZ
fixer_utilrrrZBaseFixrrrrr�<module>
sPK':�ZA���~~,__pycache__/fix_sys_exc.cpython-38.opt-1.pycnu�[���U

e5d
�@sJdZddlmZddlmZmZmZmZmZm	Z	m
Z
Gdd�dej�ZdS)z�Fixer for sys.exc_{type, value, traceback}

sys.exc_type -> sys.exc_info()[0]
sys.exc_value -> sys.exc_info()[1]
sys.exc_traceback -> sys.exc_info()[2]
�)�
fixer_base)�Attr�Call�Name�Number�	Subscript�Node�symsc@s:eZdZdddgZdZdd�dd�eD��Zd	d
�ZdS)�	FixSysExc�exc_type�	exc_value�
exc_tracebackTzN
              power< 'sys' trailer< dot='.' attribute=(%s) > >
              �|ccs|]}d|VqdS)z'%s'N�)�.0�err�1/usr/lib64/python3.8/lib2to3/fixes/fix_sys_exc.py�	<genexpr>szFixSysExc.<genexpr>cCst|dd}t|j�|j��}ttd�|jd�}ttd�|�}|dj|djd_|�	t
|��ttj
||jd�S)NZ	attribute��exc_info)�prefix�sys�dot�)rr�index�valuerrrrZchildren�appendrrr	Zpower)�selfZnodeZresultsZsys_attrrZcall�attrrrr�	transformszFixSysExc.transformN)�__name__�
__module__�__qualname__rZ
BM_compatible�joinZPATTERNrrrrrr
s
�r
N)
�__doc__�rZ
fixer_utilrrrrrrr	ZBaseFixr
rrrr�<module>s
$PK':�Z���##+__pycache__/fix_buffer.cpython-38.opt-1.pycnu�[���U

e5dN�@s2dZddlmZddlmZGdd�dej�ZdS)z4Fixer that changes buffer(...) into memoryview(...).�)�
fixer_base)�Namec@s eZdZdZdZdZdd�ZdS)�	FixBufferTzR
              power< name='buffer' trailer< '(' [any] ')' > any* >
              cCs |d}|�td|jd��dS)N�name�
memoryview)�prefix)�replacerr)�selfZnodeZresultsr�r
�0/usr/lib64/python3.8/lib2to3/fixes/fix_buffer.py�	transformszFixBuffer.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZexplicitZPATTERNrr
r
r
rrsrN)�__doc__�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK':�Zؠ�˥�*__pycache__/fix_methodattrs.cpython-38.pycnu�[���U

e5d^�@s>dZddlmZddlmZdddd�ZGdd	�d	ej�Zd
S)z;Fix bound method attributes (method.im_? -> method.__?__).
�)�
fixer_base)�Name�__func__�__self__z__self__.__class__)Zim_funcZim_selfZim_classc@seZdZdZdZdd�ZdS)�FixMethodattrsTzU
    power< any+ trailer< '.' attr=('im_func' | 'im_self' | 'im_class') > any* >
    cCs.|dd}t|j}|�t||jd��dS)N�attr�)�prefix)�MAP�value�replacerr	)�selfZnodeZresultsr�new�r�5/usr/lib64/python3.8/lib2to3/fixes/fix_methodattrs.py�	transforms
zFixMethodattrs.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)�__doc__�rZ
fixer_utilrr
ZBaseFixrrrrr�<module>s�PK':�Zz8{x,__pycache__/fix_getcwdu.cpython-38.opt-1.pycnu�[���U

e5d��@s2dZddlmZddlmZGdd�dej�ZdS)z1
Fixer that changes os.getcwdu() to os.getcwd().
�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixGetcwduTzR
              power< 'os' trailer< dot='.' name='getcwdu' > any* >
              cCs |d}|�td|jd��dS)N�name�getcwd)�prefix)�replacerr)�selfZnodeZresultsr�r
�1/usr/lib64/python3.8/lib2to3/fixes/fix_getcwdu.py�	transformszFixGetcwdu.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrr
r
r
rr
srN)�__doc__�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK':�Z�	��?	?	)__pycache__/fix_dict.cpython-38.opt-2.pycnu�[���U

e5d��@sfddlmZddlmZddlmZddlmZmZmZddlmZejdhBZ	Gdd�dej
�Zd	S)
�)�pytree)�patcomp)�
fixer_base)�Name�Call�Dot)�
fixer_util�iterc@s@eZdZdZdZdd�ZdZe�e�Z	dZ
e�e
�Zdd�Zd	S)
�FixDictTa
    power< head=any+
         trailer< '.' method=('keys'|'items'|'values'|
                              'iterkeys'|'iteritems'|'itervalues'|
                              'viewkeys'|'viewitems'|'viewvalues') >
         parens=trailer< '(' ')' >
         tail=any*
    >
    c
	Cs|d}|dd}|d}|j}|j}|�d�}|�d�}	|sD|	rP|dd�}dd	�|D�}d
d	�|D�}|o||�||�}
|t�|jt�t||j	d�g�|d�
�g}t�|j|�}|
s�|	s�d
|_	tt|r�dnd�|g�}|r�t�|j|g|�}|j	|_	|S)N�head�method��tailr	Zview�cSsg|]}|���qS���clone��.0�nrr�./usr/lib64/python3.8/lib2to3/fixes/fix_dict.py�
<listcomp>Asz%FixDict.transform.<locals>.<listcomp>cSsg|]}|���qSrrrrrrrBs)�prefixZparens��list)
�syms�value�
startswith�in_special_contextrZNodeZtrailerrrrrZpowerr)
�self�node�resultsrrrrZmethod_name�isiterZisviewZspecial�args�newrrr�	transform6s:


���
�zFixDict.transformz3power< func=NAME trailer< '(' node=any ')' > any* >zmfor_stmt< 'for' any 'in' node=any ':' any* >
            | comp_for< 'for' any 'in' node=any any* >
         cCs�|jdkrdSi}|jjdk	r^|j�|jj|�r^|d|kr^|rN|djtkS|djtjkS|sfdS|j�|j|�o�|d|kS)NFr �func)�parent�p1�matchr�iter_exemptr�consuming_calls�p2)rr r"r!rrrrZs
�
�zFixDict.in_special_contextN)
�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr%ZP1rZcompile_patternr(ZP2r,rrrrrr
)s


r
N)rrrrrrrrr+r*ZBaseFixr
rrrr�<module>sPK':�Z辻�YY0__pycache__/fix_methodattrs.cpython-38.opt-2.pycnu�[���U

e5d^�@s:ddlmZddlmZdddd�ZGdd�dej�Zd	S)
�)�
fixer_base)�Name�__func__�__self__z__self__.__class__)Zim_funcZim_selfZim_classc@seZdZdZdZdd�ZdS)�FixMethodattrsTzU
    power< any+ trailer< '.' attr=('im_func' | 'im_self' | 'im_class') > any* >
    cCs.|dd}t|j}|�t||jd��dS)N�attr�)�prefix)�MAP�value�replacerr	)�selfZnodeZresultsr�new�r�5/usr/lib64/python3.8/lib2to3/fixes/fix_methodattrs.py�	transforms
zFixMethodattrs.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)�rZ
fixer_utilrr
ZBaseFixrrrrr�<module>s�PK':�Z��-r,__pycache__/fix_unicode.cpython-38.opt-1.pycnu�[���U

e5d��@s<dZddlmZddlmZddd�ZGdd�dej�Zd	S)
z�Fixer for unicode.

* Changes unicode to str and unichr to chr.

* If "...\u..." is not unicode literal change it into "...\\u...".

* Change u"..." into "...".

�)�token)�
fixer_base�chr�str)ZunichrZunicodecs,eZdZdZdZ�fdd�Zdd�Z�ZS)�
FixUnicodeTzSTRING | 'unicode' | 'unichr'cs"tt|��||�d|jk|_dS)N�unicode_literals)�superr�
start_treeZfuture_featuresr)�selfZtree�filename��	__class__��1/usr/lib64/python3.8/lib2to3/fixes/fix_unicode.pyr	szFixUnicode.start_treecCs�|jtjkr$|��}t|j|_|S|jtjkr�|j}|jsj|ddkrjd|krjd�dd�|�	d�D��}|ddkr�|dd�}||jkr�|S|��}||_|SdS)	N�z'"�\z\\cSs g|]}|�dd��dd��qS)z\uz\\uz\Uz\\U)�replace)�.0�vrrr�
<listcomp> s�z(FixUnicode.transform.<locals>.<listcomp>ZuU�)
�typer�NAMEZclone�_mapping�value�STRINGr�join�split)r
ZnodeZresults�new�valrrr�	transforms"
�
zFixUnicode.transform)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr	r �
__classcell__rrrrrsrN)�__doc__Zpgen2r�rrZBaseFixrrrrr�<module>s

PK':�Z��&[��,__pycache__/fix_imports.cpython-38.opt-2.pycnu�[���U

e5d4�1@s�ddlmZddlmZmZdddddddd	d
ddddd
ddddddddddddddddddd d!d!d"d#d$d%d&d'd'd'd(d)d)d*d+d,�0Zd-d.�Zefd/d0�ZGd1d2�d2ej�Z	d3S)4�)�
fixer_base)�Name�
attr_chain�io�pickle�builtins�copyregZqueueZsocketserverZconfigparser�reprlibztkinter.filedialogztkinter.simpledialogztkinter.colorchooserztkinter.commondialogztkinter.dialogztkinter.dndztkinter.fontztkinter.messageboxztkinter.scrolledtextztkinter.constantsztkinter.tixztkinter.ttkZtkinterZ_markupbase�winreg�_threadZ
_dummy_threadzdbm.bsdzdbm.dumbzdbm.ndbmzdbm.gnuz
xmlrpc.clientz
xmlrpc.serverzhttp.clientz
html.entitieszhtml.parserzhttp.cookieszhttp.cookiejarzhttp.server�
subprocess�collectionszurllib.parsezurllib.robotparser)0�StringIOZ	cStringIOZcPickleZ__builtin__Zcopy_regZQueueZSocketServerZConfigParser�reprZ
FileDialogZtkFileDialogZSimpleDialogZtkSimpleDialogZtkColorChooserZtkCommonDialogZDialogZTkdndZtkFontZtkMessageBoxZScrolledTextZTkconstantsZTixZttkZTkinterZ
markupbase�_winreg�threadZdummy_threadZdbhashZdumbdbmZdbmZgdbmZ	xmlrpclibZDocXMLRPCServerZSimpleXMLRPCServerZhttplibZhtmlentitydefsZ
HTMLParserZCookieZ	cookielibZBaseHTTPServerZSimpleHTTPServerZ
CGIHTTPServerZcommands�
UserString�UserListZurlparseZrobotparsercCsdd�tt|��dS)N�(�|�))�join�mapr)�members�r�1/usr/lib64/python3.8/lib2to3/fixes/fix_imports.py�
alternates=srccsTd�dd�|D��}t|���}d||fVd|Vd||fVd|VdS)Nz | cSsg|]}d|�qS)zmodule_name='%s'r)�.0�keyrrr�
<listcomp>Bsz!build_pattern.<locals>.<listcomp>zyname_import=import_name< 'import' ((%s) |
               multiple_imports=dotted_as_names< any* (%s) any* >) >
          z�import_from< 'from' (%s) 'import' ['(']
              ( any | import_as_name< any 'as' any > |
                import_as_names< any* >)  [')'] >
          z�import_name< 'import' (dotted_as_name< (%s) 'as' any > |
               multiple_imports=dotted_as_names<
                 any* dotted_as_name< (%s) 'as' any > any* >) >
          z3power< bare_with_attr=(%s) trailer<'.' any > any* >)rr�keys)�mappingZmod_listZ
bare_namesrrr�
build_patternAs���r"csTeZdZdZdZeZdZdd�Z�fdd�Z	�fdd�Z
�fd	d
�Zdd�Z�Z
S)
�
FixImportsT�cCsd�t|j��S)Nr)rr"r!��selfrrrr"`szFixImports.build_patterncs|��|_tt|���dS�N)r"ZPATTERN�superr#�compile_patternr%��	__class__rrr)cs
zFixImports.compile_patterncsHtt|�j��|�}|rDd|kr@t�fdd�t|d�D��r@dS|SdS)N�bare_with_attrc3s|]}�|�VqdSr'r)r�obj��matchrr�	<genexpr>qsz#FixImports.match.<locals>.<genexpr>�parentF)r(r#r/�anyr)r&�node�resultsr*r.rr/js�zFixImports.matchcstt|��||�i|_dSr')r(r#�
start_tree�replace)r&Ztree�filenamer*rrr5vszFixImports.start_treecCs�|�d�}|rh|j}|j|}|�t||jd��d|krD||j|<d|kr�|�|�}|r�|�||�n2|dd}|j�|j�}|r�|�t||jd��dS)NZmodule_name)�prefixZname_importZmultiple_importsr,�)�get�valuer!r6rr8r/�	transform)r&r3r4Z
import_modZmod_name�new_nameZ	bare_namerrrr<zs



zFixImports.transform)�__name__�
__module__�__qualname__Z
BM_compatibleZkeep_line_order�MAPPINGr!Z	run_orderr"r)r/r5r<�
__classcell__rrr*rr#Usr#N)
�rZ
fixer_utilrrrArr"ZBaseFixr#rrrr�<module>sj�5PK':�Z���))+__pycache__/fix_intern.cpython-38.opt-2.pycnu�[���U

e5dx�@s2ddlmZddlmZmZGdd�dej�ZdS)�)�
fixer_base)�
ImportAndCall�touch_importc@s eZdZdZdZdZdd�ZdS)�	FixInternTZprez�
    power< 'intern'
           trailer< lpar='('
                    ( not(arglist | argument<any '=' any>) obj=any
                      | obj=arglist<(not argument<any '=' any>) any ','> )
                    rpar=')' >
           after=any*
    >
    cCsR|r2|d}|r2|j|jjkr2|jdjdkr2dSd}t|||�}tdd|�|S)N�obj�>�**�*)�sys�internr
)�typeZsymsZargumentZchildren�valuerr)�selfZnodeZresultsr�names�new�r�0/usr/lib64/python3.8/lib2to3/fixes/fix_intern.py�	transforms�zFixIntern.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�orderZPATTERNrrrrrr
s
rN)�rZ
fixer_utilrrZBaseFixrrrrr�<module>	sPK':�Z�J�qq*__pycache__/fix_apply.cpython-38.opt-1.pycnu�[���U

e5d*	�@sRdZddlmZddlmZddlmZddlmZmZm	Z	Gdd�dej
�ZdS)	zIFixer for apply().

This converts apply(func, v, k) into (func)(*v, **k).�)�pytree)�token)�
fixer_base)�Call�Comma�parenthesizec@seZdZdZdZdd�ZdS)�FixApplyTa.
    power< 'apply'
        trailer<
            '('
            arglist<
                (not argument<NAME '=' any>) func=any ','
                (not argument<NAME '=' any>) args=any [','
                (not argument<NAME '=' any>) kwds=any] [',']
            >
            ')'
        >
    >
    c	Cs,|j}|d}|d}|�d�}|rF|j|jjkrF|jdjdkrFdS|rl|j|jjkrl|jdjdkrldS|j}|��}|jtj	|j
fkr�|j|jks�|jdjtjkr�t
|�}d|_|��}d|_|dk	r�|��}d|_t�tjd	�|g}|dk	�r|�t�t�tjd�|g�d
|d_t|||d�S)N�func�args�kwds�>�**�*r
����r� )�prefix)�syms�get�typeZargumentZchildren�valuerZcloner�NAMEZatomZpower�
DOUBLESTARrrZLeaf�STAR�extendrr)	�selfZnodeZresultsrr	r
rrZ	l_newargs�r�//usr/lib64/python3.8/lib2to3/fixes/fix_apply.py�	transformsF
��
��
�
zFixApply.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)�__doc__rrZpgen2rrZ
fixer_utilrrrZBaseFixrrrrr�<module>s
PK':�Z���##%__pycache__/fix_buffer.cpython-38.pycnu�[���U

e5dN�@s2dZddlmZddlmZGdd�dej�ZdS)z4Fixer that changes buffer(...) into memoryview(...).�)�
fixer_base)�Namec@s eZdZdZdZdZdd�ZdS)�	FixBufferTzR
              power< name='buffer' trailer< '(' [any] ')' > any* >
              cCs |d}|�td|jd��dS)N�name�
memoryview)�prefix)�replacerr)�selfZnodeZresultsr�r
�0/usr/lib64/python3.8/lib2to3/fixes/fix_buffer.py�	transformszFixBuffer.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZexplicitZPATTERNrr
r
r
rrsrN)�__doc__�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK':�ZS�ӏ��,__pycache__/fix_asserts.cpython-38.opt-2.pycnu�[���U

e5d��@sPddlmZddlmZeddddddd	dddddd
dd�ZGd
d�de�ZdS)�)�BaseFix)�NameZ
assertTrueZassertEqualZassertNotEqualZassertAlmostEqualZassertNotAlmostEqualZassertRegexZassertRaisesRegexZassertRaisesZassertFalse)Zassert_ZassertEqualsZassertNotEqualsZassertAlmostEqualsZassertNotAlmostEqualsZassertRegexpMatchesZassertRaisesRegexpZfailUnlessEqualZfailIfEqualZfailUnlessAlmostEqualZfailIfAlmostEqualZ
failUnlessZfailUnlessRaisesZfailIfc@s(eZdZdd�eee��Zdd�ZdS)�
FixAssertszH
              power< any+ trailer< '.' meth=(%s)> any* >
              �|cCs,|dd}|�ttt|�|jd��dS)NZmeth�)�prefix)�replacer�NAMES�strr)�selfZnodeZresults�name�r
�1/usr/lib64/python3.8/lib2to3/fixes/fix_asserts.py�	transform szFixAsserts.transformN)	�__name__�
__module__�__qualname__�join�map�reprr	ZPATTERNrr
r
r
rrs�rN)Z
fixer_baserZ
fixer_utilr�dictr	rr
r
r
r�<module>s$�PK':�Z݉p��$__pycache__/fix_raise.cpython-38.pycnu�[���U

e5dn�@sZdZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZGdd�dej�Z
dS)	a[Fixer for 'raise E, V, T'

raise         -> raise
raise E       -> raise E
raise E, V    -> raise E(V)
raise E, V, T -> raise E(V).with_traceback(T)
raise E, None, T -> raise E.with_traceback(T)

raise (((E, E'), E''), E'''), V -> raise E(V)
raise "foo", V, T               -> warns about string exceptions


CAVEATS:
1) "raise E, V" will be incorrectly translated if V is an exception
   instance. The correct Python 3 idiom is

        raise E from V

   but since we can't detect instance-hood by syntax alone and since
   any client code would have to be changed as well, we don't automate
   this.
�)�pytree)�token)�
fixer_base)�Name�Call�Attr�ArgList�is_tuplec@seZdZdZdZdd�ZdS)�FixRaiseTzB
    raise_stmt< 'raise' exc=any [',' val=any [',' tb=any]] >
    cCsh|j}|d��}|jtjkr2d}|�||�dSt|�r^t|�rX|jdjd��}q:d|_d|kr�t	�
|jtd�|g�}|j|_|S|d��}t|�r�dd	�|jdd
�D�}nd|_|g}d|k�rB|d��}	d|	_|}
|jtj
ks�|jd
k�rt||�}
t|
td��t|	g�g}t	�
|jtd�g|�}|j|_|St	j
|jtd�t||�g|jd�SdS)N�excz+Python 3 does not support string exceptions��� �val�raisecSsg|]}|���qS�)�clone)�.0�crr�//usr/lib64/python3.8/lib2to3/fixes/fix_raise.py�
<listcomp>Dsz&FixRaise.transform.<locals>.<listcomp>�����tb�None�with_traceback)�prefix)�symsr�typer�STRINGZcannot_convertr	ZchildrenrrZNodeZ
raise_stmtr�NAME�valuerrrZsimple_stmt)�selfZnodeZresultsrr�msg�newr�argsr�eZwith_tbrrr�	transform&sB

�zFixRaise.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr'rrrrr
sr
N)�__doc__rrZpgen2rrZ
fixer_utilrrrrr	ZBaseFixr
rrrr�<module>s
PK':�Z�ٵ�.__pycache__/fix_metaclass.cpython-38.opt-1.pycnu�[���U

e5d �@svdZddlmZddlmZddlmZmZmZdd�Z	dd�Z
d	d
�Zdd�Zd
d�Z
dd�ZGdd�dej�ZdS)a�Fixer for __metaclass__ = X -> (metaclass=X) methods.

   The various forms of classef (inherits nothing, inherits once, inherits
   many) don't parse the same in the CST so we look at ALL classes for
   a __metaclass__ and if we find one normalize the inherits to all be
   an arglist.

   For one-liner classes ('class X: pass') there is no indent/dedent so
   we normalize those into having a suite.

   Moving the __metaclass__ into the classdef can also cause the class
   body to be empty so there is some special casing for that as well.

   This fixer also tries very hard to keep original indenting and spacing
   in all those corner cases.

�)�
fixer_base)�token)�syms�Node�LeafcCsz|jD]n}|jtjkr"t|�S|jtjkr|jr|jd}|jtjkr|jr|jd}t|t�r|j	dkrdSqdS)z� we have to check the cls_node without changing it.
        There are two possibilities:
          1)  clsdef => suite => simple_stmt => expr_stmt => Leaf('__meta')
          2)  clsdef => simple_stmt => expr_stmt => Leaf('__meta')
    ��
__metaclass__TF)
�children�typer�suite�
has_metaclass�simple_stmt�	expr_stmt�
isinstancer�value)�parent�node�	expr_nodeZ	left_side�r�3/usr/lib64/python3.8/lib2to3/fixes/fix_metaclass.pyrs



�rcCs�|jD]}|jtjkrdSqt|j�D]\}}|jtjkr(qJq(td��ttjg�}|j|dd�r�|j|d}|�	|�
��|��qV|�	|�|}dS)zf one-line classes don't get a suite in the parse tree so we add
        one to normalize the tree
    NzNo class suite and no ':'!�)r	r
rr�	enumerater�COLON�
ValueErrorr�append_child�clone�remove)�cls_noder�ir�	move_noderrr�fixup_parse_tree-s


r c
Cs�t|j�D]\}}|jtjkr
q(q
dS|��ttjg�}ttj	|g�}|j|d�rz|j|}|�
|���|��qJ|�||�|jdjd}|jdjd}	|	j
|_
dS)z� if there is a semi-colon all the parts count as part of the same
        simple_stmt.  We just want the __metaclass__ part so we move
        everything after the semi-colon into its own simple_stmt node
    Nr)rr	r
r�SEMIrrrrr
rr�insert_child�prefix)
rrZ	stmt_nodeZsemi_indrZnew_exprZnew_stmtrZ	new_leaf1Z	old_leaf1rrr�fixup_simple_stmtGs

r$cCs*|jr&|jdjtjkr&|jd��dS)N���)r	r
r�NEWLINEr)rrrr�remove_trailing_newline_sr'ccs�|jD]}|jtjkrq$qtd��tt|j��D]t\}}|jtjkr2|jr2|jd}|jtjkr2|jr2|jd}t	|t
�r2|jdkr2t|||�t
|�|||fVq2dS)NzNo class suite!rr)r	r
rrr�listrr
rrrrr$r')rrrZsimple_noderZ	left_noderrr�
find_metasds



�r)cCsz|jddd�}|r,|��}|jtjkrq,q|rv|��}t|t�r^|jtjkr^|jrZd|_dS|�	|jddd��q,dS)z� If an INDENT is followed by a thing with a prefix then nuke the prefix
        Otherwise we get in trouble when removing __metaclass__ at suite start
    Nr%�)
r	�popr
r�INDENTrr�DEDENTr#�extend)rZkidsrrrr�fixup_indent{sr/c@seZdZdZdZdd�ZdS)�FixMetaclassTz
    classdef<any*>
    cCs8t|�sdSt|�d}t|�D]\}}}|}|��q |jdj}t|j�dkr�|jdjtjkrp|jd}n(|jd�	�}	t
tj|	g�}|�d|�n�t|j�dkr�t
tjg�}|�d|�nZt|j�dk�rt
tjg�}|�dt
tjd��|�d|�|�dt
tjd��ntd	��|jdjd}
d
|
_|
j}|j�rZ|�t
tjd��d|
_nd
|
_|jd}d
|jd_d
|jd_|�|�t|�|j�s�|��t
|d�}
||
_|�|
�|�t
tjd��nbt|j�dk�r4|jdjtjk�r4|jdjtjk�r4t
|d�}
|�d|
�|�dt
tjd��dS)Nr����r�)�(zUnexpected class definition�	metaclass�,� r*r�pass�
���r%)rr r)rr	r
�lenr�arglistrrZ	set_childr"rr�RPAR�LPARrrr#r�COMMAr/r&r,r-)�selfrZresultsZlast_metaclassrrZstmtZ	text_typer>rZmeta_txtZorig_meta_prefixrZ	pass_leafrrr�	transform�sb




��
zFixMetaclass.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrCrrrrr0�sr0N)�__doc__r*rZpygramrZ
fixer_utilrrrrr r$r'r)r/ZBaseFixr0rrrr�<module>sPK':�Z~��uu%__pycache__/fix_reload.cpython-38.pycnu�[���U

e5d9�@s6dZddlmZddlmZmZGdd�dej�ZdS)z5Fixer for reload().

reload(s) -> importlib.reload(s)�)�
fixer_base)�
ImportAndCall�touch_importc@s eZdZdZdZdZdd�ZdS)�	FixReloadTZprez�
    power< 'reload'
           trailer< lpar='('
                    ( not(arglist | argument<any '=' any>) obj=any
                      | obj=arglist<(not argument<any '=' any>) any ','> )
                    rpar=')' >
           after=any*
    >
    cCsR|r2|d}|r2|j|jjkr2|jdjdkr2dSd}t|||�}tdd|�|S)N�obj�>�**�*)�	importlib�reloadr
)�typeZsymsZargumentZchildren�valuerr)�selfZnodeZresultsr�names�new�r�0/usr/lib64/python3.8/lib2to3/fixes/fix_reload.py�	transforms�zFixReload.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�orderZPATTERNrrrrrr
s
rN)�__doc__�rZ
fixer_utilrrZBaseFixrrrrr�<module>sPK':�Ze�~�.__pycache__/fix_raw_input.cpython-38.opt-1.pycnu�[���U

e5d��@s2dZddlmZddlmZGdd�dej�ZdS)z2Fixer that changes raw_input(...) into input(...).�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�FixRawInputTzU
              power< name='raw_input' trailer< '(' [any] ')' > any* >
              cCs |d}|�td|jd��dS)N�name�input)�prefix)�replacerr)�selfZnodeZresultsr�r
�3/usr/lib64/python3.8/lib2to3/fixes/fix_raw_input.py�	transformszFixRawInput.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrr
r
r
rrsrN)�__doc__�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK':�Z0jZZ-__pycache__/fix_ws_comma.cpython-38.opt-1.pycnu�[���U

e5dB�@s>dZddlmZddlmZddlmZGdd�dej�ZdS)z�Fixer that changes 'a ,b' into 'a, b'.

This also changes '{a :b}' into '{a: b}', but does not touch other
uses of colons.  It does not touch other uses of whitespace.

�)�pytree)�token)�
fixer_basec@s@eZdZdZdZe�ejd�Ze�ej	d�Z	ee	fZ
dd�ZdS)�
FixWsCommaTzH
    any<(not(',') any)+ ',' ((not(',') any)+ ',')* [not(',') any]>
    �,�:cCs`|��}d}|jD]H}||jkrB|j}|��r<d|kr<d|_d}q|rV|j}|sVd|_d}q|S)NF�
�T� )ZcloneZchildren�SEPS�prefix�isspace)�selfZnodeZresults�newZcommaZchildr�r�2/usr/lib64/python3.8/lib2to3/fixes/fix_ws_comma.py�	transforms

zFixWsComma.transformN)�__name__�
__module__�__qualname__ZexplicitZPATTERNrZLeafr�COMMA�COLONrrrrrrrsrN)�__doc__r	rZpgen2rrZBaseFixrrrrr�<module>sPK':�Z��*��*__pycache__/fix_paren.cpython-38.opt-2.pycnu�[���U

e5d��@s2ddlmZddlmZmZGdd�dej�ZdS)�)�
fixer_base)�LParen�RParenc@seZdZdZdZdd�ZdS)�FixParenTa
        atom< ('[' | '(')
            (listmaker< any
                comp_for<
                    'for' NAME 'in'
                    target=testlist_safe< any (',' any)+ [',']
                     >
                    [any]
                >
            >
            |
            testlist_gexp< any
                comp_for<
                    'for' NAME 'in'
                    target=testlist_safe< any (',' any)+ [',']
                     >
                    [any]
                >
            >)
        (']' | ')') >
    cCs8|d}t�}|j|_d|_|�d|�|�t��dS)N�target��)r�prefixZinsert_childZappend_childr)�selfZnodeZresultsrZlparen�r�//usr/lib64/python3.8/lib2to3/fixes/fix_paren.py�	transform%szFixParen.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrrrsrN)rrZ
fixer_utilrrZBaseFixrrrrr�<module>sPK':�Ze�a�//+__pycache__/fix_reload.cpython-38.opt-2.pycnu�[���U

e5d9�@s2ddlmZddlmZmZGdd�dej�ZdS)�)�
fixer_base)�
ImportAndCall�touch_importc@s eZdZdZdZdZdd�ZdS)�	FixReloadTZprez�
    power< 'reload'
           trailer< lpar='('
                    ( not(arglist | argument<any '=' any>) obj=any
                      | obj=arglist<(not argument<any '=' any>) any ','> )
                    rpar=')' >
           after=any*
    >
    cCsR|r2|d}|r2|j|jjkr2|jdjdkr2dSd}t|||�}tdd|�|S)N�obj�>�**�*)�	importlib�reloadr
)�typeZsymsZargumentZchildren�valuerr)�selfZnodeZresultsr�names�new�r�0/usr/lib64/python3.8/lib2to3/fixes/fix_reload.py�	transforms�zFixReload.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�orderZPATTERNrrrrrr
s
rN)�rZ
fixer_utilrrZBaseFixrrrrr�<module>sPK':�ZU$+���/__pycache__/fix_xreadlines.cpython-38.opt-2.pycnu�[���U

e5d��@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixXreadlinesTz�
    power< call=any+ trailer< '.' 'xreadlines' > trailer< '(' ')' > >
    |
    power< any+ trailer< '.' no_call='xreadlines' > >
    cCs@|�d�}|r$|�td|jd��n|�dd�|dD��dS)N�no_call�__iter__)�prefixcSsg|]}|���qS�)Zclone)�.0�xrr�4/usr/lib64/python3.8/lib2to3/fixes/fix_xreadlines.py�
<listcomp>sz+FixXreadlines.transform.<locals>.<listcomp>Zcall)�get�replacerr)�selfZnodeZresultsrrrr�	transforms
zFixXreadlines.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK':�Z^���-__pycache__/fix_imports2.cpython-38.opt-2.pycnu�[���U

e5d!�@s,ddlmZddd�ZGdd�dej�ZdS)�)�fix_importsZdbm)ZwhichdbZanydbmc@seZdZdZeZdS)�FixImports2�N)�__name__�
__module__�__qualname__Z	run_order�MAPPING�mapping�r
r
�2/usr/lib64/python3.8/lib2to3/fixes/fix_imports2.pyrsrN)�rrZ
FixImportsrr
r
r
r�<module>s�PK':�ZHILL%__pycache__/fix_idioms.cpython-38.pycnu�[���U

e5d�@sNdZddlmZddlmZmZmZmZmZm	Z	dZ
dZGdd�dej�Z
dS)	a�Adjust some old Python 2 idioms to their modern counterparts.

* Change some type comparisons to isinstance() calls:
    type(x) == T -> isinstance(x, T)
    type(x) is T -> isinstance(x, T)
    type(x) != T -> not isinstance(x, T)
    type(x) is not T -> not isinstance(x, T)

* Change "while 1:" into "while True:".

* Change both

    v = list(EXPR)
    v.sort()
    foo(v)

and the more general

    v = EXPR
    v.sort()
    foo(v)

into

    v = sorted(EXPR)
    foo(v)
�)�
fixer_base)�Call�Comma�Name�Node�	BlankLine�symsz0(n='!=' | '==' | 'is' | n=comp_op< 'is' 'not' >)z(power< 'type' trailer< '(' x=any ')' > >csPeZdZdZdeeeefZ�fdd�Zdd�Zdd�Z	d	d
�Z
dd�Z�ZS)
�	FixIdiomsTa�
        isinstance=comparison< %s %s T=any >
        |
        isinstance=comparison< T=any %s %s >
        |
        while_stmt< 'while' while='1' ':' any+ >
        |
        sorted=any<
            any*
            simple_stmt<
              expr_stmt< id1=any '='
                         power< list='list' trailer< '(' (not arglist<any+>) any ')' > >
              >
              '\n'
            >
            sort=
            simple_stmt<
              power< id2=any
                     trailer< '.' 'sort' > trailer< '(' ')' >
              >
              '\n'
            >
            next=any*
        >
        |
        sorted=any<
            any*
            simple_stmt< expr_stmt< id1=any '=' expr=any > '\n' >
            sort=
            simple_stmt<
              power< id2=any
                     trailer< '.' 'sort' > trailer< '(' ')' >
              >
              '\n'
            >
            next=any*
        >
    cs8tt|��|�}|r4d|kr4|d|dkr0|SdS|S)N�sortedZid1Zid2)�superr	�match)�self�node�r��	__class__��0/usr/lib64/python3.8/lib2to3/fixes/fix_idioms.pyrOszFixIdioms.matchcCsHd|kr|�||�Sd|kr(|�||�Sd|kr<|�||�Std��dS)N�
isinstance�whiler
z
Invalid match)�transform_isinstance�transform_while�transform_sort�RuntimeError)r
r�resultsrrr�	transformZszFixIdioms.transformcCsh|d��}|d��}d|_d|_ttd�|t�|g�}d|kr\d|_ttjtd�|g�}|j|_|S)N�x�T�� r�n�not)�clone�prefixrrrrrZnot_test)r
rrrrZtestrrrrdszFixIdioms.transform_isinstancecCs |d}|�td|jd��dS)Nr�True�r#)�replacerr#)r
rrZonerrrrpszFixIdioms.transform_whilecCs|d}|d}|�d�}|�d�}|r>|�td|jd��n8|rn|��}d|_|�ttd�|g|jd��ntd��|��|j}d	|k�r|r�|�d	�d
|d
jf}	d	�	|	�|d
_nH|j
s�t�|jdks�t�t
�}
|j
�|
�|j|
ks�t�|�d	�d
|
_dS)N�sort�next�list�exprr
r%rzshould not have reached here�
�)�getr&rr#r"rr�remove�
rpartition�join�parent�AssertionErrorZnext_siblingrZappend_child)r
rrZ	sort_stmtZ	next_stmtZ	list_callZsimple_expr�newZbtwnZprefix_linesZend_linerrrrts2

�


zFixIdioms.transform_sort)
�__name__�
__module__�__qualname__Zexplicit�TYPE�CMPZPATTERNrrrrr�
__classcell__rrrrr	%s%
�'
r	N)�__doc__rrZ
fixer_utilrrrrrrr8r7ZBaseFixr	rrrr�<module>s
 PK':�Z���'__pycache__/fix_exitfunc.cpython-38.pycnu�[���U

e5d�	�@sJdZddlmZmZddlmZmZmZmZm	Z	m
Z
Gdd�dej�ZdS)z7
Convert use of sys.exitfunc to use the atexit module.
�)�pytree�
fixer_base)�Name�Attr�Call�Comma�Newline�symscs<eZdZdZdZdZ�fdd�Z�fdd�Zdd�Z�Z	S)	�FixExitfuncTa�
              (
                  sys_import=import_name<'import'
                      ('sys'
                      |
                      dotted_as_names< (any ',')* 'sys' (',' any)* >
                      )
                  >
              |
                  expr_stmt<
                      power< 'sys' trailer< '.' 'exitfunc' > >
                  '=' func=any >
              )
              cstt|�j|�dS�N)�superr
�__init__)�self�args��	__class__��2/usr/lib64/python3.8/lib2to3/fixes/fix_exitfunc.pyr
szFixExitfunc.__init__cstt|��||�d|_dSr)rr
�
start_tree�
sys_import)rZtree�filenamerrrr!szFixExitfunc.start_treecCs&d|kr |jdkr|d|_dS|d��}d|_t�tjttd�td���}t	||g|j�}|�
|�|jdkr�|�|d�dS|jjd}|j
tjkr�|�t��|�tdd��nj|jj}|j�|j�}|j}	t�tjtd	�tdd�g�}
t�tj|
g�}|�|dt��|�|d
|�dS)Nr�func��atexit�registerzKCan't find sys import; Please add an atexit import at the top of your file.�� �import�)rZclone�prefixrZNoder	Zpowerrrr�replaceZwarningZchildren�typeZdotted_as_namesZappend_childr�parent�indexZimport_nameZsimple_stmtZinsert_childr)rZnodeZresultsrrZcall�namesZcontaining_stmtZpositionZstmt_containerZ
new_import�newrrr�	transform%s6

�

�zFixExitfunc.transform)
�__name__�
__module__�__qualname__Zkeep_line_orderZ
BM_compatibleZPATTERNr
rr&�
__classcell__rrrrr
sr
N)
�__doc__Zlib2to3rrZlib2to3.fixer_utilrrrrrr	ZBaseFixr
rrrr�<module>s PK':�ZT����1__pycache__/fix_tuple_params.cpython-38.opt-1.pycnu�[���U

e5d��@s�dZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZmZdd�Z
Gdd	�d	ej�Zd
d�Zdd
�Zgdfdd�Zdd�ZdS)a:Fixer for function definitions with tuple parameters.

def func(((a, b), c), d):
    ...

    ->

def func(x, d):
    ((a, b), c) = x
    ...

It will also support lambdas:

    lambda (x, y): x + y -> lambda t: t[0] + t[1]

    # The parens are a syntax error in Python 3
    lambda (x): x + y -> lambda x: x + y
�)�pytree)�token)�
fixer_base)�Assign�Name�Newline�Number�	Subscript�symscCst|tj�o|jdjtjkS)N�)�
isinstancer�Node�children�typer�STRING)�stmt�r�6/usr/lib64/python3.8/lib2to3/fixes/fix_tuple_params.py�is_docstrings�rc@s(eZdZdZdZdZdd�Zdd�ZdS)	�FixTupleParams�Ta
              funcdef< 'def' any parameters< '(' args=any ')' >
                       ['->' any] ':' suite=any+ >
              |
              lambda=
              lambdef< 'lambda' args=vfpdef< '(' inner=any ')' >
                       ':' body=any
              >
              cs�d|kr��||�Sg�|d}|d}|djdjtjkrZd}|djdj}t��nd}d}t�tjd��d���fd
d�	}|jt	j
kr�||�n<|jt	jkr�t|j�D]$\}}	|	jt	j
kr�||	|dkd�q��s�dS�D]}
|d|
_
q�|}|dk�r
d
�d_n&t|dj|��r0|�d_|d}�D]}
|d|
_
�q4�|dj||�<t|d|t��d�D]}||dj|_�qr|d��dS)N�lambda�suite�argsr�rz; �Fcs\t����}|��}d|_t||���}|r2d|_|�|���t�t	j
|���g��dS)Nr� )r�new_name�clone�prefixr�replace�appendrr
r
Zsimple_stmt)Z	tuple_arg�
add_prefix�n�argr��endZ	new_lines�selfrr�handle_tupleCs

�z.FixTupleParams.transform.<locals>.handle_tuple)r"r)F)�transform_lambdarrr�INDENT�valuerrZLeafr
ZtfpdefZ
typedargslist�	enumerate�parentrr�range�lenZchanged)r'�node�resultsrr�start�indentr(�ir$�lineZafterrr%r�	transform.sF


zFixTupleParams.transformc
Cs�|d}|d}t|d�}|jtjkrD|��}d|_|�|�dSt|�}t|�}|�	t
|��}t|dd�}	|�|	���|��D]X}
|
jtjkr�|
j
|kr�dd�||
j
D�}t�tj|	��g|�}|
j|_|
�|�q�dS)Nr�body�innerr)rcSsg|]}|���qSr)r��.0�crrr�
<listcomp>�sz3FixTupleParams.transform_lambda.<locals>.<listcomp>)�
simplify_argsrr�NAMErrr �find_params�map_to_indexr�
tuple_namerZ
post_orderr+rr
r
Zpower)
r'r0r1rr7r8ZparamsZto_indexZtup_nameZ	new_paramr#Z
subscripts�newrrrr)ns*
�zFixTupleParams.transform_lambdaN)�__name__�
__module__�__qualname__Z	run_orderZ
BM_compatibleZPATTERNr6r)rrrrrs

@rcCsN|jtjtjfkr|S|jtjkr>|jtjkr:|jd}q"|Std|��dS)NrzReceived unexpected node %s)rr
Zvfplistrr>�vfpdefr�RuntimeError�r0rrrr=�sr=cCs<|jtjkrt|jd�S|jtjkr,|jSdd�|jD�S)NrcSs g|]}|jtjkrt|��qSr)rr�COMMAr?r9rrrr<�szfind_params.<locals>.<listcomp>)rr
rFr?rrr>r+rHrrrr?�s
r?NcCsZ|dkri}t|�D]@\}}ttt|���g}t|t�rHt|||d�q||||<q|S)N)�d)r,r	r�strr�listr@)�
param_listrrJr4�objZtrailerrrrr@�s
r@cCs<g}|D](}t|t�r&|�t|��q|�|�qd�|�S)N�_)rrLr!rA�join)rM�lrNrrrrA�s
rA)�__doc__rrZpgen2rrZ
fixer_utilrrrrr	r
rZBaseFixrr=r?r@rArrrr�<module>s lPK':�Z��9��)__pycache__/fix_next.cpython-38.opt-2.pycnu�[���U

e5df�@sjddlmZddlmZddlmZddlmZm	Z	m
Z
dZGdd�dej�Z
dd	�Zd
d�Zdd
�ZdS)�)�token)�python_symbols)�
fixer_base)�Name�Call�find_bindingz;Calls to builtin next() possibly shadowed by global bindingcs0eZdZdZdZdZ�fdd�Zdd�Z�ZS)�FixNextTa�
    power< base=any+ trailer< '.' attr='next' > trailer< '(' ')' > >
    |
    power< head=any+ trailer< '.' attr='next' > not trailer< '(' ')' > >
    |
    classdef< 'class' any+ ':'
              suite< any*
                     funcdef< 'def'
                              name='next'
                              parameters< '(' NAME ')' > any+ >
                     any* > >
    |
    global=global_stmt< 'global' any* 'next' any* >
    Zprecs>tt|��||�td|�}|r4|�|t�d|_nd|_dS)N�nextTF)�superr�
start_treer�warning�bind_warning�
shadowed_next)�selfZtree�filename�n��	__class__��./usr/lib64/python3.8/lib2to3/fixes/fix_next.pyr$s
zFixNext.start_treecCs�|�d�}|�d�}|�d�}|rr|jr>|�td|jd��q�dd�|D�}d|d	_|�ttd
|jd�|��n�|r�td|jd�}|�|�nj|r�t|�r�|d}d�dd�|D����d
kr�|�	|t
�dS|�td��nd|kr�|�	|t
�d|_dS)N�base�attr�name�__next__)�prefixcSsg|]}|���qSr)Zclone��.0rrrr�
<listcomp>9sz%FixNext.transform.<locals>.<listcomp>��r	�headcSsg|]}t|��qSr)�strrrrrrEsZ__builtin__�globalT)�getr�replacerrr�is_assign_target�join�striprr
)r�nodeZresultsrrrrr rrr�	transform.s,



zFixNext.transform)	�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERN�orderrr)�
__classcell__rrrrrs

rcCsFt|�}|dkrdS|jD]&}|jtjkr0dSt||�rdSqdS)NFT)�find_assign�children�typer�EQUAL�
is_subtree)r(ZassignZchildrrrr%Qs

r%cCs4|jtjkr|S|jtjks&|jdkr*dSt|j�S�N)r1�symsZ	expr_stmtZsimple_stmt�parentr/�r(rrrr/]s
r/cs$|�krdSt�fdd�|jD��S)NTc3s|]}t|��VqdSr4)r3)r�cr7rr�	<genexpr>gszis_subtree.<locals>.<genexpr>)�anyr0)�rootr(rr7rr3dsr3N)Zpgen2rZpygramrr5rrZ
fixer_utilrrrr
ZBaseFixrr%r/r3rrrr�<module>	s@PK':�Z���jj+__pycache__/fix_urllib.cpython-38.opt-1.pycnu�[���U

e5d� �@s�dZddlmZmZddlmZmZmZmZm	Z	m
Z
mZdddddd	d
ddgfd
dddddddddddddddgfddgfgdd	dd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5gfdd6d7gfgd8�Zed9�
ed:d;�d<d=�ZGd>d?�d?e�Zd@S)Az�Fix changes imports of urllib which are now incompatible.
   This is rather similar to fix_imports, but because of the more
   complex nature of the fixing for urllib, it has its own fixer.
�)�
alternates�
FixImports)�Name�Comma�
FromImport�Newline�find_indentation�Node�symszurllib.requestZ	URLopenerZFancyURLopenerZurlretrieveZ
_urlopenerZurlopenZ
urlcleanupZpathname2urlZurl2pathnamezurllib.parseZquoteZ
quote_plusZunquoteZunquote_plusZ	urlencodeZ	splitattrZ	splithostZ
splitnportZsplitpasswdZ	splitportZ
splitqueryZsplittagZ	splittypeZ	splituserZ
splitvaluezurllib.errorZContentTooShortErrorZinstall_openerZbuild_openerZRequestZOpenerDirectorZBaseHandlerZHTTPDefaultErrorHandlerZHTTPRedirectHandlerZHTTPCookieProcessorZProxyHandlerZHTTPPasswordMgrZHTTPPasswordMgrWithDefaultRealmZAbstractBasicAuthHandlerZHTTPBasicAuthHandlerZProxyBasicAuthHandlerZAbstractDigestAuthHandlerZHTTPDigestAuthHandlerZProxyDigestAuthHandlerZHTTPHandlerZHTTPSHandlerZFileHandlerZ
FTPHandlerZCacheFTPHandlerZUnknownHandlerZURLErrorZ	HTTPError)�urllib�urllib2rr�ccsvt�}t��D]b\}}|D]T}|\}}t|�}d||fVd|||fVd|Vd|Vd||fVqqdS)Nz�import_name< 'import' (module=%r
                                  | dotted_as_names< any* module=%r any* >) >
                  z�import_from< 'from' mod_member=%r 'import'
                       ( member=%s | import_as_name< member=%s 'as' any > |
                         import_as_names< members=any*  >) >
                  zIimport_from< 'from' module_star=%r 'import' star='*' >
                  ztimport_name< 'import'
                                  dotted_as_name< module_as=%r 'as' any > >
                  zKpower< bare_with_attr=%r trailer< '.' member=%s > any* >
                  )�set�MAPPING�itemsr)ZbareZ
old_moduleZchanges�changeZ
new_module�members�r�0/usr/lib64/python3.8/lib2to3/fixes/fix_urllib.py�
build_pattern0s(�����rc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�	FixUrllibcCsd�t��S)N�|)�joinr)�selfrrrrIszFixUrllib.build_patterncCsv|�d�}|j}g}t|jdd�D] }|�t|d|d�t�g�q&|�tt|jdd|d��|�|�dS)z�Transform for the basic import case. Replaces the old
           import name with a comma separated list of its
           replacements.
        �moduleN���r��prefix)	�getrr�value�extendrr�append�replace)r�node�resultsZ
import_mod�pref�names�namerrr�transform_importLs
 zFixUrllib.transform_importcCs&|�d�}|j}|�d�}|r�t|t�r0|d}d}t|jD]}|j|dkr>|d}q^q>|rv|�t||d��n|�|d��n�g}i}	|d}
|
D]�}|j	t
jkr�|jd	j}|jdj}n
|j}d}|d
kr�t|jD]B}||dkr�|d|	k�r|�
|d�|	�|dg��
|�q�q�g}
t|�}d}dd
�}|D]�}|	|}g}|dd�D]"}|�|||��|�
t���q^|�||d|��t||�}|�r�|jj�|��r�||_|
�
|�d}�qB|
�rg}|
dd�D]}|�|t�g��q�|�
|
d�|�|�n|�|d�dS)z�Transform for imports of specific module elements. Replaces
           the module to be imported from with the appropriate new
           module.
        �
mod_member�memberrNr
r�!This is an invalid module elementr��,TcSsX|jtjkrHt|jdj|d�|jd��|jd��g}ttj|�gSt|j|d�gS)Nrrr
r,)�typer
�import_as_namer�childrenrZcloner	)r'rZkidsrrr�handle_name�s�z/FixUrllib.transform_member.<locals>.handle_namerFzAll module elements are invalid)rr�
isinstance�listrrr"r�cannot_convertr.r
r/r0r!�
setdefaultrr rr�parent�endswithr)rr#r$r)r%r*�new_namer�modulesZmod_dictrZas_name�member_nameZ	new_nodesZindentation�firstr1rZeltsr&Zelt�newZnodesZnew_noderrr�transform_member\sh




zFixUrllib.transform_membercCs~|�d�}|�d�}d}t|t�r*|d}t|jD]}|j|dkr4|d}qTq4|rn|�t||jd��n|�|d�dS)z.Transform for calls to module members in code.�bare_with_attrr*Nrr
rr+)	rr2r3rrr"rrr4)rr#r$Z
module_dotr*r8rrrr�
transform_dot�s


�
zFixUrllib.transform_dotcCsz|�d�r|�||�n^|�d�r0|�||�nF|�d�rH|�||�n.|�d�r`|�|d�n|�d�rv|�|d�dS)Nrr)r>Zmodule_starzCannot handle star imports.Z	module_asz#This module is now multiple modules)rr(r=r?r4)rr#r$rrr�	transform�s




zFixUrllib.transformN)�__name__�
__module__�__qualname__rr(r=r?r@rrrrrGs
LrN)�__doc__Zlib2to3.fixes.fix_importsrrZlib2to3.fixer_utilrrrrrr	r
rr!rrrrrr�<module>s~$������
�����!PK':�Z����(__pycache__/fix_zip.cpython-38.opt-2.pycnu�[���U

e5d	�@sNddlmZddlmZddlmZddlmZm	Z	m
Z
Gdd�dej�ZdS)�)�
fixer_base)�Node)�python_symbols)�Name�ArgList�in_special_contextc@s eZdZdZdZdZdd�ZdS)�FixZipTzN
    power< 'zip' args=trailer< '(' [any] ')' > [trailers=trailer*]
    >
    zfuture_builtins.zipcCs�|�|�rdSt|�rdS|d��}d|_g}d|krZdd�|dD�}|D]
}d|_qNttjtd�|gdd�}ttjtd�t|g�g|�}|j|_|S)	N�args��trailerscSsg|]}|���qS�)�clone)�.0�nrr�-/usr/lib64/python3.8/lib2to3/fixes/fix_zip.py�
<listcomp>'sz$FixZip.transform.<locals>.<listcomp>�zip)�prefix�list)	Zshould_skiprr
rr�symsZpowerrr)�selfZnodeZresultsr	rr�newrrr�	transforms
zFixZip.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onrrrrrrsrN)
r
rZpytreerZpygramrrZ
fixer_utilrrrZConditionalFixrrrrr�<module>sPK':�Z}����)__pycache__/fix_basestring.cpython-38.pycnu�[���U

e5d@�@s2dZddlmZddlmZGdd�dej�ZdS)zFixer for basestring -> str.�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixBasestringTz'basestring'cCstd|jd�S)N�str)�prefix)rr)�selfZnodeZresults�r�4/usr/lib64/python3.8/lib2to3/fixes/fix_basestring.py�	transform
szFixBasestring.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrr	rsrN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr	�<module>sPK':�Z��T��+__pycache__/fix_future.cpython-38.opt-2.pycnu�[���U

e5d#�@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�	BlankLinec@s eZdZdZdZdZdd�ZdS)�	FixFutureTz;import_from< 'from' module_name="__future__" 'import' any >�
cCst�}|j|_|S)N)r�prefix)�selfZnodeZresults�new�r	�0/usr/lib64/python3.8/lib2to3/fixes/fix_future.py�	transformszFixFuture.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZ	run_orderrr	r	r	r
rsrN)�rZ
fixer_utilrZBaseFixrr	r	r	r
�<module>sPK':�ZT����+__pycache__/fix_tuple_params.cpython-38.pycnu�[���U

e5d��@s�dZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZmZdd�Z
Gdd	�d	ej�Zd
d�Zdd
�Zgdfdd�Zdd�ZdS)a:Fixer for function definitions with tuple parameters.

def func(((a, b), c), d):
    ...

    ->

def func(x, d):
    ((a, b), c) = x
    ...

It will also support lambdas:

    lambda (x, y): x + y -> lambda t: t[0] + t[1]

    # The parens are a syntax error in Python 3
    lambda (x): x + y -> lambda x: x + y
�)�pytree)�token)�
fixer_base)�Assign�Name�Newline�Number�	Subscript�symscCst|tj�o|jdjtjkS)N�)�
isinstancer�Node�children�typer�STRING)�stmt�r�6/usr/lib64/python3.8/lib2to3/fixes/fix_tuple_params.py�is_docstrings�rc@s(eZdZdZdZdZdd�Zdd�ZdS)	�FixTupleParams�Ta
              funcdef< 'def' any parameters< '(' args=any ')' >
                       ['->' any] ':' suite=any+ >
              |
              lambda=
              lambdef< 'lambda' args=vfpdef< '(' inner=any ')' >
                       ':' body=any
              >
              cs�d|kr��||�Sg�|d}|d}|djdjtjkrZd}|djdj}t��nd}d}t�tjd��d���fd
d�	}|jt	j
kr�||�n<|jt	jkr�t|j�D]$\}}	|	jt	j
kr�||	|dkd�q��s�dS�D]}
|d|
_
q�|}|dk�r
d
�d_n&t|dj|��r0|�d_|d}�D]}
|d|
_
�q4�|dj||�<t|d|t��d�D]}||dj|_�qr|d��dS)N�lambda�suite�argsr�rz; �Fcs\t����}|��}d|_t||���}|r2d|_|�|���t�t	j
|���g��dS)Nr� )r�new_name�clone�prefixr�replace�appendrr
r
Zsimple_stmt)Z	tuple_arg�
add_prefix�n�argr��endZ	new_lines�selfrr�handle_tupleCs

�z.FixTupleParams.transform.<locals>.handle_tuple)r"r)F)�transform_lambdarrr�INDENT�valuerrZLeafr
ZtfpdefZ
typedargslist�	enumerate�parentrr�range�lenZchanged)r'�node�resultsrr�start�indentr(�ir$�lineZafterrr%r�	transform.sF


zFixTupleParams.transformc
Cs�|d}|d}t|d�}|jtjkrD|��}d|_|�|�dSt|�}t|�}|�	t
|��}t|dd�}	|�|	���|��D]X}
|
jtjkr�|
j
|kr�dd�||
j
D�}t�tj|	��g|�}|
j|_|
�|�q�dS)Nr�body�innerr)rcSsg|]}|���qSr)r��.0�crrr�
<listcomp>�sz3FixTupleParams.transform_lambda.<locals>.<listcomp>)�
simplify_argsrr�NAMErrr �find_params�map_to_indexr�
tuple_namerZ
post_orderr+rr
r
Zpower)
r'r0r1rr7r8ZparamsZto_indexZtup_nameZ	new_paramr#Z
subscripts�newrrrr)ns*
�zFixTupleParams.transform_lambdaN)�__name__�
__module__�__qualname__Z	run_orderZ
BM_compatibleZPATTERNr6r)rrrrrs

@rcCsN|jtjtjfkr|S|jtjkr>|jtjkr:|jd}q"|Std|��dS)NrzReceived unexpected node %s)rr
Zvfplistrr>�vfpdefr�RuntimeError�r0rrrr=�sr=cCs<|jtjkrt|jd�S|jtjkr,|jSdd�|jD�S)NrcSs g|]}|jtjkrt|��qSr)rr�COMMAr?r9rrrr<�szfind_params.<locals>.<listcomp>)rr
rFr?rrr>r+rHrrrr?�s
r?NcCsZ|dkri}t|�D]@\}}ttt|���g}t|t�rHt|||d�q||||<q|S)N)�d)r,r	r�strr�listr@)�
param_listrrJr4�objZtrailerrrrr@�s
r@cCs<g}|D](}t|t�r&|�t|��q|�|�qd�|�S)N�_)rrLr!rA�join)rM�lrNrrrrA�s
rA)�__doc__rrZpgen2rrZ
fixer_utilrrrrr	r
rZBaseFixrr=r?r@rArrrr�<module>s lPK':�Zz8{x&__pycache__/fix_getcwdu.cpython-38.pycnu�[���U

e5d��@s2dZddlmZddlmZGdd�dej�ZdS)z1
Fixer that changes os.getcwdu() to os.getcwd().
�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixGetcwduTzR
              power< 'os' trailer< dot='.' name='getcwdu' > any* >
              cCs |d}|�td|jd��dS)N�name�getcwd)�prefix)�replacerr)�selfZnodeZresultsr�r
�1/usr/lib64/python3.8/lib2to3/fixes/fix_getcwdu.py�	transformszFixGetcwdu.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrr
r
r
rr
srN)�__doc__�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK':�Z�.���*__pycache__/fix_input.cpython-38.opt-1.pycnu�[���U

e5d��@sLdZddlmZddlmZmZddlmZe�d�ZGdd�dej	�Z
dS)	z4Fixer that changes input(...) into eval(input(...)).�)�
fixer_base)�Call�Name)�patcompz&power< 'eval' trailer< '(' any ')' > >c@seZdZdZdZdd�ZdS)�FixInputTzL
              power< 'input' args=trailer< '(' [any] ')' > >
              cCs6t�|jj�rdS|��}d|_ttd�|g|jd�S)N��eval)�prefix)�context�match�parentZcloner	rr)�selfZnodeZresults�new�r�//usr/lib64/python3.8/lib2to3/fixes/fix_input.py�	transforms
zFixInput.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrr
srN)�__doc__rrZ
fixer_utilrrrZcompile_patternr
ZBaseFixrrrrr�<module>s

PK':�Z��xC��+__pycache__/fix_filter.cpython-38.opt-2.pycnu�[���U

e5d�
�@sVddlmZddlmZddlmZddlmZm	Z	m
Z
mZmZGdd�dej
�ZdS)�)�
fixer_base)�Node)�python_symbols)�Name�ArgList�ListComp�in_special_context�parenthesizec@s eZdZdZdZdZdd�ZdS)�	FixFilterTaV
    filter_lambda=power<
        'filter'
        trailer<
            '('
            arglist<
                lambdef< 'lambda'
                         (fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any
                >
                ','
                it=any
            >
            ')'
        >
        [extra_trailers=trailer*]
    >
    |
    power<
        'filter'
        trailer< '(' arglist< none='None' ',' seq=any > ')' >
        [extra_trailers=trailer*]
    >
    |
    power<
        'filter'
        args=trailer< '(' [any] ')' >
        [extra_trailers=trailer*]
    >
    zfuture_builtins.filtercCsL|�|�rdSg}d|kr6|dD]}|�|���q"d|kr�|�d���}|jtjkrfd|_t|�}t	|�d���|�d���|�d���|�}t
tj|g|dd�}n�d|kr�t	td	�td	�|d
��td	��}t
tj|g|dd�}nTt
|�r�dS|d��}t
tjtd�|gdd�}t
tjtd
�t|g�g|�}d|_|j|_|S)NZextra_trailersZ
filter_lambda�xp��fp�it)�prefixZnoneZ_f�seq�args�filter�list)Zshould_skip�appendZclone�get�type�symsZtestrr	rrZpowerrrr)�selfZnodeZresultsZtrailers�tr�newr�r�0/usr/lib64/python3.8/lib2to3/fixes/fix_filter.py�	transform:s@
�
�zFixFilter.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onrrrrrr
sr
N)rrZpytreerZpygramrrZ
fixer_utilrrrrr	ZConditionalFixr
rrrr�<module>sPK':�Z��xQ��-__pycache__/fix_exitfunc.cpython-38.opt-2.pycnu�[���U

e5d�	�@sFddlmZmZddlmZmZmZmZmZm	Z	Gdd�dej
�ZdS)�)�pytree�
fixer_base)�Name�Attr�Call�Comma�Newline�symscs<eZdZdZdZdZ�fdd�Z�fdd�Zdd�Z�Z	S)	�FixExitfuncTa�
              (
                  sys_import=import_name<'import'
                      ('sys'
                      |
                      dotted_as_names< (any ',')* 'sys' (',' any)* >
                      )
                  >
              |
                  expr_stmt<
                      power< 'sys' trailer< '.' 'exitfunc' > >
                  '=' func=any >
              )
              cstt|�j|�dS�N)�superr
�__init__)�self�args��	__class__��2/usr/lib64/python3.8/lib2to3/fixes/fix_exitfunc.pyr
szFixExitfunc.__init__cstt|��||�d|_dSr)rr
�
start_tree�
sys_import)rZtree�filenamerrrr!szFixExitfunc.start_treecCs&d|kr |jdkr|d|_dS|d��}d|_t�tjttd�td���}t	||g|j�}|�
|�|jdkr�|�|d�dS|jjd}|j
tjkr�|�t��|�tdd��nj|jj}|j�|j�}|j}	t�tjtd	�tdd�g�}
t�tj|
g�}|�|dt��|�|d
|�dS)Nr�func��atexit�registerzKCan't find sys import; Please add an atexit import at the top of your file.�� �import�)rZclone�prefixrZNoder	Zpowerrrr�replaceZwarningZchildren�typeZdotted_as_namesZappend_childr�parent�indexZimport_nameZsimple_stmtZinsert_childr)rZnodeZresultsrrZcall�namesZcontaining_stmtZpositionZstmt_containerZ
new_import�newrrr�	transform%s6

�

�zFixExitfunc.transform)
�__name__�
__module__�__qualname__Zkeep_line_orderZ
BM_compatibleZPATTERNr
rr&�
__classcell__rrrrr
sr
N)Zlib2to3rrZlib2to3.fixer_utilrrrrrr	ZBaseFixr
rrrr�<module>s PK':�Z�}��
�
+__pycache__/fix_import.cpython-38.opt-1.pycnu�[���U

e5d��@sZdZddlmZddlmZmZmZmZddlm	Z	m
Z
mZdd�ZGdd	�d	ej
�Zd
S)z�Fixer for import statements.
If spam is being imported from the local directory, this import:
    from spam import eggs
Becomes:
    from .spam import eggs

And this import:
    import spam
Becomes:
    from . import spam
�)�
fixer_base�)�dirname�join�exists�sep)�
FromImport�syms�tokenccs�|g}|r�|��}|jtjkr(|jVq|jtjkrNd�dd�|jD��Vq|jtj	krl|�
|jd�q|jtjkr�|�|jddd��qt
d��qdS)zF
    Walks over all the names imported in a dotted_as_names node.
    �cSsg|]
}|j�qS�)�value)�.0Zchrr�0/usr/lib64/python3.8/lib2to3/fixes/fix_import.py�
<listcomp>sz$traverse_imports.<locals>.<listcomp>rN���zunknown node type)�pop�typer
�NAMEr
r	Zdotted_namer�childrenZdotted_as_name�appendZdotted_as_names�extend�AssertionError)�namesZpending�noderrr�traverse_importss
rcs4eZdZdZdZ�fdd�Zdd�Zdd�Z�ZS)	�	FixImportTzj
    import_from< 'from' imp=any 'import' ['('] any [')'] >
    |
    import_name< 'import' imp=any >
    cs"tt|��||�d|jk|_dS)NZabsolute_import)�superr�
start_treeZfuture_features�skip)�selfZtree�name��	__class__rrr/szFixImport.start_treecCs�|jr
dS|d}|jtjkrVt|d�s4|jd}q|�|j�r�d|j|_|��nZd}d}t	|�D]}|�|�rzd}qfd}qf|r�|r�|�
|d�dStd|g�}|j|_|SdS)N�impr
r�.FTz#absolute and local imports together)
rrr	Zimport_from�hasattrr�probably_a_local_importr
ZchangedrZwarningr�prefix)r rZresultsr$Z
have_localZ
have_absoluteZmod_name�newrrr�	transform3s,


zFixImport.transformcCst|�d�rdS|�dd�d}t|j�}t||�}ttt|�d��sHdSdtddd	d
fD]}t||�rXdSqXdS)Nr%F�rz__init__.pyz.pyz.pycz.soz.slz.pydT)�
startswith�splitr�filenamerrr)r Zimp_name�	base_pathZextrrrr'Us


z!FixImport.probably_a_local_import)	�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrr*r'�
__classcell__rrr"rr&s
"rN)�__doc__rrZos.pathrrrrZ
fixer_utilrr	r
rZBaseFixrrrrr�<module>s

PK':�Z���Ӽ�)__pycache__/fix_long.cpython-38.opt-1.pycnu�[���U

e5d��@s2dZddlmZddlmZGdd�dej�ZdS)z/Fixer that turns 'long' into 'int' everywhere.
�)�
fixer_base)�is_probably_builtinc@seZdZdZdZdd�ZdS)�FixLongTz'long'cCst|�rd|_|��dS)N�int)r�valueZchanged)�selfZnodeZresults�r�./usr/lib64/python3.8/lib2to3/fixes/fix_long.py�	transformszFixLong.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrr	rsrN)�__doc__Zlib2to3rZlib2to3.fixer_utilrZBaseFixrrrrr	�<module>sPK':�Zb����&__pycache__/fix_asserts.cpython-38.pycnu�[���U

e5d��@sTdZddlmZddlmZedddddd	d
dddddddd
�ZGdd�de�ZdS)z5Fixer that replaces deprecated unittest method names.�)�BaseFix)�NameZ
assertTrueZassertEqualZassertNotEqualZassertAlmostEqualZassertNotAlmostEqualZassertRegexZassertRaisesRegexZassertRaisesZassertFalse)Zassert_ZassertEqualsZassertNotEqualsZassertAlmostEqualsZassertNotAlmostEqualsZassertRegexpMatchesZassertRaisesRegexpZfailUnlessEqualZfailIfEqualZfailUnlessAlmostEqualZfailIfAlmostEqualZ
failUnlessZfailUnlessRaisesZfailIfc@s(eZdZdd�eee��Zdd�ZdS)�
FixAssertszH
              power< any+ trailer< '.' meth=(%s)> any* >
              �|cCs,|dd}|�ttt|�|jd��dS)NZmeth�)�prefix)�replacer�NAMES�strr)�selfZnodeZresults�name�r
�1/usr/lib64/python3.8/lib2to3/fixes/fix_asserts.py�	transform szFixAsserts.transformN)	�__name__�
__module__�__qualname__�join�map�reprr	ZPATTERNrr
r
r
rrs�rN)�__doc__Z
fixer_baserZ
fixer_utilr�dictr	rr
r
r
r�<module>s&�PK':�Z�.���$__pycache__/fix_input.cpython-38.pycnu�[���U

e5d��@sLdZddlmZddlmZmZddlmZe�d�ZGdd�dej	�Z
dS)	z4Fixer that changes input(...) into eval(input(...)).�)�
fixer_base)�Call�Name)�patcompz&power< 'eval' trailer< '(' any ')' > >c@seZdZdZdZdd�ZdS)�FixInputTzL
              power< 'input' args=trailer< '(' [any] ')' > >
              cCs6t�|jj�rdS|��}d|_ttd�|g|jd�S)N��eval)�prefix)�context�match�parentZcloner	rr)�selfZnodeZresults�new�r�//usr/lib64/python3.8/lib2to3/fixes/fix_input.py�	transforms
zFixInput.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrr
srN)�__doc__rrZ
fixer_utilrrrZcompile_patternr
ZBaseFixrrrrr�<module>s

PK':�Zy_�$$__pycache__/fix_throw.cpython-38.pycnu�[���U

e5d.�@sZdZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZGdd�dej�Z
dS)	z�Fixer for generator.throw(E, V, T).

g.throw(E)       -> g.throw(E)
g.throw(E, V)    -> g.throw(E(V))
g.throw(E, V, T) -> g.throw(E(V).with_traceback(T))

g.throw("foo"[, V[, T]]) will warn about string exceptions.�)�pytree)�token)�
fixer_base)�Name�Call�ArgList�Attr�is_tuplec@seZdZdZdZdd�ZdS)�FixThrowTz�
    power< any trailer< '.' 'throw' >
           trailer< '(' args=arglist< exc=any ',' val=any [',' tb=any] > ')' >
    >
    |
    power< any trailer< '.' 'throw' > trailer< '(' exc=any ')' > >
    cCs�|j}|d��}|jtjkr.|�|d�dS|�d�}|dkrDdS|��}t|�rndd�|jdd�D�}nd|_	|g}|d	}d
|kr�|d
��}d|_	t
||�}	t|	td��t
|g�g}
|�t�|j|
��n|�t
||��dS)N�excz+Python 3 does not support string exceptions�valcSsg|]}|���qS�)�clone)�.0�cr
r
�//usr/lib64/python3.8/lib2to3/fixes/fix_throw.py�
<listcomp>)sz&FixThrow.transform.<locals>.<listcomp>������args�tb�with_traceback)�symsr�typer�STRINGZcannot_convert�getr	Zchildren�prefixrrrr�replacerZNodeZpower)�selfZnodeZresultsrrrrZ
throw_argsr�eZwith_tbr
r
r�	transforms*

zFixThrow.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr!r
r
r
rr
sr
N)�__doc__rrZpgen2rrZ
fixer_utilrrrrr	ZBaseFixr
r
r
r
r�<module>s

PK':�Z"�Gee/__pycache__/fix_basestring.cpython-38.opt-2.pycnu�[���U

e5d@�@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixBasestringTz'basestring'cCstd|jd�S)N�str)�prefix)rr)�selfZnodeZresults�r�4/usr/lib64/python3.8/lib2to3/fixes/fix_basestring.py�	transform
szFixBasestring.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrr	rsrN)�rZ
fixer_utilrZBaseFixrrrrr	�<module>sPK':�Z�O�ww'__pycache__/fix_operator.cpython-38.pycnu�[���U

e5db
�@sNdZddlZddlmZddlmZmZmZm	Z	dd�Z
Gdd�dej�ZdS)	a�Fixer for operator functions.

operator.isCallable(obj)       -> callable(obj)
operator.sequenceIncludes(obj) -> operator.contains(obj)
operator.isSequenceType(obj)   -> isinstance(obj, collections.abc.Sequence)
operator.isMappingType(obj)    -> isinstance(obj, collections.abc.Mapping)
operator.isNumberType(obj)     -> isinstance(obj, numbers.Number)
operator.repeat(obj, n)        -> operator.mul(obj, n)
operator.irepeat(obj, n)       -> operator.imul(obj, n)
�N)�
fixer_base)�Call�Name�String�touch_importcs�fdd�}|S)Ncs
�|_|S�N)�
invocation)�f��s��2/usr/lib64/python3.8/lib2to3/fixes/fix_operator.py�decszinvocation.<locals>.decr)rrrr
r
rsrc@s�eZdZdZdZdZdZdeeed�Zdd�Z	e
d	�d
d��Ze
d�d
d��Ze
d�dd��Z
e
d�dd��Ze
d�dd��Ze
d�dd��Ze
d�dd��Zdd�Zd d!�Zd"d#�Zd$S)%�FixOperatorTZprez�
              method=('isCallable'|'sequenceIncludes'
                     |'isSequenceType'|'isMappingType'|'isNumberType'
                     |'repeat'|'irepeat')
              z'(' obj=any ')'z�
              power< module='operator'
                trailer< '.' %(methods)s > trailer< %(obj)s > >
              |
              power< %(methods)s trailer< %(obj)s > >
              )�methods�objcCs"|�||�}|dk	r|||�SdSr)�
_check_method)�self�node�results�methodrrr
�	transform+szFixOperator.transformzoperator.contains(%s)cCs|�||d�S)N�contains��_handle_rename�rrrrrr
�_sequenceIncludes0szFixOperator._sequenceIncludeszcallable(%s)cCs"|d}ttd�|��g|jd�S)Nr�callable��prefix)rr�cloner)rrrrrrr
�_isCallable4szFixOperator._isCallablezoperator.mul(%s)cCs|�||d�S)N�mulrrrrr
�_repeat9szFixOperator._repeatzoperator.imul(%s)cCs|�||d�S)N�imulrrrrr
�_irepeat=szFixOperator._irepeatz(isinstance(%s, collections.abc.Sequence)cCs|�||dd�S)N�collections.abc�Sequence��_handle_type2abcrrrr
�_isSequenceTypeAszFixOperator._isSequenceTypez'isinstance(%s, collections.abc.Mapping)cCs|�||dd�S)Nr&�Mappingr(rrrr
�_isMappingTypeEszFixOperator._isMappingTypezisinstance(%s, numbers.Number)cCs|�||dd�S)NZnumbers�Numberr(rrrr
�
_isNumberTypeIszFixOperator._isNumberTypecCs|dd}||_|��dS)Nrr)�valueZchanged)rrr�namerrrr
rMszFixOperator._handle_renamecCsFtd||�|d}|��tdd�||g��g}ttd�||jd�S)Nrz, �.�
isinstancer)rr r�joinrrr)rrr�module�abcr�argsrrr
r)RszFixOperator._handle_type2abccCs^t|d|ddj�}t|tjj�rZd|kr2|St|d�f}|j|}|�|d|�dS)N�_rrr4rzYou should use '%s' here.)	�getattrr/r2�collectionsr5�Callable�strrZwarning)rrrr�subZinvocation_strrrr
rXs
zFixOperator._check_methodN)�__name__�
__module__�__qualname__Z
BM_compatible�orderrr�dictZPATTERNrrrr!r#r%r*r,r.rr)rrrrr
rs2
�






r)
�__doc__Zcollections.abcr9Zlib2to3rZlib2to3.fixer_utilrrrrrZBaseFixrrrrr
�<module>s
PK':�ZW���,__pycache__/fix_renames.cpython-38.opt-1.pycnu�[���U

e5d��@sVdZddlmZddlmZmZdddiiZiZdd�Zd	d
�Z	Gdd�dej
�Zd
S)z?Fix incompatible renames

Fixes:
  * sys.maxint -> sys.maxsize
�)�
fixer_base)�Name�
attr_chain�sysZmaxint�maxsizecCsdd�tt|��dS)N�(�|�))�join�map�repr)�members�r�1/usr/lib64/python3.8/lib2to3/fixes/fix_renames.py�
alternatessrccsZtt���D]H\}}t|���D]2\}}|t||f<d|||fVd||fVq qdS)Nz�
                  import_from< 'from' module_name=%r 'import'
                      ( attr_name=%r | import_as_name< attr_name=%r 'as' any >) >
                  z^
                  power< module_name=%r trailer< '.' attr_name=%r > any* >
                  )�list�MAPPING�items�LOOKUP)�module�replaceZold_attr�new_attrrrr�
build_patterns��rcs8eZdZdZd�e��ZdZ�fdd�Zdd�Z	�Z
S)�
FixRenamesTrZprecs@tt|�j��|�}|r<t�fdd�t|d�D��r8dS|SdS)Nc3s|]}�|�VqdS)Nr)�.0�obj��matchrr�	<genexpr>5sz#FixRenames.match.<locals>.<genexpr>�parentF)�superrr�anyr)�self�node�results��	__class__rrr1szFixRenames.matchcCsD|�d�}|�d�}|r@|r@t|j|jf}|�t||jd��dS)NZmodule_name�	attr_name)�prefix)�getr�valuerrr()r"r#r$Zmod_namer'rrrr�	transform>s


zFixRenames.transform)�__name__�
__module__�__qualname__Z
BM_compatibler
rZPATTERN�orderrr+�
__classcell__rrr%rr*s

rN)�__doc__�rZ
fixer_utilrrrrrrZBaseFixrrrrr�<module>s	PK':�Z�YT$$*__pycache__/fix_throw.cpython-38.opt-2.pycnu�[���U

e5d.�@sVddlmZddlmZddlmZddlmZmZmZm	Z	m
Z
Gdd�dej�ZdS)�)�pytree)�token)�
fixer_base)�Name�Call�ArgList�Attr�is_tuplec@seZdZdZdZdd�ZdS)�FixThrowTz�
    power< any trailer< '.' 'throw' >
           trailer< '(' args=arglist< exc=any ',' val=any [',' tb=any] > ')' >
    >
    |
    power< any trailer< '.' 'throw' > trailer< '(' exc=any ')' > >
    cCs�|j}|d��}|jtjkr.|�|d�dS|�d�}|dkrDdS|��}t|�rndd�|jdd�D�}nd|_	|g}|d	}d
|kr�|d
��}d|_	t
||�}	t|	td��t
|g�g}
|�t�|j|
��n|�t
||��dS)N�excz+Python 3 does not support string exceptions�valcSsg|]}|���qS�)�clone)�.0�cr
r
�//usr/lib64/python3.8/lib2to3/fixes/fix_throw.py�
<listcomp>)sz&FixThrow.transform.<locals>.<listcomp>������args�tb�with_traceback)�symsr�typer�STRINGZcannot_convert�getr	Zchildren�prefixrrrr�replacerZNodeZpower)�selfZnodeZresultsrrrrZ
throw_argsr�eZwith_tbr
r
r�	transforms*

zFixThrow.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr!r
r
r
rr
sr
N)
rrZpgen2rrZ
fixer_utilrrrrr	ZBaseFixr
r
r
r
r�<module>sPK':�Z���
�
+__pycache__/fix_except.cpython-38.opt-1.pycnu�[���U

e5d
�@sfdZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZmZdd�Z
Gdd	�d	ej�Zd
S)a�Fixer for except statements with named exceptions.

The following cases will be converted:

- "except E, T:" where T is a name:

    except E as T:

- "except E, T:" where T is not a name, tuple or list:

        except E as t:
            T = t

    This is done because the target of an "except" clause must be a
    name.

- "except E, T:" where T is a tuple or list literal:

        except E as t:
            T = t.args
�)�pytree)�token)�
fixer_base)�Assign�Attr�Name�is_tuple�is_list�symsccsDt|�D]6\}}|jtjkr|jdjdkr|||dfVqdS)N��exceptr)�	enumerate�typer
�
except_clause�children�value)Znodes�i�n�r�0/usr/lib64/python3.8/lib2to3/fixes/fix_except.py�find_exceptssrc@seZdZdZdZdd�ZdS)�	FixExceptTa1
    try_stmt< 'try' ':' (simple_stmt | suite)
                  cleanup=(except_clause ':' (simple_stmt | suite))+
                  tail=(['except' ':' (simple_stmt | suite)]
                        ['else' ':' (simple_stmt | suite)]
                        ['finally' ':' (simple_stmt | suite)]) >
    cCsx|j}dd�|dD�}dd�|dD�}t|�D�]\}}t|j�dkr2|jdd�\}}	}
|	�tdd	d
��|
jtjk�r8t|�	�d	d
�}|
�
�}d|_|
�|�|�
�}|j}
t|
�D]\}}t
|tj�r�q�q�t|
�s�t|
�r�t|t|td���}n
t||�}t|
d|��D]}|�d
|��q|�||�q2|
jdkr2d	|
_q2dd�|jdd�D�||}t�|j|�S)NcSsg|]}|���qSr��clone)�.0rrrr�
<listcomp>2sz'FixExcept.transform.<locals>.<listcomp>�tailcSsg|]}|���qSrr)rZchrrrr4sZcleanup���as� )�prefix��argsrcSsg|]}|���qSrr)r�crrrr\s�)r
r�lenr�replacerrr�NAME�new_namerr!r
�
isinstancerZNoderr	rr�reversedZinsert_child)�selfZnodeZresultsr
rZtry_cleanuprZe_suite�EZcomma�NZnew_N�targetZsuite_stmtsrZstmtZassignZchildrrrr�	transform/s6


 zFixExcept.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr0rrrrr$srN)�__doc__r"rZpgen2rrZ
fixer_utilrrrrr	r
rZBaseFixrrrrr�<module>s PK':�Z^�z5UU,__pycache__/fix_unicode.cpython-38.opt-2.pycnu�[���U

e5d��@s8ddlmZddlmZddd�ZGdd�dej�ZdS)	�)�token)�
fixer_base�chr�str)ZunichrZunicodecs,eZdZdZdZ�fdd�Zdd�Z�ZS)�
FixUnicodeTzSTRING | 'unicode' | 'unichr'cs"tt|��||�d|jk|_dS)N�unicode_literals)�superr�
start_treeZfuture_featuresr)�selfZtree�filename��	__class__��1/usr/lib64/python3.8/lib2to3/fixes/fix_unicode.pyr	szFixUnicode.start_treecCs�|jtjkr$|��}t|j|_|S|jtjkr�|j}|jsj|ddkrjd|krjd�dd�|�	d�D��}|ddkr�|dd�}||jkr�|S|��}||_|SdS)	N�z'"�\z\\cSs g|]}|�dd��dd��qS)z\uz\\uz\Uz\\U)�replace)�.0�vrrr�
<listcomp> s�z(FixUnicode.transform.<locals>.<listcomp>ZuU�)
�typer�NAMEZclone�_mapping�value�STRINGr�join�split)r
ZnodeZresults�new�valrrr�	transforms"
�
zFixUnicode.transform)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr	r �
__classcell__rrrrrsrN)Zpgen2r�rrZBaseFixrrrrr�<module>s
PK':�ZV�����+__pycache__/fix_buffer.cpython-38.opt-2.pycnu�[���U

e5dN�@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Namec@s eZdZdZdZdZdd�ZdS)�	FixBufferTzR
              power< name='buffer' trailer< '(' [any] ')' > any* >
              cCs |d}|�td|jd��dS)N�name�
memoryview)�prefix)�replacerr)�selfZnodeZresultsr�r
�0/usr/lib64/python3.8/lib2to3/fixes/fix_buffer.py�	transformszFixBuffer.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZexplicitZPATTERNrr
r
r
rrsrN)�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK':�Z���,__pycache__/fix_nonzero.cpython-38.opt-1.pycnu�[���U

e5dO�@s2dZddlmZddlmZGdd�dej�ZdS)z*Fixer for __nonzero__ -> __bool__ methods.�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixNonzeroTz�
    classdef< 'class' any+ ':'
              suite< any*
                     funcdef< 'def' name='__nonzero__'
                              parameters< '(' NAME ')' > any+ >
                     any* > >
    cCs$|d}td|jd�}|�|�dS)N�name�__bool__)�prefix)rr�replace)�selfZnodeZresultsr�new�r�1/usr/lib64/python3.8/lib2to3/fixes/fix_nonzero.py�	transformszFixNonzero.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrrrsrN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK':�Z�O�'

/__pycache__/fix_isinstance.cpython-38.opt-1.pycnu�[���U

e5dH�@s2dZddlmZddlmZGdd�dej�ZdS)a,Fixer that cleans up a tuple argument to isinstance after the tokens
in it were fixed.  This is mainly used to remove double occurrences of
tokens as a leftover of the long -> int / unicode -> str conversion.

eg.  isinstance(x, (int, long)) -> isinstance(x, (int, int))
       -> isinstance(x, int)
�)�
fixer_base)�tokenc@s eZdZdZdZdZdd�ZdS)�
FixIsinstanceTz�
    power<
        'isinstance'
        trailer< '(' arglist< any ',' atom< '('
            args=testlist_gexp< any+ >
        ')' > > ')' >
    >
    �cCs�t�}|d}|j}g}t|�}|D]p\}}	|	jtjkrr|	j|krr|t|�dkr�||djtjkr�t	|�q$q$|�
|	�|	jtjkr$|�|	j�q$|r�|djtjkr�|d=t|�dkr�|j}
|
j
|d_
|
�|d�n||dd�<|��dS)N�args�����)�setZchildren�	enumerate�typer�NAME�value�len�COMMA�next�append�add�parent�prefix�replaceZchanged)�selfZnodeZresultsZnames_insertedZtestlistrZnew_args�iterator�idx�argZatom�r�4/usr/lib64/python3.8/lib2to3/fixes/fix_isinstance.py�	transforms*$
zFixIsinstance.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZ	run_orderrrrrrrs	rN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK':�Z�Zm�+__pycache__/fix_future.cpython-38.opt-1.pycnu�[���U

e5d#�@s2dZddlmZddlmZGdd�dej�ZdS)zVRemove __future__ imports

from __future__ import foo is replaced with an empty line.
�)�
fixer_base)�	BlankLinec@s eZdZdZdZdZdd�ZdS)�	FixFutureTz;import_from< 'from' module_name="__future__" 'import' any >�
cCst�}|j|_|S)N)r�prefix)�selfZnodeZresults�new�r	�0/usr/lib64/python3.8/lib2to3/fixes/fix_future.py�	transformszFixFuture.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZ	run_orderrr	r	r	r
rsrN)�__doc__�rZ
fixer_utilrZBaseFixrr	r	r	r
�<module>sPK':�Z�_�1QQ.__pycache__/fix_metaclass.cpython-38.opt-2.pycnu�[���U

e5d �@srddlmZddlmZddlmZmZmZdd�Zdd�Z	dd	�Z
d
d�Zdd
�Zdd�Z
Gdd�dej�ZdS)�)�
fixer_base)�token)�syms�Node�LeafcCsz|jD]n}|jtjkr"t|�S|jtjkr|jr|jd}|jtjkr|jr|jd}t|t�r|j	dkrdSqdS)N��
__metaclass__TF)
�children�typer�suite�
has_metaclass�simple_stmt�	expr_stmt�
isinstancer�value)�parent�node�	expr_nodeZ	left_side�r�3/usr/lib64/python3.8/lib2to3/fixes/fix_metaclass.pyrs



�rcCs�|jD]}|jtjkrdSqt|j�D]\}}|jtjkr(qJq(td��ttjg�}|j|dd�r�|j|d}|�	|�
��|��qV|�	|�|}dS)NzNo class suite and no ':'!�)r	r
rr�	enumerater�COLON�
ValueErrorr�append_child�clone�remove)�cls_noder�ir�	move_noderrr�fixup_parse_tree-s


r c
Cs�t|j�D]\}}|jtjkr
q(q
dS|��ttjg�}ttj	|g�}|j|d�rz|j|}|�
|���|��qJ|�||�|jdjd}|jdjd}	|	j
|_
dS)Nr)rr	r
r�SEMIrrrrr
rr�insert_child�prefix)
rrZ	stmt_nodeZsemi_indrZnew_exprZnew_stmtrZ	new_leaf1Z	old_leaf1rrr�fixup_simple_stmtGs

r$cCs*|jr&|jdjtjkr&|jd��dS)N���)r	r
r�NEWLINEr)rrrr�remove_trailing_newline_sr'ccs�|jD]}|jtjkrq$qtd��tt|j��D]t\}}|jtjkr2|jr2|jd}|jtjkr2|jr2|jd}t	|t
�r2|jdkr2t|||�t
|�|||fVq2dS)NzNo class suite!rr)r	r
rrr�listrr
rrrrr$r')rrrZsimple_noderZ	left_noderrr�
find_metasds



�r)cCsz|jddd�}|r,|��}|jtjkrq,q|rv|��}t|t�r^|jtjkr^|jrZd|_dS|�	|jddd��q,dS)Nr%�)
r	�popr
r�INDENTrr�DEDENTr#�extend)rZkidsrrrr�fixup_indent{sr/c@seZdZdZdZdd�ZdS)�FixMetaclassTz
    classdef<any*>
    cCs8t|�sdSt|�d}t|�D]\}}}|}|��q |jdj}t|j�dkr�|jdjtjkrp|jd}n(|jd�	�}	t
tj|	g�}|�d|�n�t|j�dkr�t
tjg�}|�d|�nZt|j�dk�rt
tjg�}|�dt
tjd��|�d|�|�dt
tjd��ntd	��|jdjd}
d
|
_|
j}|j�rZ|�t
tjd��d|
_nd
|
_|jd}d
|jd_d
|jd_|�|�t|�|j�s�|��t
|d�}
||
_|�|
�|�t
tjd��nbt|j�dk�r4|jdjtjk�r4|jdjtjk�r4t
|d�}
|�d|
�|�dt
tjd��dS)Nr����r�)�(zUnexpected class definition�	metaclass�,� r*r�pass�
���r%)rr r)rr	r
�lenr�arglistrrZ	set_childr"rr�RPAR�LPARrrr#r�COMMAr/r&r,r-)�selfrZresultsZlast_metaclassrrZstmtZ	text_typer>rZmeta_txtZorig_meta_prefixrZ	pass_leafrrr�	transform�sb




��
zFixMetaclass.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrCrrrrr0�sr0N)r*rZpygramrZ
fixer_utilrrrrr r$r'r)r/ZBaseFixr0rrrr�<module>sPK':�Z&eV�((*__pycache__/fix_types.cpython-38.opt-1.pycnu�[���U

e5d��@spdZddlmZddlmZddddddd	d
dddd
dddddddddd�Zdd�eD�ZGdd�dej�ZdS)a�Fixer for removing uses of the types module.

These work for only the known names in the types module.  The forms above
can include types. or not.  ie, It is assumed the module is imported either as:

    import types
    from types import ... # either * or specific types

The import statements are not modified.

There should be another fixer that handles at least the following constants:

   type([]) -> list
   type(()) -> tuple
   type('') -> str

�)�
fixer_base)�Name�bool�
memoryview�type�complex�dictztype(Ellipsis)�float�int�list�objectz
type(None)ztype(NotImplemented)�slice�bytesz(str,)�tuple�str�range)ZBooleanTypeZ
BufferTypeZ	ClassTypeZComplexTypeZDictTypeZDictionaryTypeZEllipsisTypeZ	FloatTypeZIntTypeZListTypeZLongTypeZ
ObjectTypeZNoneTypeZNotImplementedTypeZ	SliceTypeZ
StringTypeZStringTypesZ	TupleTypeZTypeTypeZUnicodeTypeZ
XRangeTypecCsg|]}d|�qS)z)power< 'types' trailer< '.' name='%s' > >�)�.0�trr�//usr/lib64/python3.8/lib2to3/fixes/fix_types.py�
<listcomp>3src@s"eZdZdZd�e�Zdd�ZdS)�FixTypesT�|cCs&t�|dj�}|r"t||jd�SdS)N�name)�prefix)�
_TYPE_MAPPING�get�valuerr)�selfZnodeZresultsZ	new_valuerrr�	transform9szFixTypes.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�join�_patsZPATTERNrrrrrr5s
rN)	�__doc__�rZ
fixer_utilrrr$ZBaseFixrrrrr�<module>s4�PK':�Zx�*���0__pycache__/fix_numliterals.cpython-38.opt-1.pycnu�[���U

e5d�@s>dZddlmZddlmZddlmZGdd�dej�ZdS)z-Fixer that turns 1L into 1, 0755 into 0o755.
�)�token)�
fixer_base)�Numberc@s"eZdZejZdd�Zdd�ZdS)�FixNumliteralscCs|j�d�p|jddkS)N�0����Ll)�value�
startswith)�self�node�r
�5/usr/lib64/python3.8/lib2to3/fixes/fix_numliterals.py�matchszFixNumliterals.matchcCs`|j}|ddkr |dd�}n2|�d�rR|��rRtt|��dkrRd|dd�}t||jd�S)Nrrr�Z0o)�prefix)r	r
�isdigit�len�setrr)rrZresults�valr
r
r�	transforms"zFixNumliterals.transformN)�__name__�
__module__�__qualname__r�NUMBERZ_accept_typerrr
r
r
rrsrN)	�__doc__Zpgen2r�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK(:�ZV�ii+__pycache__/fix_intern.cpython-38.opt-1.pycnu�[���U

e5dx�@s6dZddlmZddlmZmZGdd�dej�ZdS)z/Fixer for intern().

intern(s) -> sys.intern(s)�)�
fixer_base)�
ImportAndCall�touch_importc@s eZdZdZdZdZdd�ZdS)�	FixInternTZprez�
    power< 'intern'
           trailer< lpar='('
                    ( not(arglist | argument<any '=' any>) obj=any
                      | obj=arglist<(not argument<any '=' any>) any ','> )
                    rpar=')' >
           after=any*
    >
    cCsR|r2|d}|r2|j|jjkr2|jdjdkr2dSd}t|||�}tdd|�|S)N�obj�>�**�*)�sys�internr
)�typeZsymsZargumentZchildren�valuerr)�selfZnodeZresultsr�names�new�r�0/usr/lib64/python3.8/lib2to3/fixes/fix_intern.py�	transforms�zFixIntern.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�orderZPATTERNrrrrrr
s
rN)�__doc__�rZ
fixer_utilrrZBaseFixrrrrr�<module>sPK(:�Z�6���)__pycache__/__init__.cpython-38.opt-1.pycnu�[���U

e5d/�@sdS)N�rrr�./usr/lib64/python3.8/lib2to3/fixes/__init__.py�<module>�PK(:�Z�X;�

+__pycache__/fix_idioms.cpython-38.opt-2.pycnu�[���U

e5d�@sJddlmZddlmZmZmZmZmZmZdZ	dZ
Gdd�dej�ZdS)�)�
fixer_base)�Call�Comma�Name�Node�	BlankLine�symsz0(n='!=' | '==' | 'is' | n=comp_op< 'is' 'not' >)z(power< 'type' trailer< '(' x=any ')' > >csPeZdZdZdeeeefZ�fdd�Zdd�Zdd�Z	d	d
�Z
dd�Z�ZS)
�	FixIdiomsTa�
        isinstance=comparison< %s %s T=any >
        |
        isinstance=comparison< T=any %s %s >
        |
        while_stmt< 'while' while='1' ':' any+ >
        |
        sorted=any<
            any*
            simple_stmt<
              expr_stmt< id1=any '='
                         power< list='list' trailer< '(' (not arglist<any+>) any ')' > >
              >
              '\n'
            >
            sort=
            simple_stmt<
              power< id2=any
                     trailer< '.' 'sort' > trailer< '(' ')' >
              >
              '\n'
            >
            next=any*
        >
        |
        sorted=any<
            any*
            simple_stmt< expr_stmt< id1=any '=' expr=any > '\n' >
            sort=
            simple_stmt<
              power< id2=any
                     trailer< '.' 'sort' > trailer< '(' ')' >
              >
              '\n'
            >
            next=any*
        >
    cs8tt|��|�}|r4d|kr4|d|dkr0|SdS|S)N�sortedZid1Zid2)�superr	�match)�self�node�r��	__class__��0/usr/lib64/python3.8/lib2to3/fixes/fix_idioms.pyrOszFixIdioms.matchcCsHd|kr|�||�Sd|kr(|�||�Sd|kr<|�||�Std��dS)N�
isinstance�whiler
z
Invalid match)�transform_isinstance�transform_while�transform_sort�RuntimeError)r
r�resultsrrr�	transformZszFixIdioms.transformcCsh|d��}|d��}d|_d|_ttd�|t�|g�}d|kr\d|_ttjtd�|g�}|j|_|S)N�x�T�� r�n�not)�clone�prefixrrrrrZnot_test)r
rrrrZtestrrrrdszFixIdioms.transform_isinstancecCs |d}|�td|jd��dS)Nr�True�r#)�replacerr#)r
rrZonerrrrpszFixIdioms.transform_whilecCs�|d}|d}|�d�}|�d�}|r>|�td|jd��n8|rn|��}d|_|�ttd�|g|jd��ntd��|��|j}d	|kr�|r�|�d	�d
|d
jf}	d	�	|	�|d
_n"t
�}
|j�|
�|�d	�d
|
_dS)N�sort�next�list�exprr
r%rzshould not have reached here�
�)
�getr&rr#r"rr�remove�
rpartition�joinr�parentZappend_child)r
rrZ	sort_stmtZ	next_stmtZ	list_callZsimple_expr�newZbtwnZprefix_linesZend_linerrrrts,

�
zFixIdioms.transform_sort)
�__name__�
__module__�__qualname__Zexplicit�TYPE�CMPZPATTERNrrrrr�
__classcell__rrrrr	%s%
�'
r	N)
rrZ
fixer_utilrrrrrrr7r6ZBaseFixr	rrrr�<module>s PK(:�Z�ё��.__pycache__/fix_funcattrs.cpython-38.opt-1.pycnu�[���U

e5d��@s2dZddlmZddlmZGdd�dej�ZdS)z3Fix function attribute names (f.func_x -> f.__x__).�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�FixFuncattrsTz�
    power< any+ trailer< '.' attr=('func_closure' | 'func_doc' | 'func_globals'
                                  | 'func_name' | 'func_defaults' | 'func_code'
                                  | 'func_dict') > any* >
    cCs2|dd}|�td|jdd�|jd��dS)N�attr�z__%s__�)�prefix)�replacer�valuer)�selfZnodeZresultsr�r�3/usr/lib64/python3.8/lib2to3/fixes/fix_funcattrs.py�	transforms�zFixFuncattrs.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrr
r	srN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr
�<module>sPK(:�Z���jj%__pycache__/fix_urllib.cpython-38.pycnu�[���U

e5d� �@s�dZddlmZmZddlmZmZmZmZm	Z	m
Z
mZdddddd	d
ddgfd
dddddddddddddddgfddgfgdd	dd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5gfdd6d7gfgd8�Zed9�
ed:d;�d<d=�ZGd>d?�d?e�Zd@S)Az�Fix changes imports of urllib which are now incompatible.
   This is rather similar to fix_imports, but because of the more
   complex nature of the fixing for urllib, it has its own fixer.
�)�
alternates�
FixImports)�Name�Comma�
FromImport�Newline�find_indentation�Node�symszurllib.requestZ	URLopenerZFancyURLopenerZurlretrieveZ
_urlopenerZurlopenZ
urlcleanupZpathname2urlZurl2pathnamezurllib.parseZquoteZ
quote_plusZunquoteZunquote_plusZ	urlencodeZ	splitattrZ	splithostZ
splitnportZsplitpasswdZ	splitportZ
splitqueryZsplittagZ	splittypeZ	splituserZ
splitvaluezurllib.errorZContentTooShortErrorZinstall_openerZbuild_openerZRequestZOpenerDirectorZBaseHandlerZHTTPDefaultErrorHandlerZHTTPRedirectHandlerZHTTPCookieProcessorZProxyHandlerZHTTPPasswordMgrZHTTPPasswordMgrWithDefaultRealmZAbstractBasicAuthHandlerZHTTPBasicAuthHandlerZProxyBasicAuthHandlerZAbstractDigestAuthHandlerZHTTPDigestAuthHandlerZProxyDigestAuthHandlerZHTTPHandlerZHTTPSHandlerZFileHandlerZ
FTPHandlerZCacheFTPHandlerZUnknownHandlerZURLErrorZ	HTTPError)�urllib�urllib2rr�ccsvt�}t��D]b\}}|D]T}|\}}t|�}d||fVd|||fVd|Vd|Vd||fVqqdS)Nz�import_name< 'import' (module=%r
                                  | dotted_as_names< any* module=%r any* >) >
                  z�import_from< 'from' mod_member=%r 'import'
                       ( member=%s | import_as_name< member=%s 'as' any > |
                         import_as_names< members=any*  >) >
                  zIimport_from< 'from' module_star=%r 'import' star='*' >
                  ztimport_name< 'import'
                                  dotted_as_name< module_as=%r 'as' any > >
                  zKpower< bare_with_attr=%r trailer< '.' member=%s > any* >
                  )�set�MAPPING�itemsr)ZbareZ
old_moduleZchanges�changeZ
new_module�members�r�0/usr/lib64/python3.8/lib2to3/fixes/fix_urllib.py�
build_pattern0s(�����rc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�	FixUrllibcCsd�t��S)N�|)�joinr)�selfrrrrIszFixUrllib.build_patterncCsv|�d�}|j}g}t|jdd�D] }|�t|d|d�t�g�q&|�tt|jdd|d��|�|�dS)z�Transform for the basic import case. Replaces the old
           import name with a comma separated list of its
           replacements.
        �moduleN���r��prefix)	�getrr�value�extendrr�append�replace)r�node�resultsZ
import_mod�pref�names�namerrr�transform_importLs
 zFixUrllib.transform_importcCs&|�d�}|j}|�d�}|r�t|t�r0|d}d}t|jD]}|j|dkr>|d}q^q>|rv|�t||d��n|�|d��n�g}i}	|d}
|
D]�}|j	t
jkr�|jd	j}|jdj}n
|j}d}|d
kr�t|jD]B}||dkr�|d|	k�r|�
|d�|	�|dg��
|�q�q�g}
t|�}d}dd
�}|D]�}|	|}g}|dd�D]"}|�|||��|�
t���q^|�||d|��t||�}|�r�|jj�|��r�||_|
�
|�d}�qB|
�rg}|
dd�D]}|�|t�g��q�|�
|
d�|�|�n|�|d�dS)z�Transform for imports of specific module elements. Replaces
           the module to be imported from with the appropriate new
           module.
        �
mod_member�memberrNr
r�!This is an invalid module elementr��,TcSsX|jtjkrHt|jdj|d�|jd��|jd��g}ttj|�gSt|j|d�gS)Nrrr
r,)�typer
�import_as_namer�childrenrZcloner	)r'rZkidsrrr�handle_name�s�z/FixUrllib.transform_member.<locals>.handle_namerFzAll module elements are invalid)rr�
isinstance�listrrr"r�cannot_convertr.r
r/r0r!�
setdefaultrr rr�parent�endswithr)rr#r$r)r%r*�new_namer�modulesZmod_dictrZas_name�member_nameZ	new_nodesZindentation�firstr1rZeltsr&Zelt�newZnodesZnew_noderrr�transform_member\sh




zFixUrllib.transform_membercCs~|�d�}|�d�}d}t|t�r*|d}t|jD]}|j|dkr4|d}qTq4|rn|�t||jd��n|�|d�dS)z.Transform for calls to module members in code.�bare_with_attrr*Nrr
rr+)	rr2r3rrr"rrr4)rr#r$Z
module_dotr*r8rrrr�
transform_dot�s


�
zFixUrllib.transform_dotcCsz|�d�r|�||�n^|�d�r0|�||�nF|�d�rH|�||�n.|�d�r`|�|d�n|�d�rv|�|d�dS)Nrr)r>Zmodule_starzCannot handle star imports.Z	module_asz#This module is now multiple modules)rr(r=r?r4)rr#r$rrr�	transform�s




zFixUrllib.transformN)�__name__�
__module__�__qualname__rr(r=r?r@rrrrrGs
LrN)�__doc__Zlib2to3.fixes.fix_importsrrZlib2to3.fixer_utilrrrrrr	r
rr!rrrrrr�<module>s~$������
�����!PK(:�Zoz�&&,__pycache__/fix_imports.cpython-38.opt-1.pycnu�[���U

e5d4�1@s�dZddlmZddlmZmZddddddd	d
dddd
d
ddddddddddddddddddd d!d"d"d#d$d%d&d'd(d(d(d)d*d*d+d,d-�0Zd.d/�Zefd0d1�ZGd2d3�d3ej	�Z
d4S)5z/Fix incompatible imports and module references.�)�
fixer_base)�Name�
attr_chain�io�pickle�builtins�copyregZqueueZsocketserverZconfigparser�reprlibztkinter.filedialogztkinter.simpledialogztkinter.colorchooserztkinter.commondialogztkinter.dialogztkinter.dndztkinter.fontztkinter.messageboxztkinter.scrolledtextztkinter.constantsztkinter.tixztkinter.ttkZtkinterZ_markupbase�winreg�_threadZ
_dummy_threadzdbm.bsdzdbm.dumbzdbm.ndbmzdbm.gnuz
xmlrpc.clientz
xmlrpc.serverzhttp.clientz
html.entitieszhtml.parserzhttp.cookieszhttp.cookiejarzhttp.server�
subprocess�collectionszurllib.parsezurllib.robotparser)0�StringIOZ	cStringIOZcPickleZ__builtin__Zcopy_regZQueueZSocketServerZConfigParser�reprZ
FileDialogZtkFileDialogZSimpleDialogZtkSimpleDialogZtkColorChooserZtkCommonDialogZDialogZTkdndZtkFontZtkMessageBoxZScrolledTextZTkconstantsZTixZttkZTkinterZ
markupbase�_winreg�threadZdummy_threadZdbhashZdumbdbmZdbmZgdbmZ	xmlrpclibZDocXMLRPCServerZSimpleXMLRPCServerZhttplibZhtmlentitydefsZ
HTMLParserZCookieZ	cookielibZBaseHTTPServerZSimpleHTTPServerZ
CGIHTTPServerZcommands�
UserString�UserListZurlparseZrobotparsercCsdd�tt|��dS)N�(�|�))�join�mapr)�members�r�1/usr/lib64/python3.8/lib2to3/fixes/fix_imports.py�
alternates=srccsTd�dd�|D��}t|���}d||fVd|Vd||fVd|VdS)Nz | cSsg|]}d|�qS)zmodule_name='%s'r)�.0�keyrrr�
<listcomp>Bsz!build_pattern.<locals>.<listcomp>zyname_import=import_name< 'import' ((%s) |
               multiple_imports=dotted_as_names< any* (%s) any* >) >
          z�import_from< 'from' (%s) 'import' ['(']
              ( any | import_as_name< any 'as' any > |
                import_as_names< any* >)  [')'] >
          z�import_name< 'import' (dotted_as_name< (%s) 'as' any > |
               multiple_imports=dotted_as_names<
                 any* dotted_as_name< (%s) 'as' any > any* >) >
          z3power< bare_with_attr=(%s) trailer<'.' any > any* >)rr�keys)�mappingZmod_listZ
bare_namesrrr�
build_patternAs���r"csTeZdZdZdZeZdZdd�Z�fdd�Z	�fdd�Z
�fd	d
�Zdd�Z�Z
S)
�
FixImportsT�cCsd�t|j��S)Nr)rr"r!��selfrrrr"`szFixImports.build_patterncs|��|_tt|���dS�N)r"ZPATTERN�superr#�compile_patternr%��	__class__rrr)cs
zFixImports.compile_patterncsHtt|�j��|�}|rDd|kr@t�fdd�t|d�D��r@dS|SdS)N�bare_with_attrc3s|]}�|�VqdSr'r)r�obj��matchrr�	<genexpr>qsz#FixImports.match.<locals>.<genexpr>�parentF)r(r#r/�anyr)r&�node�resultsr*r.rr/js�zFixImports.matchcstt|��||�i|_dSr')r(r#�
start_tree�replace)r&Ztree�filenamer*rrr5vszFixImports.start_treecCs�|�d�}|rh|j}|j|}|�t||jd��d|krD||j|<d|kr�|�|�}|r�|�||�n2|dd}|j�|j�}|r�|�t||jd��dS)NZmodule_name)�prefixZname_importZmultiple_importsr,�)�get�valuer!r6rr8r/�	transform)r&r3r4Z
import_modZmod_name�new_nameZ	bare_namerrrr<zs



zFixImports.transform)�__name__�
__module__�__qualname__Z
BM_compatibleZkeep_line_order�MAPPINGr!Z	run_orderr"r)r/r5r<�
__classcell__rrr*rr#Usr#N)�__doc__�rZ
fixer_utilrrrArr"ZBaseFixr#rrrr�<module>sl�5PK(:�Z�ё��(__pycache__/fix_funcattrs.cpython-38.pycnu�[���U

e5d��@s2dZddlmZddlmZGdd�dej�ZdS)z3Fix function attribute names (f.func_x -> f.__x__).�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�FixFuncattrsTz�
    power< any+ trailer< '.' attr=('func_closure' | 'func_doc' | 'func_globals'
                                  | 'func_name' | 'func_defaults' | 'func_code'
                                  | 'func_dict') > any* >
    cCs2|dd}|�td|jdd�|jd��dS)N�attr�z__%s__�)�prefix)�replacer�valuer)�selfZnodeZresultsr�r�3/usr/lib64/python3.8/lib2to3/fixes/fix_funcattrs.py�	transforms�zFixFuncattrs.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrr
r	srN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr
�<module>sPK(:�Z?u9sHH#__pycache__/fix_repr.cpython-38.pycnu�[���U

e5de�@s:dZddlmZddlmZmZmZGdd�dej�ZdS)z/Fixer that transforms `xyzzy` into repr(xyzzy).�)�
fixer_base)�Call�Name�parenthesizec@seZdZdZdZdd�ZdS)�FixReprTz7
              atom < '`' expr=any '`' >
              cCs8|d��}|j|jjkr"t|�}ttd�|g|jd�S)N�expr�repr)�prefix)Zclone�typeZsymsZ	testlist1rrrr	)�selfZnodeZresultsr�r�./usr/lib64/python3.8/lib2to3/fixes/fix_repr.py�	transformszFixRepr.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrr
rsrN)	�__doc__�rZ
fixer_utilrrrZBaseFixrrrrr
�<module>sPK(:�Z(�q&&!__pycache__/fix_ne.cpython-38.pycnu�[���U

e5d;�@s>dZddlmZddlmZddlmZGdd�dej�ZdS)zFixer that turns <> into !=.�)�pytree)�token)�
fixer_basec@s"eZdZejZdd�Zdd�ZdS)�FixNecCs
|jdkS)Nz<>)�value)�self�node�r	�,/usr/lib64/python3.8/lib2to3/fixes/fix_ne.py�matchszFixNe.matchcCstjtjd|jd�}|S)Nz!=)�prefix)rZLeafr�NOTEQUALr)rrZresults�newr	r	r
�	transformszFixNe.transformN)�__name__�
__module__�__qualname__rr
Z_accept_typerrr	r	r	r
rsrN)�__doc__�rZpgen2rrZBaseFixrr	r	r	r
�<module>sPK(:�Z����NN*__pycache__/fix_types.cpython-38.opt-2.pycnu�[���U

e5d��@slddlmZddlmZdddddddd	d
dd
dd
ddddddddd�Zdd�eD�ZGdd�dej�ZdS)�)�
fixer_base)�Name�bool�
memoryview�type�complex�dictztype(Ellipsis)�float�int�list�objectz
type(None)ztype(NotImplemented)�slice�bytesz(str,)�tuple�str�range)ZBooleanTypeZ
BufferTypeZ	ClassTypeZComplexTypeZDictTypeZDictionaryTypeZEllipsisTypeZ	FloatTypeZIntTypeZListTypeZLongTypeZ
ObjectTypeZNoneTypeZNotImplementedTypeZ	SliceTypeZ
StringTypeZStringTypesZ	TupleTypeZTypeTypeZUnicodeTypeZ
XRangeTypecCsg|]}d|�qS)z)power< 'types' trailer< '.' name='%s' > >�)�.0�trr�//usr/lib64/python3.8/lib2to3/fixes/fix_types.py�
<listcomp>3src@s"eZdZdZd�e�Zdd�ZdS)�FixTypesT�|cCs&t�|dj�}|r"t||jd�SdS)N�name)�prefix)�
_TYPE_MAPPING�get�valuerr)�selfZnodeZresultsZ	new_valuerrr�	transform9szFixTypes.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�join�_patsZPATTERNrrrrrr5s
rN)�rZ
fixer_utilrrr$ZBaseFixrrrrr�<module>s2�PK(:�Zb����,__pycache__/fix_asserts.cpython-38.opt-1.pycnu�[���U

e5d��@sTdZddlmZddlmZedddddd	d
dddddddd
�ZGdd�de�ZdS)z5Fixer that replaces deprecated unittest method names.�)�BaseFix)�NameZ
assertTrueZassertEqualZassertNotEqualZassertAlmostEqualZassertNotAlmostEqualZassertRegexZassertRaisesRegexZassertRaisesZassertFalse)Zassert_ZassertEqualsZassertNotEqualsZassertAlmostEqualsZassertNotAlmostEqualsZassertRegexpMatchesZassertRaisesRegexpZfailUnlessEqualZfailIfEqualZfailUnlessAlmostEqualZfailIfAlmostEqualZ
failUnlessZfailUnlessRaisesZfailIfc@s(eZdZdd�eee��Zdd�ZdS)�
FixAssertszH
              power< any+ trailer< '.' meth=(%s)> any* >
              �|cCs,|dd}|�ttt|�|jd��dS)NZmeth�)�prefix)�replacer�NAMES�strr)�selfZnodeZresults�name�r
�1/usr/lib64/python3.8/lib2to3/fixes/fix_asserts.py�	transform szFixAsserts.transformN)	�__name__�
__module__�__qualname__�join�map�reprr	ZPATTERNrr
r
r
rrs�rN)�__doc__Z
fixer_baserZ
fixer_utilr�dictr	rr
r
r
r�<module>s&�PK(:�Znb�^^)__pycache__/fix_exec.cpython-38.opt-1.pycnu�[���U

e5d��@s:dZddlmZddlmZmZmZGdd�dej�ZdS)z�Fixer for exec.

This converts usages of the exec statement into calls to a built-in
exec() function.

exec code in ns1, ns2 -> exec(code, ns1, ns2)
�)�
fixer_base)�Comma�Name�Callc@seZdZdZdZdd�ZdS)�FixExecTzx
    exec_stmt< 'exec' a=any 'in' b=any [',' c=any] >
    |
    exec_stmt< 'exec' (not atom<'(' [any] ')'>) a=any >
    cCs�|j}|d}|�d�}|�d�}|��g}d|d_|dk	rR|�t�|��g�|dk	rn|�t�|��g�ttd�||jd�S)N�a�b�c���exec)�prefix)�syms�getZcloner
�extendrrr)�selfZnodeZresultsrrrr	�args�r�./usr/lib64/python3.8/lib2to3/fixes/fix_exec.py�	transforms



zFixExec.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)	�__doc__r
rZ
fixer_utilrrrZBaseFixrrrrr�<module>s	PK(:�Z�6���)__pycache__/__init__.cpython-38.opt-2.pycnu�[���U

e5d/�@sdS)N�rrr�./usr/lib64/python3.8/lib2to3/fixes/__init__.py�<module>�PK(:�Zo=��#__pycache__/fix_next.cpython-38.pycnu�[���U

e5df�@sndZddlmZddlmZddlmZddlm	Z	m
Z
mZdZGdd�dej
�Zd	d
�Zdd�Zd
d�ZdS)z.Fixer for it.next() -> next(it), per PEP 3114.�)�token)�python_symbols)�
fixer_base)�Name�Call�find_bindingz;Calls to builtin next() possibly shadowed by global bindingcs0eZdZdZdZdZ�fdd�Zdd�Z�ZS)�FixNextTa�
    power< base=any+ trailer< '.' attr='next' > trailer< '(' ')' > >
    |
    power< head=any+ trailer< '.' attr='next' > not trailer< '(' ')' > >
    |
    classdef< 'class' any+ ':'
              suite< any*
                     funcdef< 'def'
                              name='next'
                              parameters< '(' NAME ')' > any+ >
                     any* > >
    |
    global=global_stmt< 'global' any* 'next' any* >
    Zprecs>tt|��||�td|�}|r4|�|t�d|_nd|_dS)N�nextTF)�superr�
start_treer�warning�bind_warning�
shadowed_next)�selfZtree�filename�n��	__class__��./usr/lib64/python3.8/lib2to3/fixes/fix_next.pyr$s
zFixNext.start_treecCs|st�|�d�}|�d�}|�d�}|rz|jrF|�td|jd��n2dd�|D�}d|d	_|�ttd
|jd�|��n�|r�td|jd�}|�|�nl|r�t|�r�|d}d�dd�|D���	�d
kr�|�
|t�dS|�td��nd|k�r|�
|t�d|_dS)N�base�attr�name�__next__)�prefixcSsg|]}|���qSr)Zclone��.0rrrr�
<listcomp>9sz%FixNext.transform.<locals>.<listcomp>��r	�headcSsg|]}t|��qSr)�strrrrrrEsZ__builtin__�globalT)�AssertionError�getr�replacerrr�is_assign_target�join�striprr
)r�nodeZresultsrrrrr rrr�	transform.s.




zFixNext.transform)	�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERN�orderrr*�
__classcell__rrrrrs

rcCsFt|�}|dkrdS|jD]&}|jtjkr0dSt||�rdSqdS)NFT)�find_assign�children�typer�EQUAL�
is_subtree)r)ZassignZchildrrrr&Qs

r&cCs4|jtjkr|S|jtjks&|jdkr*dSt|j�S�N)r2�symsZ	expr_stmtZsimple_stmt�parentr0�r)rrrr0]s
r0cs$|�krdSt�fdd�|jD��S)NTc3s|]}t|��VqdSr5)r4)r�cr8rr�	<genexpr>gszis_subtree.<locals>.<genexpr>)�anyr1)�rootr)rr8rr4dsr4N)�__doc__Zpgen2rZpygramrr6rrZ
fixer_utilrrrr
ZBaseFixrr&r0r4rrrr�<module>s@PK(:�Z�����1__pycache__/fix_tuple_params.cpython-38.opt-2.pycnu�[���U

e5d��@s�ddlmZddlmZddlmZddlmZmZmZm	Z	m
Z
mZdd�ZGdd�dej
�Zd	d
�Zdd�Zgd
fdd�Zdd�Zd
S)�)�pytree)�token)�
fixer_base)�Assign�Name�Newline�Number�	Subscript�symscCst|tj�o|jdjtjkS)N�)�
isinstancer�Node�children�typer�STRING)�stmt�r�6/usr/lib64/python3.8/lib2to3/fixes/fix_tuple_params.py�is_docstrings�rc@s(eZdZdZdZdZdd�Zdd�ZdS)	�FixTupleParams�Ta
              funcdef< 'def' any parameters< '(' args=any ')' >
                       ['->' any] ':' suite=any+ >
              |
              lambda=
              lambdef< 'lambda' args=vfpdef< '(' inner=any ')' >
                       ':' body=any
              >
              cs�d|kr��||�Sg�|d}|d}|djdjtjkrZd}|djdj}t��nd}d}t�tjd��d���fd
d�	}|jt	j
kr�||�n<|jt	jkr�t|j�D]$\}}	|	jt	j
kr�||	|dkd�q��s�dS�D]}
|d|
_
q�|}|dk�r
d
�d_n&t|dj|��r0|�d_|d}�D]}
|d|
_
�q4�|dj||�<t|d|t��d�D]}||dj|_�qr|d��dS)N�lambda�suite�argsr�rz; �Fcs\t����}|��}d|_t||���}|r2d|_|�|���t�t	j
|���g��dS)Nr� )r�new_name�clone�prefixr�replace�appendrr
r
Zsimple_stmt)Z	tuple_arg�
add_prefix�n�argr��endZ	new_lines�selfrr�handle_tupleCs

�z.FixTupleParams.transform.<locals>.handle_tuple)r"r)F)�transform_lambdarrr�INDENT�valuerrZLeafr
ZtfpdefZ
typedargslist�	enumerate�parentrr�range�lenZchanged)r'�node�resultsrr�start�indentr(�ir$�lineZafterrr%r�	transform.sF


zFixTupleParams.transformc
Cs�|d}|d}t|d�}|jtjkrD|��}d|_|�|�dSt|�}t|�}|�	t
|��}t|dd�}	|�|	���|��D]X}
|
jtjkr�|
j
|kr�dd�||
j
D�}t�tj|	��g|�}|
j|_|
�|�q�dS)Nr�body�innerr)rcSsg|]}|���qSr)r��.0�crrr�
<listcomp>�sz3FixTupleParams.transform_lambda.<locals>.<listcomp>)�
simplify_argsrr�NAMErrr �find_params�map_to_indexr�
tuple_namerZ
post_orderr+rr
r
Zpower)
r'r0r1rr7r8ZparamsZto_indexZtup_nameZ	new_paramr#Z
subscripts�newrrrr)ns*
�zFixTupleParams.transform_lambdaN)�__name__�
__module__�__qualname__Z	run_orderZ
BM_compatibleZPATTERNr6r)rrrrrs

@rcCsN|jtjtjfkr|S|jtjkr>|jtjkr:|jd}q"|Std|��dS)NrzReceived unexpected node %s)rr
Zvfplistrr>�vfpdefr�RuntimeError�r0rrrr=�sr=cCs<|jtjkrt|jd�S|jtjkr,|jSdd�|jD�S)NrcSs g|]}|jtjkrt|��qSr)rr�COMMAr?r9rrrr<�szfind_params.<locals>.<listcomp>)rr
rFr?rrr>r+rHrrrr?�s
r?NcCsZ|dkri}t|�D]@\}}ttt|���g}t|t�rHt|||d�q||||<q|S)N)�d)r,r	r�strr�listr@)�
param_listrrJr4�objZtrailerrrrr@�s
r@cCs<g}|D](}t|t�r&|�t|��q|�|�qd�|�S)N�_)rrLr!rA�join)rM�lrNrrrrA�s
rA)rrZpgen2rrZ
fixer_utilrrrrr	r
rZBaseFixrr=r?r@rArrrr�<module>s lPK(:�Z���[[,__pycache__/fix_nonzero.cpython-38.opt-2.pycnu�[���U

e5dO�@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixNonzeroTz�
    classdef< 'class' any+ ':'
              suite< any*
                     funcdef< 'def' name='__nonzero__'
                              parameters< '(' NAME ')' > any+ >
                     any* > >
    cCs$|d}td|jd�}|�|�dS)N�name�__bool__)�prefix)rr�replace)�selfZnodeZresultsr�new�r�1/usr/lib64/python3.8/lib2to3/fixes/fix_nonzero.py�	transformszFixNonzero.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrrrsrN)�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK(:�Z��CC0__pycache__/fix_set_literal.cpython-38.opt-2.pycnu�[���U

e5d��@s6ddlmZmZddlmZmZGdd�dej�ZdS)�)�
fixer_base�pytree)�token�symsc@s eZdZdZdZdZdd�ZdS)�
FixSetLiteralTajpower< 'set' trailer< '('
                     (atom=atom< '[' (items=listmaker< any ((',' any)* [',']) >
                                |
                                single=any) ']' >
                     |
                     atom< '(' items=testlist_gexp< any ((',' any)* [',']) > ')' >
                     )
                     ')' > >
              c	Cs�|�d�}|r2t�tj|��g�}|�|�|}n|d}t�tj	d�g}|�
dd�|jD��|�t�tj
d��|jj|d_t�tj|�}|j|_t|j�dkr�|jd	}|��|j|jd_|S)
N�single�items�{css|]}|��VqdS)N)�clone)�.0�n�r
�5/usr/lib64/python3.8/lib2to3/fixes/fix_set_literal.py�	<genexpr>'sz*FixSetLiteral.transform.<locals>.<genexpr>�}�����)�getrZNoderZ	listmakerr
�replaceZLeafr�LBRACE�extendZchildren�append�RBRACEZnext_sibling�prefixZdictsetmaker�len�remove)	�selfZnodeZresultsrZfaker�literalZmakerrr
r
r�	transforms"


zFixSetLiteral.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZexplicitZPATTERNrr
r
r
rrs
rN)Zlib2to3rrZlib2to3.fixer_utilrrZBaseFixrr
r
r
r�<module>sPK(:�Z;�3���*__pycache__/fix_set_literal.cpython-38.pycnu�[���U

e5d��@s:dZddlmZmZddlmZmZGdd�dej�ZdS)z:
Optional fixer to transform set() calls to set literals.
�)�
fixer_base�pytree)�token�symsc@s eZdZdZdZdZdd�ZdS)�
FixSetLiteralTajpower< 'set' trailer< '('
                     (atom=atom< '[' (items=listmaker< any ((',' any)* [',']) >
                                |
                                single=any) ']' >
                     |
                     atom< '(' items=testlist_gexp< any ((',' any)* [',']) > ')' >
                     )
                     ')' > >
              c	Cs�|�d�}|r2t�tj|��g�}|�|�|}n|d}t�tj	d�g}|�
dd�|jD��|�t�tj
d��|jj|d_t�tj|�}|j|_t|j�dkr�|jd	}|��|j|jd_|S)
N�single�items�{css|]}|��VqdS)N)�clone)�.0�n�r
�5/usr/lib64/python3.8/lib2to3/fixes/fix_set_literal.py�	<genexpr>'sz*FixSetLiteral.transform.<locals>.<genexpr>�}�����)�getrZNoderZ	listmakerr
�replaceZLeafr�LBRACE�extendZchildren�append�RBRACEZnext_sibling�prefixZdictsetmaker�len�remove)	�selfZnodeZresultsrZfaker�literalZmakerrr
r
r�	transforms"


zFixSetLiteral.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZexplicitZPATTERNrr
r
r
rrs
rN)	�__doc__Zlib2to3rrZlib2to3.fixer_utilrrZBaseFixrr
r
r
r�<module>sPK(:�Zoz�&&&__pycache__/fix_imports.cpython-38.pycnu�[���U

e5d4�1@s�dZddlmZddlmZmZddddddd	d
dddd
d
ddddddddddddddddddd d!d"d"d#d$d%d&d'd(d(d(d)d*d*d+d,d-�0Zd.d/�Zefd0d1�ZGd2d3�d3ej	�Z
d4S)5z/Fix incompatible imports and module references.�)�
fixer_base)�Name�
attr_chain�io�pickle�builtins�copyregZqueueZsocketserverZconfigparser�reprlibztkinter.filedialogztkinter.simpledialogztkinter.colorchooserztkinter.commondialogztkinter.dialogztkinter.dndztkinter.fontztkinter.messageboxztkinter.scrolledtextztkinter.constantsztkinter.tixztkinter.ttkZtkinterZ_markupbase�winreg�_threadZ
_dummy_threadzdbm.bsdzdbm.dumbzdbm.ndbmzdbm.gnuz
xmlrpc.clientz
xmlrpc.serverzhttp.clientz
html.entitieszhtml.parserzhttp.cookieszhttp.cookiejarzhttp.server�
subprocess�collectionszurllib.parsezurllib.robotparser)0�StringIOZ	cStringIOZcPickleZ__builtin__Zcopy_regZQueueZSocketServerZConfigParser�reprZ
FileDialogZtkFileDialogZSimpleDialogZtkSimpleDialogZtkColorChooserZtkCommonDialogZDialogZTkdndZtkFontZtkMessageBoxZScrolledTextZTkconstantsZTixZttkZTkinterZ
markupbase�_winreg�threadZdummy_threadZdbhashZdumbdbmZdbmZgdbmZ	xmlrpclibZDocXMLRPCServerZSimpleXMLRPCServerZhttplibZhtmlentitydefsZ
HTMLParserZCookieZ	cookielibZBaseHTTPServerZSimpleHTTPServerZ
CGIHTTPServerZcommands�
UserString�UserListZurlparseZrobotparsercCsdd�tt|��dS)N�(�|�))�join�mapr)�members�r�1/usr/lib64/python3.8/lib2to3/fixes/fix_imports.py�
alternates=srccsTd�dd�|D��}t|���}d||fVd|Vd||fVd|VdS)Nz | cSsg|]}d|�qS)zmodule_name='%s'r)�.0�keyrrr�
<listcomp>Bsz!build_pattern.<locals>.<listcomp>zyname_import=import_name< 'import' ((%s) |
               multiple_imports=dotted_as_names< any* (%s) any* >) >
          z�import_from< 'from' (%s) 'import' ['(']
              ( any | import_as_name< any 'as' any > |
                import_as_names< any* >)  [')'] >
          z�import_name< 'import' (dotted_as_name< (%s) 'as' any > |
               multiple_imports=dotted_as_names<
                 any* dotted_as_name< (%s) 'as' any > any* >) >
          z3power< bare_with_attr=(%s) trailer<'.' any > any* >)rr�keys)�mappingZmod_listZ
bare_namesrrr�
build_patternAs���r"csTeZdZdZdZeZdZdd�Z�fdd�Z	�fdd�Z
�fd	d
�Zdd�Z�Z
S)
�
FixImportsT�cCsd�t|j��S)Nr)rr"r!��selfrrrr"`szFixImports.build_patterncs|��|_tt|���dS�N)r"ZPATTERN�superr#�compile_patternr%��	__class__rrr)cs
zFixImports.compile_patterncsHtt|�j��|�}|rDd|kr@t�fdd�t|d�D��r@dS|SdS)N�bare_with_attrc3s|]}�|�VqdSr'r)r�obj��matchrr�	<genexpr>qsz#FixImports.match.<locals>.<genexpr>�parentF)r(r#r/�anyr)r&�node�resultsr*r.rr/js�zFixImports.matchcstt|��||�i|_dSr')r(r#�
start_tree�replace)r&Ztree�filenamer*rrr5vszFixImports.start_treecCs�|�d�}|rh|j}|j|}|�t||jd��d|krD||j|<d|kr�|�|�}|r�|�||�n2|dd}|j�|j�}|r�|�t||jd��dS)NZmodule_name)�prefixZname_importZmultiple_importsr,�)�get�valuer!r6rr8r/�	transform)r&r3r4Z
import_modZmod_name�new_nameZ	bare_namerrrr<zs



zFixImports.transform)�__name__�
__module__�__qualname__Z
BM_compatibleZkeep_line_order�MAPPINGr!Z	run_orderr"r)r/r5r<�
__classcell__rrr*rr#Usr#N)�__doc__�rZ
fixer_utilrrrArr"ZBaseFixr#rrrr�<module>sl�5PK(:�Z��-r&__pycache__/fix_unicode.cpython-38.pycnu�[���U

e5d��@s<dZddlmZddlmZddd�ZGdd�dej�Zd	S)
z�Fixer for unicode.

* Changes unicode to str and unichr to chr.

* If "...\u..." is not unicode literal change it into "...\\u...".

* Change u"..." into "...".

�)�token)�
fixer_base�chr�str)ZunichrZunicodecs,eZdZdZdZ�fdd�Zdd�Z�ZS)�
FixUnicodeTzSTRING | 'unicode' | 'unichr'cs"tt|��||�d|jk|_dS)N�unicode_literals)�superr�
start_treeZfuture_featuresr)�selfZtree�filename��	__class__��1/usr/lib64/python3.8/lib2to3/fixes/fix_unicode.pyr	szFixUnicode.start_treecCs�|jtjkr$|��}t|j|_|S|jtjkr�|j}|jsj|ddkrjd|krjd�dd�|�	d�D��}|ddkr�|dd�}||jkr�|S|��}||_|SdS)	N�z'"�\z\\cSs g|]}|�dd��dd��qS)z\uz\\uz\Uz\\U)�replace)�.0�vrrr�
<listcomp> s�z(FixUnicode.transform.<locals>.<listcomp>ZuU�)
�typer�NAMEZclone�_mapping�value�STRINGr�join�split)r
ZnodeZresults�new�valrrr�	transforms"
�
zFixUnicode.transform)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr	r �
__classcell__rrrrrsrN)�__doc__Zpgen2r�rrZBaseFixrrrrr�<module>s

PK(:�Z�{.Nii*__pycache__/fix_paren.cpython-38.opt-1.pycnu�[���U

e5d��@s6dZddlmZddlmZmZGdd�dej�ZdS)zuFixer that addes parentheses where they are required

This converts ``[x for x in 1, 2]`` to ``[x for x in (1, 2)]``.�)�
fixer_base)�LParen�RParenc@seZdZdZdZdd�ZdS)�FixParenTa
        atom< ('[' | '(')
            (listmaker< any
                comp_for<
                    'for' NAME 'in'
                    target=testlist_safe< any (',' any)+ [',']
                     >
                    [any]
                >
            >
            |
            testlist_gexp< any
                comp_for<
                    'for' NAME 'in'
                    target=testlist_safe< any (',' any)+ [',']
                     >
                    [any]
                >
            >)
        (']' | ')') >
    cCs8|d}t�}|j|_d|_|�d|�|�t��dS)N�target��)r�prefixZinsert_childZappend_childr)�selfZnodeZresultsrZlparen�r�//usr/lib64/python3.8/lib2to3/fixes/fix_paren.py�	transform%szFixParen.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrrrsrN)�__doc__rrZ
fixer_utilrrZBaseFixrrrrr�<module>sPK(:�Z�ЊD)__pycache__/fix_repr.cpython-38.opt-2.pycnu�[���U

e5de�@s6ddlmZddlmZmZmZGdd�dej�ZdS)�)�
fixer_base)�Call�Name�parenthesizec@seZdZdZdZdd�ZdS)�FixReprTz7
              atom < '`' expr=any '`' >
              cCs8|d��}|j|jjkr"t|�}ttd�|g|jd�S)N�expr�repr)�prefix)Zclone�typeZsymsZ	testlist1rrrr	)�selfZnodeZresultsr�r�./usr/lib64/python3.8/lib2to3/fixes/fix_repr.py�	transformszFixRepr.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrr
rsrN)�rZ
fixer_utilrrrZBaseFixrrrrr
�<module>sPK(:�Z#T9D��2__pycache__/fix_standarderror.cpython-38.opt-1.pycnu�[���U

e5d��@s2dZddlmZddlmZGdd�dej�ZdS)z%Fixer for StandardError -> Exception.�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�FixStandarderrorTz-
              'StandardError'
              cCstd|jd�S)N�	Exception)�prefix)rr)�selfZnodeZresults�r�7/usr/lib64/python3.8/lib2to3/fixes/fix_standarderror.py�	transformszFixStandarderror.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrr	rsrN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr	�<module>sPK(:�Z���
�
%__pycache__/fix_except.cpython-38.pycnu�[���U

e5d
�@sfdZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZmZdd�Z
Gdd	�d	ej�Zd
S)a�Fixer for except statements with named exceptions.

The following cases will be converted:

- "except E, T:" where T is a name:

    except E as T:

- "except E, T:" where T is not a name, tuple or list:

        except E as t:
            T = t

    This is done because the target of an "except" clause must be a
    name.

- "except E, T:" where T is a tuple or list literal:

        except E as t:
            T = t.args
�)�pytree)�token)�
fixer_base)�Assign�Attr�Name�is_tuple�is_list�symsccsDt|�D]6\}}|jtjkr|jdjdkr|||dfVqdS)N��exceptr)�	enumerate�typer
�
except_clause�children�value)Znodes�i�n�r�0/usr/lib64/python3.8/lib2to3/fixes/fix_except.py�find_exceptssrc@seZdZdZdZdd�ZdS)�	FixExceptTa1
    try_stmt< 'try' ':' (simple_stmt | suite)
                  cleanup=(except_clause ':' (simple_stmt | suite))+
                  tail=(['except' ':' (simple_stmt | suite)]
                        ['else' ':' (simple_stmt | suite)]
                        ['finally' ':' (simple_stmt | suite)]) >
    cCsx|j}dd�|dD�}dd�|dD�}t|�D�]\}}t|j�dkr2|jdd�\}}	}
|	�tdd	d
��|
jtjk�r8t|�	�d	d
�}|
�
�}d|_|
�|�|�
�}|j}
t|
�D]\}}t
|tj�r�q�q�t|
�s�t|
�r�t|t|td���}n
t||�}t|
d|��D]}|�d
|��q|�||�q2|
jdkr2d	|
_q2dd�|jdd�D�||}t�|j|�S)NcSsg|]}|���qSr��clone)�.0rrrr�
<listcomp>2sz'FixExcept.transform.<locals>.<listcomp>�tailcSsg|]}|���qSrr)rZchrrrr4sZcleanup���as� )�prefix��argsrcSsg|]}|���qSrr)r�crrrr\s�)r
r�lenr�replacerrr�NAME�new_namerr!r
�
isinstancerZNoderr	rr�reversedZinsert_child)�selfZnodeZresultsr
rZtry_cleanuprZe_suite�EZcomma�NZnew_N�targetZsuite_stmtsrZstmtZassignZchildrrrr�	transform/s6


 zFixExcept.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr0rrrrr$srN)�__doc__r"rZpgen2rrZ
fixer_utilrrrrr	r
rZBaseFixrrrrr�<module>s PK(:�Z�Zm�%__pycache__/fix_future.cpython-38.pycnu�[���U

e5d#�@s2dZddlmZddlmZGdd�dej�ZdS)zVRemove __future__ imports

from __future__ import foo is replaced with an empty line.
�)�
fixer_base)�	BlankLinec@s eZdZdZdZdZdd�ZdS)�	FixFutureTz;import_from< 'from' module_name="__future__" 'import' any >�
cCst�}|j|_|S)N)r�prefix)�selfZnodeZresults�new�r	�0/usr/lib64/python3.8/lib2to3/fixes/fix_future.py�	transformszFixFuture.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZ	run_orderrr	r	r	r
rsrN)�__doc__�rZ
fixer_utilrZBaseFixrr	r	r	r
�<module>sPK(:�Z6�Ne�	�	+__pycache__/fix_filter.cpython-38.opt-1.pycnu�[���U

e5d�
�@sZdZddlmZddlmZddlmZddlm	Z	m
Z
mZmZm
Z
Gdd�dej�ZdS)	a�Fixer that changes filter(F, X) into list(filter(F, X)).

We avoid the transformation if the filter() call is directly contained
in iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or
for V in <>:.

NOTE: This is still not correct if the original code was depending on
filter(F, X) to return a string if X is a string and a tuple if X is a
tuple.  That would require type inference, which we don't do.  Let
Python 2.6 figure it out.
�)�
fixer_base)�Node)�python_symbols)�Name�ArgList�ListComp�in_special_context�parenthesizec@s eZdZdZdZdZdd�ZdS)�	FixFilterTaV
    filter_lambda=power<
        'filter'
        trailer<
            '('
            arglist<
                lambdef< 'lambda'
                         (fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any
                >
                ','
                it=any
            >
            ')'
        >
        [extra_trailers=trailer*]
    >
    |
    power<
        'filter'
        trailer< '(' arglist< none='None' ',' seq=any > ')' >
        [extra_trailers=trailer*]
    >
    |
    power<
        'filter'
        args=trailer< '(' [any] ')' >
        [extra_trailers=trailer*]
    >
    zfuture_builtins.filtercCsL|�|�rdSg}d|kr6|dD]}|�|���q"d|kr�|�d���}|jtjkrfd|_t|�}t	|�d���|�d���|�d���|�}t
tj|g|dd�}n�d|kr�t	td	�td	�|d
��td	��}t
tj|g|dd�}nTt
|�r�dS|d��}t
tjtd�|gdd�}t
tjtd
�t|g�g|�}d|_|j|_|S)NZextra_trailersZ
filter_lambda�xp��fp�it)�prefixZnoneZ_f�seq�args�filter�list)Zshould_skip�appendZclone�get�type�symsZtestrr	rrZpowerrrr)�selfZnodeZresultsZtrailers�tr�newr�r�0/usr/lib64/python3.8/lib2to3/fixes/fix_filter.py�	transform:s@
�
�zFixFilter.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onrrrrrr
sr
N)�__doc__rrZpytreerZpygramrrZ
fixer_utilrrrrr	ZConditionalFixr
rrrr�<module>s

PK(:�Z&eV�(($__pycache__/fix_types.cpython-38.pycnu�[���U

e5d��@spdZddlmZddlmZddddddd	d
dddd
dddddddddd�Zdd�eD�ZGdd�dej�ZdS)a�Fixer for removing uses of the types module.

These work for only the known names in the types module.  The forms above
can include types. or not.  ie, It is assumed the module is imported either as:

    import types
    from types import ... # either * or specific types

The import statements are not modified.

There should be another fixer that handles at least the following constants:

   type([]) -> list
   type(()) -> tuple
   type('') -> str

�)�
fixer_base)�Name�bool�
memoryview�type�complex�dictztype(Ellipsis)�float�int�list�objectz
type(None)ztype(NotImplemented)�slice�bytesz(str,)�tuple�str�range)ZBooleanTypeZ
BufferTypeZ	ClassTypeZComplexTypeZDictTypeZDictionaryTypeZEllipsisTypeZ	FloatTypeZIntTypeZListTypeZLongTypeZ
ObjectTypeZNoneTypeZNotImplementedTypeZ	SliceTypeZ
StringTypeZStringTypesZ	TupleTypeZTypeTypeZUnicodeTypeZ
XRangeTypecCsg|]}d|�qS)z)power< 'types' trailer< '.' name='%s' > >�)�.0�trr�//usr/lib64/python3.8/lib2to3/fixes/fix_types.py�
<listcomp>3src@s"eZdZdZd�e�Zdd�ZdS)�FixTypesT�|cCs&t�|dj�}|r"t||jd�SdS)N�name)�prefix)�
_TYPE_MAPPING�get�valuerr)�selfZnodeZresultsZ	new_valuerrr�	transform9szFixTypes.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�join�_patsZPATTERNrrrrrr5s
rN)	�__doc__�rZ
fixer_utilrrr$ZBaseFixrrrrr�<module>s4�PK(:�Zi.�6��'__pycache__/fix_ne.cpython-38.opt-2.pycnu�[���U

e5d;�@s:ddlmZddlmZddlmZGdd�dej�ZdS)�)�pytree)�token)�
fixer_basec@s"eZdZejZdd�Zdd�ZdS)�FixNecCs
|jdkS)Nz<>)�value)�self�node�r	�,/usr/lib64/python3.8/lib2to3/fixes/fix_ne.py�matchszFixNe.matchcCstjtjd|jd�}|S)Nz!=)�prefix)rZLeafr�NOTEQUALr)rrZresults�newr	r	r
�	transformszFixNe.transformN)�__name__�
__module__�__qualname__rr
Z_accept_typerrr	r	r	r
rsrN)�rZpgen2rrZBaseFixrr	r	r	r
�<module>sPK(:�Z��"	"	$__pycache__/fix_print.cpython-38.pycnu�[���U

e5d�@sldZddlmZddlmZddlmZddlmZddlmZm	Z	m
Z
mZe�d�Z
Gdd	�d	ej�Zd
S)aFixer for print.

Change:
    'print'          into 'print()'
    'print ...'      into 'print(...)'
    'print ... ,'    into 'print(..., end=" ")'
    'print >>x, ...' into 'print(..., file=x)'

No changes are applied if print_function is imported from __future__

�)�patcomp)�pytree)�token)�
fixer_base)�Name�Call�Comma�Stringz"atom< '(' [atom|STRING|NAME] ')' >c@s$eZdZdZdZdd�Zdd�ZdS)�FixPrintTzP
              simple_stmt< any* bare='print' any* > | print_stmt
              c
Cs�|st�|�d�}|r4|�ttd�g|jd��dS|jdtd�ksJt�|jdd�}t|�dkrvt�	|d�rvdSd}}}|r�|dt
�kr�|dd�}d}|r�|dt�t
jd�kr�t|�d	ks�t�|d��}|d
d�}dd�|D�}|�rd
|d_|dk	�s"|dk	�s"|dk	�rz|dk	�rB|�|dtt|���|dk	�rb|�|dtt|���|dk	�rz|�|d|�ttd�|�}	|j|	_|	S)NZbare�print)�prefix������ z>>r�cSsg|]}|���qS�)�clone)�.0�argrr�//usr/lib64/python3.8/lib2to3/fixes/fix_print.py�
<listcomp>?sz&FixPrint.transform.<locals>.<listcomp>��sep�end�file)�AssertionError�get�replacerrrZchildren�len�parend_expr�matchrr�Leafr�
RIGHTSHIFTr�	add_kwargr	�repr)
�selfZnodeZresultsZ
bare_print�argsrrrZl_argsZn_stmtrrr�	transform%s@
�



zFixPrint.transformcCsNd|_t�|jjt|�t�tjd�|f�}|r@|�	t
��d|_|�	|�dS)Nr�=r)rrZNodeZsymsZargumentrr"r�EQUAL�appendr)r&Zl_nodesZs_kwdZn_exprZ
n_argumentrrrr$Ms
��zFixPrint.add_kwargN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr(r$rrrrr
s(r
N)�__doc__rrrZpgen2rrZ
fixer_utilrrrr	Zcompile_patternr ZBaseFixr
rrrr�<module>s
�PK(:�Z�[�	�	+__pycache__/fix_import.cpython-38.opt-2.pycnu�[���U

e5d��@sVddlmZddlmZmZmZmZddlmZm	Z	m
Z
dd�ZGdd�dej�Z
d	S)
�)�
fixer_base�)�dirname�join�exists�sep)�
FromImport�syms�tokenccs�|g}|r�|��}|jtjkr(|jVq|jtjkrNd�dd�|jD��Vq|jtj	krl|�
|jd�q|jtjkr�|�|jddd��qt
d��qdS)N�cSsg|]
}|j�qS�)�value)�.0Zchrr�0/usr/lib64/python3.8/lib2to3/fixes/fix_import.py�
<listcomp>sz$traverse_imports.<locals>.<listcomp>r���zunknown node type)�pop�typer
�NAMEr
r	Zdotted_namer�childrenZdotted_as_name�appendZdotted_as_names�extend�AssertionError)�namesZpending�noderrr�traverse_importss
rcs4eZdZdZdZ�fdd�Zdd�Zdd�Z�ZS)	�	FixImportTzj
    import_from< 'from' imp=any 'import' ['('] any [')'] >
    |
    import_name< 'import' imp=any >
    cs"tt|��||�d|jk|_dS)NZabsolute_import)�superr�
start_treeZfuture_features�skip)�selfZtree�name��	__class__rrr/szFixImport.start_treecCs�|jr
dS|d}|jtjkrVt|d�s4|jd}q|�|j�r�d|j|_|��nZd}d}t	|�D]}|�|�rzd}qfd}qf|r�|r�|�
|d�dStd|g�}|j|_|SdS)N�impr
r�.FTz#absolute and local imports together)
rrr	Zimport_from�hasattrr�probably_a_local_importr
ZchangedrZwarningr�prefix)r rZresultsr$Z
have_localZ
have_absoluteZmod_name�newrrr�	transform3s,


zFixImport.transformcCst|�d�rdS|�dd�d}t|j�}t||�}ttt|�d��sHdSdtddd	d
fD]}t||�rXdSqXdS)Nr%F�rz__init__.pyz.pyz.pycz.soz.slz.pydT)�
startswith�splitr�filenamerrr)r Zimp_name�	base_pathZextrrrr'Us


z!FixImport.probably_a_local_import)	�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrr*r'�
__classcell__rrr"rr&s
"rN)rrZos.pathrrrrZ
fixer_utilrr	r
rZBaseFixrrrrr�<module>sPK(:�Z���^^/__pycache__/fix_xreadlines.cpython-38.opt-1.pycnu�[���U

e5d��@s2dZddlmZddlmZGdd�dej�ZdS)zpFix "for x in f.xreadlines()" -> "for x in f".

This fixer will also convert g(f.xreadlines) into g(f.__iter__).�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixXreadlinesTz�
    power< call=any+ trailer< '.' 'xreadlines' > trailer< '(' ')' > >
    |
    power< any+ trailer< '.' no_call='xreadlines' > >
    cCs@|�d�}|r$|�td|jd��n|�dd�|dD��dS)N�no_call�__iter__)�prefixcSsg|]}|���qS�)Zclone)�.0�xrr�4/usr/lib64/python3.8/lib2to3/fixes/fix_xreadlines.py�
<listcomp>sz+FixXreadlines.transform.<locals>.<listcomp>Zcall)�get�replacerr)�selfZnodeZresultsrrrr�	transforms
zFixXreadlines.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK(:�Zx�*���*__pycache__/fix_numliterals.cpython-38.pycnu�[���U

e5d�@s>dZddlmZddlmZddlmZGdd�dej�ZdS)z-Fixer that turns 1L into 1, 0755 into 0o755.
�)�token)�
fixer_base)�Numberc@s"eZdZejZdd�Zdd�ZdS)�FixNumliteralscCs|j�d�p|jddkS)N�0����Ll)�value�
startswith)�self�node�r
�5/usr/lib64/python3.8/lib2to3/fixes/fix_numliterals.py�matchszFixNumliterals.matchcCs`|j}|ddkr |dd�}n2|�d�rR|��rRtt|��dkrRd|dd�}t||jd�S)Nrrr�Z0o)�prefix)r	r
�isdigit�len�setrr)rrZresults�valr
r
r�	transforms"zFixNumliterals.transformN)�__name__�
__module__�__qualname__r�NUMBERZ_accept_typerrr
r
r
rrsrN)	�__doc__Zpgen2r�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK(:�ZB�$��-__pycache__/fix_ws_comma.cpython-38.opt-2.pycnu�[���U

e5dB�@s:ddlmZddlmZddlmZGdd�dej�ZdS)�)�pytree)�token)�
fixer_basec@s@eZdZdZdZe�ejd�Ze�ej	d�Z	ee	fZ
dd�ZdS)�
FixWsCommaTzH
    any<(not(',') any)+ ',' ((not(',') any)+ ',')* [not(',') any]>
    �,�:cCs`|��}d}|jD]H}||jkrB|j}|��r<d|kr<d|_d}q|rV|j}|sVd|_d}q|S)NF�
�T� )ZcloneZchildren�SEPS�prefix�isspace)�selfZnodeZresults�newZcommaZchildr�r�2/usr/lib64/python3.8/lib2to3/fixes/fix_ws_comma.py�	transforms

zFixWsComma.transformN)�__name__�
__module__�__qualname__ZexplicitZPATTERNrZLeafr�COMMA�COLONrrrrrrrsrN)r	rZpgen2rrZBaseFixrrrrr�<module>sPK(:�Z#T9D��,__pycache__/fix_standarderror.cpython-38.pycnu�[���U

e5d��@s2dZddlmZddlmZGdd�dej�ZdS)z%Fixer for StandardError -> Exception.�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�FixStandarderrorTz-
              'StandardError'
              cCstd|jd�S)N�	Exception)�prefix)rr)�selfZnodeZresults�r�7/usr/lib64/python3.8/lib2to3/fixes/fix_standarderror.py�	transformszFixStandarderror.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrr	rsrN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr	�<module>sPK(:�Z˾�< 	 	,__pycache__/fix_has_key.cpython-38.opt-2.pycnu�[���U

e5d|�@s>ddlmZddlmZddlmZmZGdd�dej�ZdS)�)�pytree)�
fixer_base)�Name�parenthesizec@seZdZdZdZdd�ZdS)�	FixHasKeyTa�
    anchor=power<
        before=any+
        trailer< '.' 'has_key' >
        trailer<
            '('
            ( not(arglist | argument<any '=' any>) arg=any
            | arglist<(not argument<any '=' any>) arg=any ','>
            )
            ')'
        >
        after=any*
    >
    |
    negation=not_test<
        'not'
        anchor=power<
            before=any+
            trailer< '.' 'has_key' >
            trailer<
                '('
                ( not(arglist | argument<any '=' any>) arg=any
                | arglist<(not argument<any '=' any>) arg=any ','>
                )
                ')'
            >
        >
    >
    c

Cs||j}|jj|jkr&|j�|j�r&dS|�d�}|d}|j}dd�|dD�}|d��}|�d�}	|	rxdd�|	D�}	|j|j	|j|j
|j|j|j
|jfkr�t|�}t|�d	kr�|d
}nt�|j|�}d|_tddd
�}
|r�tddd
�}t�|j||
f�}
t�|j	||
|f�}|	�r8t|�}t�|j|ft|	��}|jj|j	|j|j|j|j|j|j|j|jf	k�rrt|�}||_|S)N�negation�anchorcSsg|]}|���qS���clone��.0�nr	r	�1/usr/lib64/python3.8/lib2to3/fixes/fix_has_key.py�
<listcomp>Rsz'FixHasKey.transform.<locals>.<listcomp>�before�arg�aftercSsg|]}|���qSr	r
rr	r	rrVs��� �in)�prefix�not)�syms�parent�typeZnot_test�pattern�match�getrrZ
comparisonZand_testZor_testZtestZlambdefZargumentr�lenrZNodeZpowerrZcomp_op�tuple�exprZxor_exprZand_exprZ
shift_exprZ
arith_exprZtermZfactor)
�selfZnodeZresultsrrrrrrrZn_opZn_not�newr	r	r�	transformGsV�

�
�zFixHasKey.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr%r	r	r	rr&srN)�rrZ
fixer_utilrrZBaseFixrr	r	r	r�<module>!sPK(:�Z�+nbcc+__pycache__/fix_reduce.cpython-38.opt-1.pycnu�[���U

e5dE�@s2dZddlmZddlmZGdd�dej�ZdS)zqFixer for reduce().

Makes sure reduce() is imported from the functools module if reduce is
used in that module.
�)�
fixer_base��touch_importc@s eZdZdZdZdZdd�ZdS)�	FixReduceTZpreai
    power< 'reduce'
        trailer< '('
            arglist< (
                (not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any) |
                (not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any)
            ) >
        ')' >
    >
    cCstdd|�dS)N�	functools�reducer)�selfZnodeZresults�r	�0/usr/lib64/python3.8/lib2to3/fixes/fix_reduce.py�	transform"szFixReduce.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�orderZPATTERNrr	r	r	r
rsrN)�__doc__Zlib2to3rZlib2to3.fixer_utilrZBaseFixrr	r	r	r
�<module>sPK(:�Z��C��0__pycache__/fix_numliterals.cpython-38.opt-2.pycnu�[���U

e5d�@s:ddlmZddlmZddlmZGdd�dej�ZdS)�)�token)�
fixer_base)�Numberc@s"eZdZejZdd�Zdd�ZdS)�FixNumliteralscCs|j�d�p|jddkS)N�0����Ll)�value�
startswith)�self�node�r
�5/usr/lib64/python3.8/lib2to3/fixes/fix_numliterals.py�matchszFixNumliterals.matchcCs`|j}|ddkr |dd�}n2|�d�rR|��rRtt|��dkrRd|dd�}t||jd�S)Nrrr�Z0o)�prefix)r	r
�isdigit�len�setrr)rrZresults�valr
r
r�	transforms"zFixNumliterals.transformN)�__name__�
__module__�__qualname__r�NUMBERZ_accept_typerrr
r
r
rrsrN)Zpgen2r�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK(:�Z���&__pycache__/fix_nonzero.cpython-38.pycnu�[���U

e5dO�@s2dZddlmZddlmZGdd�dej�ZdS)z*Fixer for __nonzero__ -> __bool__ methods.�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixNonzeroTz�
    classdef< 'class' any+ ':'
              suite< any*
                     funcdef< 'def' name='__nonzero__'
                              parameters< '(' NAME ')' > any+ >
                     any* > >
    cCs$|d}td|jd�}|�|�dS)N�name�__bool__)�prefix)rr�replace)�selfZnodeZresultsr�new�r�1/usr/lib64/python3.8/lib2to3/fixes/fix_nonzero.py�	transformszFixNonzero.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrrrsrN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK(:�Z6�Ne�	�	%__pycache__/fix_filter.cpython-38.pycnu�[���U

e5d�
�@sZdZddlmZddlmZddlmZddlm	Z	m
Z
mZmZm
Z
Gdd�dej�ZdS)	a�Fixer that changes filter(F, X) into list(filter(F, X)).

We avoid the transformation if the filter() call is directly contained
in iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or
for V in <>:.

NOTE: This is still not correct if the original code was depending on
filter(F, X) to return a string if X is a string and a tuple if X is a
tuple.  That would require type inference, which we don't do.  Let
Python 2.6 figure it out.
�)�
fixer_base)�Node)�python_symbols)�Name�ArgList�ListComp�in_special_context�parenthesizec@s eZdZdZdZdZdd�ZdS)�	FixFilterTaV
    filter_lambda=power<
        'filter'
        trailer<
            '('
            arglist<
                lambdef< 'lambda'
                         (fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any
                >
                ','
                it=any
            >
            ')'
        >
        [extra_trailers=trailer*]
    >
    |
    power<
        'filter'
        trailer< '(' arglist< none='None' ',' seq=any > ')' >
        [extra_trailers=trailer*]
    >
    |
    power<
        'filter'
        args=trailer< '(' [any] ')' >
        [extra_trailers=trailer*]
    >
    zfuture_builtins.filtercCsL|�|�rdSg}d|kr6|dD]}|�|���q"d|kr�|�d���}|jtjkrfd|_t|�}t	|�d���|�d���|�d���|�}t
tj|g|dd�}n�d|kr�t	td	�td	�|d
��td	��}t
tj|g|dd�}nTt
|�r�dS|d��}t
tjtd�|gdd�}t
tjtd
�t|g�g|�}d|_|j|_|S)NZextra_trailersZ
filter_lambda�xp��fp�it)�prefixZnoneZ_f�seq�args�filter�list)Zshould_skip�appendZclone�get�type�symsZtestrr	rrZpowerrrr)�selfZnodeZresultsZtrailers�tr�newr�r�0/usr/lib64/python3.8/lib2to3/fixes/fix_filter.py�	transform:s@
�
�zFixFilter.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onrrrrrr
sr
N)�__doc__rrZpytreerZpygramrrZ
fixer_utilrrrrr	ZConditionalFixr
rrrr�<module>s

PK(:�Z�OuC**"__pycache__/fix_zip.cpython-38.pycnu�[���U

e5d	�@sRdZddlmZddlmZddlmZddlm	Z	m
Z
mZGdd�dej�Z
dS)	a7
Fixer that changes zip(seq0, seq1, ...) into list(zip(seq0, seq1, ...)
unless there exists a 'from future_builtins import zip' statement in the
top-level namespace.

We avoid the transformation if the zip() call is directly contained in
iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or for V in <>:.
�)�
fixer_base)�Node)�python_symbols)�Name�ArgList�in_special_contextc@s eZdZdZdZdZdd�ZdS)�FixZipTzN
    power< 'zip' args=trailer< '(' [any] ')' > [trailers=trailer*]
    >
    zfuture_builtins.zipcCs�|�|�rdSt|�rdS|d��}d|_g}d|krZdd�|dD�}|D]
}d|_qNttjtd�|gdd�}ttjtd�t|g�g|�}|j|_|S)	N�args��trailerscSsg|]}|���qS�)�clone)�.0�nrr�-/usr/lib64/python3.8/lib2to3/fixes/fix_zip.py�
<listcomp>'sz$FixZip.transform.<locals>.<listcomp>�zip)�prefix�list)	Zshould_skiprr
rr�symsZpowerrr)�selfZnodeZresultsr	rr�newrrr�	transforms
zFixZip.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onrrrrrrsrN)�__doc__r
rZpytreerZpygramrrZ
fixer_utilrrrZConditionalFixrrrrr�<module>s

PK(:�Z�K�xx#__pycache__/fix_exec.cpython-38.pycnu�[���U

e5d��@s:dZddlmZddlmZmZmZGdd�dej�ZdS)z�Fixer for exec.

This converts usages of the exec statement into calls to a built-in
exec() function.

exec code in ns1, ns2 -> exec(code, ns1, ns2)
�)�
fixer_base)�Comma�Name�Callc@seZdZdZdZdd�ZdS)�FixExecTzx
    exec_stmt< 'exec' a=any 'in' b=any [',' c=any] >
    |
    exec_stmt< 'exec' (not atom<'(' [any] ')'>) a=any >
    cCs�|st�|j}|d}|�d�}|�d�}|��g}d|d_|dk	rZ|�t�|��g�|dk	rv|�t�|��g�ttd�||jd�S)N�a�b�c���exec)�prefix)	�AssertionError�syms�getZcloner
�extendrrr)�selfZnodeZresultsrrrr	�args�r�./usr/lib64/python3.8/lib2to3/fixes/fix_exec.py�	transforms



zFixExec.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)	�__doc__r
rZ
fixer_utilrrrZBaseFixrrrrr�<module>s	PK(:�ZbR�%��-__pycache__/fix_execfile.cpython-38.opt-1.pycnu�[���U

e5d�@sVdZddlmZddlmZmZmZmZmZm	Z	m
Z
mZmZm
Z
Gdd�dej�ZdS)zoFixer for execfile.

This converts usages of the execfile function into calls to the built-in
exec() function.
�)�
fixer_base)
�Comma�Name�Call�LParen�RParen�Dot�Node�ArgList�String�symsc@seZdZdZdZdd�ZdS)�FixExecfileTz�
    power< 'execfile' trailer< '(' arglist< filename=any [',' globals=any [',' locals=any ] ] > ')' > >
    |
    power< 'execfile' trailer< '(' filename=any ')' > >
    cCs&|d}|�d�}|�d�}|jdjd��}t|��t�tdd�g|d�}ttjt	d�|g�}ttj
t�t	d	�g�ttj
t�t
�g�g}	|g|	}
|��}d|_td
d�}|
t�|t�|g}
tt	d�|
d�}|g}|dk	r�|�t�|��g�|dk	�r|�t�|��g�tt	d
�||jd�S)N�filename�globals�locals���z"rb"� )Zrparen�open�readz'exec'�compile��exec)�prefix)�getZchildrenZcloner
rrr	rZpowerrZtrailerrrrrr�extend)�selfZnodeZresultsrrrZexecfile_parenZ	open_argsZ	open_callrZ	open_exprZfilename_argZexec_strZcompile_argsZcompile_call�args�r�2/usr/lib64/python3.8/lib2to3/fixes/fix_execfile.py�	transforms.

��


zFixExecfile.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrr
sr
N)�__doc__rrZ
fixer_utilrrrrrrr	r
rrZBaseFixr
rrrr�<module>s0PK(:�Z�}��
�
%__pycache__/fix_import.cpython-38.pycnu�[���U

e5d��@sZdZddlmZddlmZmZmZmZddlm	Z	m
Z
mZdd�ZGdd	�d	ej
�Zd
S)z�Fixer for import statements.
If spam is being imported from the local directory, this import:
    from spam import eggs
Becomes:
    from .spam import eggs

And this import:
    import spam
Becomes:
    from . import spam
�)�
fixer_base�)�dirname�join�exists�sep)�
FromImport�syms�tokenccs�|g}|r�|��}|jtjkr(|jVq|jtjkrNd�dd�|jD��Vq|jtj	krl|�
|jd�q|jtjkr�|�|jddd��qt
d��qdS)zF
    Walks over all the names imported in a dotted_as_names node.
    �cSsg|]
}|j�qS�)�value)�.0Zchrr�0/usr/lib64/python3.8/lib2to3/fixes/fix_import.py�
<listcomp>sz$traverse_imports.<locals>.<listcomp>rN���zunknown node type)�pop�typer
�NAMEr
r	Zdotted_namer�childrenZdotted_as_name�appendZdotted_as_names�extend�AssertionError)�namesZpending�noderrr�traverse_importss
rcs4eZdZdZdZ�fdd�Zdd�Zdd�Z�ZS)	�	FixImportTzj
    import_from< 'from' imp=any 'import' ['('] any [')'] >
    |
    import_name< 'import' imp=any >
    cs"tt|��||�d|jk|_dS)NZabsolute_import)�superr�
start_treeZfuture_features�skip)�selfZtree�name��	__class__rrr/szFixImport.start_treecCs�|jr
dS|d}|jtjkrVt|d�s4|jd}q|�|j�r�d|j|_|��nZd}d}t	|�D]}|�|�rzd}qfd}qf|r�|r�|�
|d�dStd|g�}|j|_|SdS)N�impr
r�.FTz#absolute and local imports together)
rrr	Zimport_from�hasattrr�probably_a_local_importr
ZchangedrZwarningr�prefix)r rZresultsr$Z
have_localZ
have_absoluteZmod_name�newrrr�	transform3s,


zFixImport.transformcCst|�d�rdS|�dd�d}t|j�}t||�}ttt|�d��sHdSdtddd	d
fD]}t||�rXdSqXdS)Nr%F�rz__init__.pyz.pyz.pycz.soz.slz.pydT)�
startswith�splitr�filenamerrr)r Zimp_name�	base_pathZextrrrr'Us


z!FixImport.probably_a_local_import)	�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrr*r'�
__classcell__rrr"rr&s
"rN)�__doc__rrZos.pathrrrrZ
fixer_utilrr	r
rZBaseFixrrrrr�<module>s

PK(:�Z0jZZ'__pycache__/fix_ws_comma.cpython-38.pycnu�[���U

e5dB�@s>dZddlmZddlmZddlmZGdd�dej�ZdS)z�Fixer that changes 'a ,b' into 'a, b'.

This also changes '{a :b}' into '{a: b}', but does not touch other
uses of colons.  It does not touch other uses of whitespace.

�)�pytree)�token)�
fixer_basec@s@eZdZdZdZe�ejd�Ze�ej	d�Z	ee	fZ
dd�ZdS)�
FixWsCommaTzH
    any<(not(',') any)+ ',' ((not(',') any)+ ',')* [not(',') any]>
    �,�:cCs`|��}d}|jD]H}||jkrB|j}|��r<d|kr<d|_d}q|rV|j}|sVd|_d}q|S)NF�
�T� )ZcloneZchildren�SEPS�prefix�isspace)�selfZnodeZresults�newZcommaZchildr�r�2/usr/lib64/python3.8/lib2to3/fixes/fix_ws_comma.py�	transforms

zFixWsComma.transformN)�__name__�
__module__�__qualname__ZexplicitZPATTERNrZLeafr�COMMA�COLONrrrrrrrsrN)�__doc__r	rZpgen2rrZBaseFixrrrrr�<module>sPK(:�Z 2ny		.__pycache__/fix_itertools.cpython-38.opt-1.pycnu�[���U

e5d�@s2dZddlmZddlmZGdd�dej�ZdS)aT Fixer for itertools.(imap|ifilter|izip) --> (map|filter|zip) and
    itertools.ifilterfalse --> itertools.filterfalse (bugs 2360-2363)

    imports from itertools are fixed in fix_itertools_import.py

    If itertools is imported as something else (ie: import itertools as it;
    it.izip(spam, eggs)) method calls will not get fixed.
    �)�
fixer_base)�Namec@s*eZdZdZdZde�ZdZdd�ZdS)�FixItertoolsTz7('imap'|'ifilter'|'izip'|'izip_longest'|'ifilterfalse')z�
              power< it='itertools'
                  trailer<
                     dot='.' func=%(it_funcs)s > trailer< '(' [any] ')' > >
              |
              power< func=%(it_funcs)s trailer< '(' [any] ')' > >
              �cCs�d}|dd}d|krV|jdkrV|d|d}}|j}|��|��|j�|�|p^|j}|�t|jdd�|d��dS)N�func��it)ZifilterfalseZizip_longest�dot�)�prefix)�valuer�remove�parent�replacer)�selfZnodeZresultsrrr	r�r�3/usr/lib64/python3.8/lib2to3/fixes/fix_itertools.py�	transforms�
zFixItertools.transformN)	�__name__�
__module__�__qualname__Z
BM_compatibleZit_funcs�localsZPATTERNZ	run_orderrrrrrrs�	rN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr�<module>s
PK(:�Z*Gl��6__pycache__/fix_itertools_imports.cpython-38.opt-2.pycnu�[���U

e5d&�@s6ddlmZddlmZmZmZGdd�dej�ZdS)�)�
fixer_base)�	BlankLine�syms�tokenc@s"eZdZdZde�Zdd�ZdS)�FixItertoolsImportsTzT
              import_from< 'from' 'itertools' 'import' imports=any >
              cCsZ|d}|jtjks|js"|g}n|j}|ddd�D]|}|jtjkrR|j}|}n|jtjkrddS|jd}|j}|dkr�d|_|��q6|dkr6|�	�|ddkr�dnd	|_q6|jdd�p�|g}d
}	|D]&}|	r�|jtj
kr�|��q�|	d
N}	q�|�r|djtj
k�r|����q�|j�s4t|dd��r@|j
dk�rV|j}
t�}|
|_|SdS)
N�imports�r)ZimapZizipZifilter)ZifilterfalseZizip_longest��f�filterfalse�zip_longestT����value)�typerZimport_as_name�childrenr�NAMEr�STAR�removeZchanged�COMMA�pop�getattr�parent�prefixr)�selfZnodeZresultsrrZchild�memberZ	name_node�member_nameZremove_comma�p�r�;/usr/lib64/python3.8/lib2to3/fixes/fix_itertools_imports.py�	transformsF

�

�zFixItertoolsImports.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�localsZPATTERNrrrrrrs
�rN)Zlib2to3rZlib2to3.fixer_utilrrrZBaseFixrrrrr�<module>sPK(:�Z����ZZ,__pycache__/fix_has_key.cpython-38.opt-1.pycnu�[���U

e5d|�@sBdZddlmZddlmZddlmZmZGdd�dej�ZdS)a&Fixer for has_key().

Calls to .has_key() methods are expressed in terms of the 'in'
operator:

    d.has_key(k) -> k in d

CAVEATS:
1) While the primary target of this fixer is dict.has_key(), the
   fixer will change any has_key() method call, regardless of its
   class.

2) Cases like this will not be converted:

    m = d.has_key
    if m(k):
        ...

   Only *calls* to has_key() are converted. While it is possible to
   convert the above to something like

    m = d.__contains__
    if m(k):
        ...

   this is currently not done.
�)�pytree)�
fixer_base)�Name�parenthesizec@seZdZdZdZdd�ZdS)�	FixHasKeyTa�
    anchor=power<
        before=any+
        trailer< '.' 'has_key' >
        trailer<
            '('
            ( not(arglist | argument<any '=' any>) arg=any
            | arglist<(not argument<any '=' any>) arg=any ','>
            )
            ')'
        >
        after=any*
    >
    |
    negation=not_test<
        'not'
        anchor=power<
            before=any+
            trailer< '.' 'has_key' >
            trailer<
                '('
                ( not(arglist | argument<any '=' any>) arg=any
                | arglist<(not argument<any '=' any>) arg=any ','>
                )
                ')'
            >
        >
    >
    c

Cs||j}|jj|jkr&|j�|j�r&dS|�d�}|d}|j}dd�|dD�}|d��}|�d�}	|	rxdd�|	D�}	|j|j	|j|j
|j|j|j
|jfkr�t|�}t|�d	kr�|d
}nt�|j|�}d|_tddd
�}
|r�tddd
�}t�|j||
f�}
t�|j	||
|f�}|	�r8t|�}t�|j|ft|	��}|jj|j	|j|j|j|j|j|j|j|jf	k�rrt|�}||_|S)N�negation�anchorcSsg|]}|���qS���clone��.0�nr	r	�1/usr/lib64/python3.8/lib2to3/fixes/fix_has_key.py�
<listcomp>Rsz'FixHasKey.transform.<locals>.<listcomp>�before�arg�aftercSsg|]}|���qSr	r
rr	r	rrVs��� �in)�prefix�not)�syms�parent�typeZnot_test�pattern�match�getrrZ
comparisonZand_testZor_testZtestZlambdefZargumentr�lenrZNodeZpowerrZcomp_op�tuple�exprZxor_exprZand_exprZ
shift_exprZ
arith_exprZtermZfactor)
�selfZnodeZresultsrrrrrrrZn_opZn_not�newr	r	r�	transformGsV�

�
�zFixHasKey.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr%r	r	r	rr&srN)	�__doc__�rrZ
fixer_utilrrZBaseFixrr	r	r	r�<module>sPK(:�Z?u9sHH)__pycache__/fix_repr.cpython-38.opt-1.pycnu�[���U

e5de�@s:dZddlmZddlmZmZmZGdd�dej�ZdS)z/Fixer that transforms `xyzzy` into repr(xyzzy).�)�
fixer_base)�Call�Name�parenthesizec@seZdZdZdZdd�ZdS)�FixReprTz7
              atom < '`' expr=any '`' >
              cCs8|d��}|j|jjkr"t|�}ttd�|g|jd�S)N�expr�repr)�prefix)Zclone�typeZsymsZ	testlist1rrrr	)�selfZnodeZresultsr�r�./usr/lib64/python3.8/lib2to3/fixes/fix_repr.py�	transformszFixRepr.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrr
rsrN)	�__doc__�rZ
fixer_utilrrrZBaseFixrrrrr
�<module>sPK(:�Z��ǡ�.__pycache__/fix_itertools.cpython-38.opt-2.pycnu�[���U

e5d�@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Namec@s*eZdZdZdZde�ZdZdd�ZdS)�FixItertoolsTz7('imap'|'ifilter'|'izip'|'izip_longest'|'ifilterfalse')z�
              power< it='itertools'
                  trailer<
                     dot='.' func=%(it_funcs)s > trailer< '(' [any] ')' > >
              |
              power< func=%(it_funcs)s trailer< '(' [any] ')' > >
              �cCs�d}|dd}d|krV|jdkrV|d|d}}|j}|��|��|j�|�|p^|j}|�t|jdd�|d��dS)N�func��it)ZifilterfalseZizip_longest�dot�)�prefix)�valuer�remove�parent�replacer)�selfZnodeZresultsrrr	r�r�3/usr/lib64/python3.8/lib2to3/fixes/fix_itertools.py�	transforms�
zFixItertools.transformN)	�__name__�
__module__�__qualname__Z
BM_compatibleZit_funcs�localsZPATTERNZ	run_orderrrrrrrs�	rN)�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK(:�Z(�q&&'__pycache__/fix_ne.cpython-38.opt-1.pycnu�[���U

e5d;�@s>dZddlmZddlmZddlmZGdd�dej�ZdS)zFixer that turns <> into !=.�)�pytree)�token)�
fixer_basec@s"eZdZejZdd�Zdd�ZdS)�FixNecCs
|jdkS)Nz<>)�value)�self�node�r	�,/usr/lib64/python3.8/lib2to3/fixes/fix_ne.py�matchszFixNe.matchcCstjtjd|jd�}|S)Nz!=)�prefix)rZLeafr�NOTEQUALr)rrZresults�newr	r	r
�	transformszFixNe.transformN)�__name__�
__module__�__qualname__rr
Z_accept_typerrr	r	r	r
rsrN)�__doc__�rZpgen2rrZBaseFixrr	r	r	r
�<module>sPK(:�Z��vv&__pycache__/fix_has_key.cpython-38.pycnu�[���U

e5d|�@sBdZddlmZddlmZddlmZmZGdd�dej�ZdS)a&Fixer for has_key().

Calls to .has_key() methods are expressed in terms of the 'in'
operator:

    d.has_key(k) -> k in d

CAVEATS:
1) While the primary target of this fixer is dict.has_key(), the
   fixer will change any has_key() method call, regardless of its
   class.

2) Cases like this will not be converted:

    m = d.has_key
    if m(k):
        ...

   Only *calls* to has_key() are converted. While it is possible to
   convert the above to something like

    m = d.__contains__
    if m(k):
        ...

   this is currently not done.
�)�pytree)�
fixer_base)�Name�parenthesizec@seZdZdZdZdd�ZdS)�	FixHasKeyTa�
    anchor=power<
        before=any+
        trailer< '.' 'has_key' >
        trailer<
            '('
            ( not(arglist | argument<any '=' any>) arg=any
            | arglist<(not argument<any '=' any>) arg=any ','>
            )
            ')'
        >
        after=any*
    >
    |
    negation=not_test<
        'not'
        anchor=power<
            before=any+
            trailer< '.' 'has_key' >
            trailer<
                '('
                ( not(arglist | argument<any '=' any>) arg=any
                | arglist<(not argument<any '=' any>) arg=any ','>
                )
                ')'
            >
        >
    >
    c

Cs�|st�|j}|jj|jkr.|j�|j�r.dS|�d�}|d}|j}dd�|dD�}|d�	�}|�d�}	|	r�dd�|	D�}	|j|j
|j|j|j|j
|j|jfkr�t|�}t|�d	kr�|d
}nt�|j|�}d|_tddd
�}
|�rtddd
�}t�|j||
f�}
t�|j
||
|f�}|	�rBt|�}t�|j|ft|	��}|jj|j
|j|j|j|j|j|j|j|jf	k�r|t|�}||_|S)N�negation�anchorcSsg|]}|���qS���clone��.0�nr	r	�1/usr/lib64/python3.8/lib2to3/fixes/fix_has_key.py�
<listcomp>Rsz'FixHasKey.transform.<locals>.<listcomp>�before�arg�aftercSsg|]}|���qSr	r
rr	r	rrVs��� �in)�prefix�not)�AssertionError�syms�parent�typeZnot_test�pattern�match�getrrZ
comparisonZand_testZor_testZtestZlambdefZargumentr�lenrZNodeZpowerrZcomp_op�tuple�exprZxor_exprZand_exprZ
shift_exprZ
arith_exprZtermZfactor)
�selfZnodeZresultsrrrrrrrZn_opZn_not�newr	r	r�	transformGsX�

�
�zFixHasKey.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr&r	r	r	rr&srN)	�__doc__�rrZ
fixer_utilrrZBaseFixrr	r	r	r�<module>sPK(:�Z�
����*__pycache__/fix_print.cpython-38.opt-1.pycnu�[���U

e5d�@sldZddlmZddlmZddlmZddlmZddlmZm	Z	m
Z
mZe�d�Z
Gdd	�d	ej�Zd
S)aFixer for print.

Change:
    'print'          into 'print()'
    'print ...'      into 'print(...)'
    'print ... ,'    into 'print(..., end=" ")'
    'print >>x, ...' into 'print(..., file=x)'

No changes are applied if print_function is imported from __future__

�)�patcomp)�pytree)�token)�
fixer_base)�Name�Call�Comma�Stringz"atom< '(' [atom|STRING|NAME] ')' >c@s$eZdZdZdZdd�Zdd�ZdS)�FixPrintTzP
              simple_stmt< any* bare='print' any* > | print_stmt
              c
Cs`|�d�}|r,|�ttd�g|jd��dS|jdd�}t|�dkrXt�|d�rXdSd}}}|r�|dt	�kr�|dd�}d}|r�|dt
�tj
d�kr�|d��}|d	d�}d
d�|D�}|r�d|d_|dk	s�|dk	s�|dk	�rF|dk	�r|�|d
tt|���|dk	�r.|�|dtt|���|dk	�rF|�|d|�ttd�|�}	|j|	_|	S)NZbare�print)�prefix������ z>>�cSsg|]}|���qS�)�clone)�.0�argrr�//usr/lib64/python3.8/lib2to3/fixes/fix_print.py�
<listcomp>?sz&FixPrint.transform.<locals>.<listcomp>��sep�end�file)�get�replacerrrZchildren�len�parend_expr�matchrr�Leafr�
RIGHTSHIFTr�	add_kwargr	�repr)
�selfZnodeZresultsZ
bare_print�argsrrrZl_argsZn_stmtrrr�	transform%s:
�



zFixPrint.transformcCsNd|_t�|jjt|�t�tjd�|f�}|r@|�	t
��d|_|�	|�dS)Nr�=r)rrZNodeZsymsZargumentrr!r�EQUAL�appendr)r%Zl_nodesZs_kwdZn_exprZ
n_argumentrrrr#Ms
��zFixPrint.add_kwargN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr'r#rrrrr
s(r
N)�__doc__rrrZpgen2rrZ
fixer_utilrrrr	Zcompile_patternrZBaseFixr
rrrr�<module>s
�PK(:�ZV�ii%__pycache__/fix_intern.cpython-38.pycnu�[���U

e5dx�@s6dZddlmZddlmZmZGdd�dej�ZdS)z/Fixer for intern().

intern(s) -> sys.intern(s)�)�
fixer_base)�
ImportAndCall�touch_importc@s eZdZdZdZdZdd�ZdS)�	FixInternTZprez�
    power< 'intern'
           trailer< lpar='('
                    ( not(arglist | argument<any '=' any>) obj=any
                      | obj=arglist<(not argument<any '=' any>) any ','> )
                    rpar=')' >
           after=any*
    >
    cCsR|r2|d}|r2|j|jjkr2|jdjdkr2dSd}t|||�}tdd|�|S)N�obj�>�**�*)�sys�internr
)�typeZsymsZargumentZchildren�valuerr)�selfZnodeZresultsr�names�new�r�0/usr/lib64/python3.8/lib2to3/fixes/fix_intern.py�	transforms�zFixIntern.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�orderZPATTERNrrrrrr
s
rN)�__doc__�rZ
fixer_utilrrZBaseFixrrrrr�<module>sPK(:�ZCC�2��)__pycache__/fix_dict.cpython-38.opt-1.pycnu�[���U

e5d��@sjdZddlmZddlmZddlmZddlmZmZmZddlmZej	dhBZ
Gdd	�d	ej�Zd
S)ajFixer for dict methods.

d.keys() -> list(d.keys())
d.items() -> list(d.items())
d.values() -> list(d.values())

d.iterkeys() -> iter(d.keys())
d.iteritems() -> iter(d.items())
d.itervalues() -> iter(d.values())

d.viewkeys() -> d.keys()
d.viewitems() -> d.items()
d.viewvalues() -> d.values()

Except in certain very specific contexts: the iter() can be dropped
when the context is list(), sorted(), iter() or for...in; the list()
can be dropped when the context is list() or sorted() (but not iter()
or for...in!). Special contexts that apply to both: list(), sorted(), tuple()
set(), any(), all(), sum().

Note: iter(d.keys()) could be written as iter(d) but since the
original d.iterkeys() was also redundant we don't fix this.  And there
are (rare) contexts where it makes a difference (e.g. when passing it
as an argument to a function that introspects the argument).
�)�pytree)�patcomp)�
fixer_base)�Name�Call�Dot)�
fixer_util�iterc@s@eZdZdZdZdd�ZdZe�e�Z	dZ
e�e
�Zdd�Zd	S)
�FixDictTa
    power< head=any+
         trailer< '.' method=('keys'|'items'|'values'|
                              'iterkeys'|'iteritems'|'itervalues'|
                              'viewkeys'|'viewitems'|'viewvalues') >
         parens=trailer< '(' ')' >
         tail=any*
    >
    c
	Cs|d}|dd}|d}|j}|j}|�d�}|�d�}	|sD|	rP|dd�}dd	�|D�}d
d	�|D�}|o||�||�}
|t�|jt�t||j	d�g�|d�
�g}t�|j|�}|
s�|	s�d
|_	tt|r�dnd�|g�}|r�t�|j|g|�}|j	|_	|S)N�head�method��tailr	Zview�cSsg|]}|���qS���clone��.0�nrr�./usr/lib64/python3.8/lib2to3/fixes/fix_dict.py�
<listcomp>Asz%FixDict.transform.<locals>.<listcomp>cSsg|]}|���qSrrrrrrrBs)�prefixZparens��list)
�syms�value�
startswith�in_special_contextrZNodeZtrailerrrrrZpowerr)
�self�node�resultsrrrrZmethod_name�isiterZisviewZspecial�args�newrrr�	transform6s:


���
�zFixDict.transformz3power< func=NAME trailer< '(' node=any ')' > any* >zmfor_stmt< 'for' any 'in' node=any ':' any* >
            | comp_for< 'for' any 'in' node=any any* >
         cCs�|jdkrdSi}|jjdk	r^|j�|jj|�r^|d|kr^|rN|djtkS|djtjkS|sfdS|j�|j|�o�|d|kS)NFr �func)�parent�p1�matchr�iter_exemptr�consuming_calls�p2)rr r"r!rrrrZs
�
�zFixDict.in_special_contextN)
�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr%ZP1rZcompile_patternr(ZP2r,rrrrrr
)s


r
N)
�__doc__rrrrrrrrr+r*ZBaseFixr
rrrr�<module>sPK(:�Z�:��*__pycache__/fix_print.cpython-38.opt-2.pycnu�[���U

e5d�@shddlmZddlmZddlmZddlmZddlmZmZm	Z	m
Z
e�d�ZGdd�dej
�Zd	S)
�)�patcomp)�pytree)�token)�
fixer_base)�Name�Call�Comma�Stringz"atom< '(' [atom|STRING|NAME] ')' >c@s$eZdZdZdZdd�Zdd�ZdS)�FixPrintTzP
              simple_stmt< any* bare='print' any* > | print_stmt
              c
Cs`|�d�}|r,|�ttd�g|jd��dS|jdd�}t|�dkrXt�|d�rXdSd}}}|r�|dt	�kr�|dd�}d}|r�|dt
�tj
d�kr�|d��}|d	d�}d
d�|D�}|r�d|d_|dk	s�|dk	s�|dk	�rF|dk	�r|�|d
tt|���|dk	�r.|�|dtt|���|dk	�rF|�|d|�ttd�|�}	|j|	_|	S)NZbare�print)�prefix������ z>>�cSsg|]}|���qS�)�clone)�.0�argrr�//usr/lib64/python3.8/lib2to3/fixes/fix_print.py�
<listcomp>?sz&FixPrint.transform.<locals>.<listcomp>��sep�end�file)�get�replacerrrZchildren�len�parend_expr�matchrr�Leafr�
RIGHTSHIFTr�	add_kwargr	�repr)
�selfZnodeZresultsZ
bare_print�argsrrrZl_argsZn_stmtrrr�	transform%s:
�



zFixPrint.transformcCsNd|_t�|jjt|�t�tjd�|f�}|r@|�	t
��d|_|�	|�dS)Nr�=r)rrZNodeZsymsZargumentrr!r�EQUAL�appendr)r%Zl_nodesZs_kwdZn_exprZ
n_argumentrrrr#Ms
��zFixPrint.add_kwargN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr'r#rrrrr
s(r
N)rrrZpgen2rrZ
fixer_utilrrrr	Zcompile_patternrZBaseFixr
rrrr�<module>s�PK(:�Z=HF���2__pycache__/fix_standarderror.cpython-38.opt-2.pycnu�[���U

e5d��@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�FixStandarderrorTz-
              'StandardError'
              cCstd|jd�S)N�	Exception)�prefix)rr)�selfZnodeZresults�r�7/usr/lib64/python3.8/lib2to3/fixes/fix_standarderror.py�	transformszFixStandarderror.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrr	rsrN)�rZ
fixer_utilrZBaseFixrrrrr	�<module>sPK(:�Z
�5YY*__pycache__/fix_raise.cpython-38.opt-2.pycnu�[���U

e5dn�@sVddlmZddlmZddlmZddlmZmZmZm	Z	m
Z
Gdd�dej�ZdS)�)�pytree)�token)�
fixer_base)�Name�Call�Attr�ArgList�is_tuplec@seZdZdZdZdd�ZdS)�FixRaiseTzB
    raise_stmt< 'raise' exc=any [',' val=any [',' tb=any]] >
    cCsh|j}|d��}|jtjkr2d}|�||�dSt|�r^t|�rX|jdjd��}q:d|_d|kr�t	�
|jtd�|g�}|j|_|S|d��}t|�r�dd	�|jdd
�D�}nd|_|g}d|k�rB|d��}	d|	_|}
|jtj
ks�|jd
k�rt||�}
t|
td��t|	g�g}t	�
|jtd�g|�}|j|_|St	j
|jtd�t||�g|jd�SdS)N�excz+Python 3 does not support string exceptions��� �val�raisecSsg|]}|���qS�)�clone)�.0�crr�//usr/lib64/python3.8/lib2to3/fixes/fix_raise.py�
<listcomp>Dsz&FixRaise.transform.<locals>.<listcomp>�����tb�None�with_traceback)�prefix)�symsr�typer�STRINGZcannot_convertr	ZchildrenrrZNodeZ
raise_stmtr�NAME�valuerrrZsimple_stmt)�selfZnodeZresultsrr�msg�newr�argsr�eZwith_tbrrr�	transform&sB

�zFixRaise.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr'rrrrr
sr
N)
rrZpgen2rrZ
fixer_utilrrrrr	ZBaseFixr
rrrr�<module>sPK(:�Z|f?	?	+__pycache__/fix_except.cpython-38.opt-2.pycnu�[���U

e5d
�@sbddlmZddlmZddlmZddlmZmZmZm	Z	m
Z
mZdd�ZGdd�dej
�Zd	S)
�)�pytree)�token)�
fixer_base)�Assign�Attr�Name�is_tuple�is_list�symsccsDt|�D]6\}}|jtjkr|jdjdkr|||dfVqdS)N��exceptr)�	enumerate�typer
�
except_clause�children�value)Znodes�i�n�r�0/usr/lib64/python3.8/lib2to3/fixes/fix_except.py�find_exceptssrc@seZdZdZdZdd�ZdS)�	FixExceptTa1
    try_stmt< 'try' ':' (simple_stmt | suite)
                  cleanup=(except_clause ':' (simple_stmt | suite))+
                  tail=(['except' ':' (simple_stmt | suite)]
                        ['else' ':' (simple_stmt | suite)]
                        ['finally' ':' (simple_stmt | suite)]) >
    cCsx|j}dd�|dD�}dd�|dD�}t|�D�]\}}t|j�dkr2|jdd�\}}	}
|	�tdd	d
��|
jtjk�r8t|�	�d	d
�}|
�
�}d|_|
�|�|�
�}|j}
t|
�D]\}}t
|tj�r�q�q�t|
�s�t|
�r�t|t|td���}n
t||�}t|
d|��D]}|�d
|��q|�||�q2|
jdkr2d	|
_q2dd�|jdd�D�||}t�|j|�S)NcSsg|]}|���qSr��clone)�.0rrrr�
<listcomp>2sz'FixExcept.transform.<locals>.<listcomp>�tailcSsg|]}|���qSrr)rZchrrrr4sZcleanup���as� )�prefix��argsrcSsg|]}|���qSrr)r�crrrr\s�)r
r�lenr�replacerrr�NAME�new_namerr!r
�
isinstancerZNoderr	rr�reversedZinsert_child)�selfZnodeZresultsr
rZtry_cleanuprZe_suite�EZcomma�NZnew_N�targetZsuite_stmtsrZstmtZassignZchildrrrr�	transform/s6


 zFixExcept.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr0rrrrr$srN)r"rZpgen2rrZ
fixer_utilrrrrr	r
rZBaseFixrrrrr�<module>s
 PK(:�Zn�l��(__pycache__/fix_map.cpython-38.opt-2.pycnu�[���U

e5d8�@sbddlmZddlmZddlmZmZmZmZm	Z	ddl
mZddl
mZGdd�dej�ZdS)	�)�token)�
fixer_base)�Name�ArgList�Call�ListComp�in_special_context)�python_symbols)�Nodec@s eZdZdZdZdZdd�ZdS)�FixMapTaL
    map_none=power<
        'map'
        trailer< '(' arglist< 'None' ',' arg=any [','] > ')' >
        [extra_trailers=trailer*]
    >
    |
    map_lambda=power<
        'map'
        trailer<
            '('
            arglist<
                lambdef< 'lambda'
                         (fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any
                >
                ','
                it=any
            >
            ')'
        >
        [extra_trailers=trailer*]
    >
    |
    power<
        'map' args=trailer< '(' [any] ')' >
        [extra_trailers=trailer*]
    >
    zfuture_builtins.mapcCs�|�|�rdSg}d|kr6|dD]}|�|���q"|jjtjkrr|�|d�|��}d|_t	t
d�|g�}�n&d|kr�t|d��|d��|d���}ttj
|g|dd	�}n�d
|kr�|d��}d|_n�d|k�rf|d}|jtjk�rH|jd
jtjk�rH|jd
jdjtjk�rH|jd
jdjdk�rH|�|d�dSttj
t
d�|��g�}d|_t|��rtdSttj
t
d�t|g�g|�}d|_|j|_|S)NZextra_trailerszYou should use a for loop here��listZ
map_lambdaZxp�fp�it)�prefixZmap_none�arg�args���Nonezjcannot convert map(None, ...) with multiple arguments because map() now truncates to the shortest sequence�map)Zshould_skip�appendZclone�parent�type�symsZsimple_stmtZwarningrrrrr
ZpowerZtrailerZchildrenZarglistr�NAME�valuerr)�selfZnodeZresultsZtrailers�t�newr�r �-/usr/lib64/python3.8/lib2to3/fixes/fix_map.py�	transform@sN


�
���
zFixMap.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onr"r r r r!rsrN)Zpgen2rrrZ
fixer_utilrrrrrZpygramr	rZpytreer
ZConditionalFixrr r r r!�<module>s
PK(:�Z�{.Nii$__pycache__/fix_paren.cpython-38.pycnu�[���U

e5d��@s6dZddlmZddlmZmZGdd�dej�ZdS)zuFixer that addes parentheses where they are required

This converts ``[x for x in 1, 2]`` to ``[x for x in (1, 2)]``.�)�
fixer_base)�LParen�RParenc@seZdZdZdZdd�ZdS)�FixParenTa
        atom< ('[' | '(')
            (listmaker< any
                comp_for<
                    'for' NAME 'in'
                    target=testlist_safe< any (',' any)+ [',']
                     >
                    [any]
                >
            >
            |
            testlist_gexp< any
                comp_for<
                    'for' NAME 'in'
                    target=testlist_safe< any (',' any)+ [',']
                     >
                    [any]
                >
            >)
        (']' | ')') >
    cCs8|d}t�}|j|_d|_|�d|�|�t��dS)N�target��)r�prefixZinsert_childZappend_childr)�selfZnodeZresultsrZlparen�r�//usr/lib64/python3.8/lib2to3/fixes/fix_paren.py�	transform%szFixParen.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrrrsrN)�__doc__rrZ
fixer_utilrrZBaseFixrrrrr�<module>sPK(:�Z�?M���(__pycache__/fix_metaclass.cpython-38.pycnu�[���U

e5d �@svdZddlmZddlmZddlmZmZmZdd�Z	dd�Z
d	d
�Zdd�Zd
d�Z
dd�ZGdd�dej�ZdS)a�Fixer for __metaclass__ = X -> (metaclass=X) methods.

   The various forms of classef (inherits nothing, inherits once, inherits
   many) don't parse the same in the CST so we look at ALL classes for
   a __metaclass__ and if we find one normalize the inherits to all be
   an arglist.

   For one-liner classes ('class X: pass') there is no indent/dedent so
   we normalize those into having a suite.

   Moving the __metaclass__ into the classdef can also cause the class
   body to be empty so there is some special casing for that as well.

   This fixer also tries very hard to keep original indenting and spacing
   in all those corner cases.

�)�
fixer_base)�token)�syms�Node�LeafcCsz|jD]n}|jtjkr"t|�S|jtjkr|jr|jd}|jtjkr|jr|jd}t|t�r|j	dkrdSqdS)z� we have to check the cls_node without changing it.
        There are two possibilities:
          1)  clsdef => suite => simple_stmt => expr_stmt => Leaf('__meta')
          2)  clsdef => simple_stmt => expr_stmt => Leaf('__meta')
    ��
__metaclass__TF)
�children�typer�suite�
has_metaclass�simple_stmt�	expr_stmt�
isinstancer�value)�parent�node�	expr_nodeZ	left_side�r�3/usr/lib64/python3.8/lib2to3/fixes/fix_metaclass.pyrs



�rcCs�|jD]}|jtjkrdSqt|j�D]\}}|jtjkr(qJq(td��ttjg�}|j|dd�r�|j|d}|�	|�
��|��qV|�	|�|}dS)zf one-line classes don't get a suite in the parse tree so we add
        one to normalize the tree
    NzNo class suite and no ':'!�)r	r
rr�	enumerater�COLON�
ValueErrorr�append_child�clone�remove)�cls_noder�ir�	move_noderrr�fixup_parse_tree-s


r c
Cs�t|j�D]\}}|jtjkr
q(q
dS|��ttjg�}ttj	|g�}|j|d�rz|j|}|�
|���|��qJ|�||�|jdjd}|jdjd}	|	j
|_
dS)z� if there is a semi-colon all the parts count as part of the same
        simple_stmt.  We just want the __metaclass__ part so we move
        everything after the semi-colon into its own simple_stmt node
    Nr)rr	r
r�SEMIrrrrr
rr�insert_child�prefix)
rrZ	stmt_nodeZsemi_indrZnew_exprZnew_stmtrZ	new_leaf1Z	old_leaf1rrr�fixup_simple_stmtGs

r$cCs*|jr&|jdjtjkr&|jd��dS)N���)r	r
r�NEWLINEr)rrrr�remove_trailing_newline_sr'ccs�|jD]}|jtjkrq$qtd��tt|j��D]t\}}|jtjkr2|jr2|jd}|jtjkr2|jr2|jd}t	|t
�r2|jdkr2t|||�t
|�|||fVq2dS)NzNo class suite!rr)r	r
rrr�listrr
rrrrr$r')rrrZsimple_noderZ	left_noderrr�
find_metasds



�r)cCsz|jddd�}|r,|��}|jtjkrq,q|rv|��}t|t�r^|jtjkr^|jrZd|_dS|�	|jddd��q,dS)z� If an INDENT is followed by a thing with a prefix then nuke the prefix
        Otherwise we get in trouble when removing __metaclass__ at suite start
    Nr%�)
r	�popr
r�INDENTrr�DEDENTr#�extend)rZkidsrrrr�fixup_indent{sr/c@seZdZdZdZdd�ZdS)�FixMetaclassTz
    classdef<any*>
    cCsJt|�sdSt|�d}t|�D]\}}}|}|��q |jdj}t|j�dkr�|jdjtjkrp|jd}n(|jd�	�}	t
tj|	g�}|�d|�n�t|j�dkr�t
tjg�}|�d|�nZt|j�dk�rt
tjg�}|�dt
tjd��|�d|�|�dt
tjd��ntd	��|jdjd}
d
|
_|
j}|j�rZ|�t
tjd��d|
_nd
|
_|jd}|jtjk�s|t�d
|jd_d
|jd_|�|�t|�|j�s�|��t
|d�}
||
_|�|
�|�t
tjd��nbt|j�dk�rF|jdjtjk�rF|jdjtjk�rFt
|d�}
|�d|
�|�dt
tjd��dS)Nr����r�)�(zUnexpected class definition�	metaclass�,� r*r�pass�
���r%)rr r)rr	r
�lenr�arglistrrZ	set_childr"rr�RPAR�LPARrrr#r�COMMAr�AssertionErrorr/r&r,r-)�selfrZresultsZlast_metaclassrrZstmtZ	text_typer>rZmeta_txtZorig_meta_prefixrZ	pass_leafrrr�	transform�sd




��
zFixMetaclass.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrDrrrrr0�sr0N)�__doc__r*rZpygramrZ
fixer_utilrrrrr r$r'r)r/ZBaseFixr0rrrr�<module>sPK(:�Z(���	�	%__pycache__/fix_xrange.cpython-38.pycnu�[���U

e5d�
�@sFdZddlmZddlmZmZmZddlmZGdd�dej�Z	dS)z/Fixer that changes xrange(...) into range(...).�)�
fixer_base)�Name�Call�consuming_calls)�patcompcsheZdZdZdZ�fdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
Z
e�e
�Z
dZe�e�Zdd�Z�ZS)�	FixXrangeTz�
              power<
                 (name='range'|name='xrange') trailer< '(' args=any ')' >
              rest=any* >
              cstt|��||�t�|_dS�N)�superr�
start_tree�set�transformed_xranges��selfZtree�filename��	__class__��0/usr/lib64/python3.8/lib2to3/fixes/fix_xrange.pyr
szFixXrange.start_treecCs
d|_dSr)rr
rrr�finish_treeszFixXrange.finish_treecCsD|d}|jdkr|�||�S|jdkr4|�||�Stt|���dS)N�nameZxrange�range)�value�transform_xrange�transform_range�
ValueError�repr�r�node�resultsrrrr�	transforms

zFixXrange.transformcCs0|d}|�td|jd��|j�t|��dS)Nrr��prefix)�replacerr!r�add�idrrrrr$szFixXrange.transform_xrangecCsft|�|jkrb|�|�sbttd�|d��g�}ttd�|g|jd�}|dD]}|�|�qN|SdS)Nr�args�listr �rest)r$r�in_special_contextrrZcloner!Zappend_child)rrrZ
range_callZ	list_call�nrrrr*s��zFixXrange.transform_rangez3power< func=NAME trailer< '(' node=any ')' > any* >z�for_stmt< 'for' any 'in' node=any ':' any* >
            | comp_for< 'for' any 'in' node=any any* >
            | comparison< any 'in' node=any any*>
         cCsf|jdkrdSi}|jjdk	rJ|j�|jj|�rJ|d|krJ|djtkS|j�|j|�od|d|kS)NFr�func)�parent�p1�matchrr�p2)rrrrrrr(?s
�
�zFixXrange.in_special_context)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrrZP1rZcompile_patternr,ZP2r.r(�
__classcell__rrrrrs	

rN)
�__doc__�rZ
fixer_utilrrrrZBaseFixrrrrr�<module>sPK(:�Z��fh-__pycache__/fix_imports2.cpython-38.opt-1.pycnu�[���U

e5d!�@s0dZddlmZddd�ZGdd�dej�ZdS)zTFix incompatible imports and module references that must be fixed after
fix_imports.�)�fix_importsZdbm)ZwhichdbZanydbmc@seZdZdZeZdS)�FixImports2�N)�__name__�
__module__�__qualname__Z	run_order�MAPPING�mapping�r
r
�2/usr/lib64/python3.8/lib2to3/fixes/fix_imports2.pyrsrN)�__doc__�rrZ
FixImportsrr
r
r
r�<module>s
�PK(:�Z���-__pycache__/fix_exitfunc.cpython-38.opt-1.pycnu�[���U

e5d�	�@sJdZddlmZmZddlmZmZmZmZm	Z	m
Z
Gdd�dej�ZdS)z7
Convert use of sys.exitfunc to use the atexit module.
�)�pytree�
fixer_base)�Name�Attr�Call�Comma�Newline�symscs<eZdZdZdZdZ�fdd�Z�fdd�Zdd�Z�Z	S)	�FixExitfuncTa�
              (
                  sys_import=import_name<'import'
                      ('sys'
                      |
                      dotted_as_names< (any ',')* 'sys' (',' any)* >
                      )
                  >
              |
                  expr_stmt<
                      power< 'sys' trailer< '.' 'exitfunc' > >
                  '=' func=any >
              )
              cstt|�j|�dS�N)�superr
�__init__)�self�args��	__class__��2/usr/lib64/python3.8/lib2to3/fixes/fix_exitfunc.pyr
szFixExitfunc.__init__cstt|��||�d|_dSr)rr
�
start_tree�
sys_import)rZtree�filenamerrrr!szFixExitfunc.start_treecCs&d|kr |jdkr|d|_dS|d��}d|_t�tjttd�td���}t	||g|j�}|�
|�|jdkr�|�|d�dS|jjd}|j
tjkr�|�t��|�tdd��nj|jj}|j�|j�}|j}	t�tjtd	�tdd�g�}
t�tj|
g�}|�|dt��|�|d
|�dS)Nr�func��atexit�registerzKCan't find sys import; Please add an atexit import at the top of your file.�� �import�)rZclone�prefixrZNoder	Zpowerrrr�replaceZwarningZchildren�typeZdotted_as_namesZappend_childr�parent�indexZimport_nameZsimple_stmtZinsert_childr)rZnodeZresultsrrZcall�namesZcontaining_stmtZpositionZstmt_containerZ
new_import�newrrr�	transform%s6

�

�zFixExitfunc.transform)
�__name__�
__module__�__qualname__Zkeep_line_orderZ
BM_compatibleZPATTERNr
rr&�
__classcell__rrrrr
sr
N)
�__doc__Zlib2to3rrZlib2to3.fixer_utilrrrrrr	ZBaseFixr
rrrr�<module>s PK(:�Zؠ�˥�0__pycache__/fix_methodattrs.cpython-38.opt-1.pycnu�[���U

e5d^�@s>dZddlmZddlmZdddd�ZGdd	�d	ej�Zd
S)z;Fix bound method attributes (method.im_? -> method.__?__).
�)�
fixer_base)�Name�__func__�__self__z__self__.__class__)Zim_funcZim_selfZim_classc@seZdZdZdZdd�ZdS)�FixMethodattrsTzU
    power< any+ trailer< '.' attr=('im_func' | 'im_self' | 'im_class') > any* >
    cCs.|dd}t|j}|�t||jd��dS)N�attr�)�prefix)�MAP�value�replacerr	)�selfZnodeZresultsr�new�r�5/usr/lib64/python3.8/lib2to3/fixes/fix_methodattrs.py�	transforms
zFixMethodattrs.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)�__doc__�rZ
fixer_utilrr
ZBaseFixrrrrr�<module>s�PK(:�Z~��uu+__pycache__/fix_reload.cpython-38.opt-1.pycnu�[���U

e5d9�@s6dZddlmZddlmZmZGdd�dej�ZdS)z5Fixer for reload().

reload(s) -> importlib.reload(s)�)�
fixer_base)�
ImportAndCall�touch_importc@s eZdZdZdZdZdd�ZdS)�	FixReloadTZprez�
    power< 'reload'
           trailer< lpar='('
                    ( not(arglist | argument<any '=' any>) obj=any
                      | obj=arglist<(not argument<any '=' any>) any ','> )
                    rpar=')' >
           after=any*
    >
    cCsR|r2|d}|r2|j|jjkr2|jdjdkr2dSd}t|||�}tdd|�|S)N�obj�>�**�*)�	importlib�reloadr
)�typeZsymsZargumentZchildren�valuerr)�selfZnodeZresultsr�names�new�r�0/usr/lib64/python3.8/lib2to3/fixes/fix_reload.py�	transforms�zFixReload.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�orderZPATTERNrrrrrr
s
rN)�__doc__�rZ
fixer_utilrrZBaseFixrrrrr�<module>sPK(:�Z(���	�	+__pycache__/fix_xrange.cpython-38.opt-1.pycnu�[���U

e5d�
�@sFdZddlmZddlmZmZmZddlmZGdd�dej�Z	dS)z/Fixer that changes xrange(...) into range(...).�)�
fixer_base)�Name�Call�consuming_calls)�patcompcsheZdZdZdZ�fdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
Z
e�e
�Z
dZe�e�Zdd�Z�ZS)�	FixXrangeTz�
              power<
                 (name='range'|name='xrange') trailer< '(' args=any ')' >
              rest=any* >
              cstt|��||�t�|_dS�N)�superr�
start_tree�set�transformed_xranges��selfZtree�filename��	__class__��0/usr/lib64/python3.8/lib2to3/fixes/fix_xrange.pyr
szFixXrange.start_treecCs
d|_dSr)rr
rrr�finish_treeszFixXrange.finish_treecCsD|d}|jdkr|�||�S|jdkr4|�||�Stt|���dS)N�nameZxrange�range)�value�transform_xrange�transform_range�
ValueError�repr�r�node�resultsrrrr�	transforms

zFixXrange.transformcCs0|d}|�td|jd��|j�t|��dS)Nrr��prefix)�replacerr!r�add�idrrrrr$szFixXrange.transform_xrangecCsft|�|jkrb|�|�sbttd�|d��g�}ttd�|g|jd�}|dD]}|�|�qN|SdS)Nr�args�listr �rest)r$r�in_special_contextrrZcloner!Zappend_child)rrrZ
range_callZ	list_call�nrrrr*s��zFixXrange.transform_rangez3power< func=NAME trailer< '(' node=any ')' > any* >z�for_stmt< 'for' any 'in' node=any ':' any* >
            | comp_for< 'for' any 'in' node=any any* >
            | comparison< any 'in' node=any any*>
         cCsf|jdkrdSi}|jjdk	rJ|j�|jj|�rJ|d|krJ|djtkS|j�|j|�od|d|kS)NFr�func)�parent�p1�matchrr�p2)rrrrrrr(?s
�
�zFixXrange.in_special_context)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrrZP1rZcompile_patternr,ZP2r.r(�
__classcell__rrrrrs	

rN)
�__doc__�rZ
fixer_utilrrrrZBaseFixrrrrr�<module>sPK(:�Z#|����)__pycache__/fix_next.cpython-38.opt-1.pycnu�[���U

e5df�@sndZddlmZddlmZddlmZddlm	Z	m
Z
mZdZGdd�dej
�Zd	d
�Zdd�Zd
d�ZdS)z.Fixer for it.next() -> next(it), per PEP 3114.�)�token)�python_symbols)�
fixer_base)�Name�Call�find_bindingz;Calls to builtin next() possibly shadowed by global bindingcs0eZdZdZdZdZ�fdd�Zdd�Z�ZS)�FixNextTa�
    power< base=any+ trailer< '.' attr='next' > trailer< '(' ')' > >
    |
    power< head=any+ trailer< '.' attr='next' > not trailer< '(' ')' > >
    |
    classdef< 'class' any+ ':'
              suite< any*
                     funcdef< 'def'
                              name='next'
                              parameters< '(' NAME ')' > any+ >
                     any* > >
    |
    global=global_stmt< 'global' any* 'next' any* >
    Zprecs>tt|��||�td|�}|r4|�|t�d|_nd|_dS)N�nextTF)�superr�
start_treer�warning�bind_warning�
shadowed_next)�selfZtree�filename�n��	__class__��./usr/lib64/python3.8/lib2to3/fixes/fix_next.pyr$s
zFixNext.start_treecCs�|�d�}|�d�}|�d�}|rr|jr>|�td|jd��q�dd�|D�}d|d	_|�ttd
|jd�|��n�|r�td|jd�}|�|�nj|r�t|�r�|d}d�dd�|D����d
kr�|�	|t
�dS|�td��nd|kr�|�	|t
�d|_dS)N�base�attr�name�__next__)�prefixcSsg|]}|���qSr)Zclone��.0rrrr�
<listcomp>9sz%FixNext.transform.<locals>.<listcomp>��r	�headcSsg|]}t|��qSr)�strrrrrrEsZ__builtin__�globalT)�getr�replacerrr�is_assign_target�join�striprr
)r�nodeZresultsrrrrr rrr�	transform.s,



zFixNext.transform)	�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERN�orderrr)�
__classcell__rrrrrs

rcCsFt|�}|dkrdS|jD]&}|jtjkr0dSt||�rdSqdS)NFT)�find_assign�children�typer�EQUAL�
is_subtree)r(ZassignZchildrrrr%Qs

r%cCs4|jtjkr|S|jtjks&|jdkr*dSt|j�S�N)r1�symsZ	expr_stmtZsimple_stmt�parentr/�r(rrrr/]s
r/cs$|�krdSt�fdd�|jD��S)NTc3s|]}t|��VqdSr4)r3)r�cr7rr�	<genexpr>gszis_subtree.<locals>.<genexpr>)�anyr0)�rootr(rr7rr3dsr3N)�__doc__Zpgen2rZpygramrr5rrZ
fixer_utilrrrr
ZBaseFixrr%r/r3rrrr�<module>s@PK(:�Z��܎||)__pycache__/fix_long.cpython-38.opt-2.pycnu�[���U

e5d��@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�is_probably_builtinc@seZdZdZdZdd�ZdS)�FixLongTz'long'cCst|�rd|_|��dS)N�int)r�valueZchanged)�selfZnodeZresults�r�./usr/lib64/python3.8/lib2to3/fixes/fix_long.py�	transformszFixLong.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrr	rsrN)Zlib2to3rZlib2to3.fixer_utilrZBaseFixrrrrr	�<module>sPK(:�Z�OuC**(__pycache__/fix_zip.cpython-38.opt-1.pycnu�[���U

e5d	�@sRdZddlmZddlmZddlmZddlm	Z	m
Z
mZGdd�dej�Z
dS)	a7
Fixer that changes zip(seq0, seq1, ...) into list(zip(seq0, seq1, ...)
unless there exists a 'from future_builtins import zip' statement in the
top-level namespace.

We avoid the transformation if the zip() call is directly contained in
iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or for V in <>:.
�)�
fixer_base)�Node)�python_symbols)�Name�ArgList�in_special_contextc@s eZdZdZdZdZdd�ZdS)�FixZipTzN
    power< 'zip' args=trailer< '(' [any] ')' > [trailers=trailer*]
    >
    zfuture_builtins.zipcCs�|�|�rdSt|�rdS|d��}d|_g}d|krZdd�|dD�}|D]
}d|_qNttjtd�|gdd�}ttjtd�t|g�g|�}|j|_|S)	N�args��trailerscSsg|]}|���qS�)�clone)�.0�nrr�-/usr/lib64/python3.8/lib2to3/fixes/fix_zip.py�
<listcomp>'sz$FixZip.transform.<locals>.<listcomp>�zip)�prefix�list)	Zshould_skiprr
rr�symsZpowerrr)�selfZnodeZresultsr	rr�newrrr�	transforms
zFixZip.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onrrrrrrsrN)�__doc__r
rZpytreerZpygramrrZ
fixer_utilrrrZConditionalFixrrrrr�<module>s

PK(:�Z]m���+__pycache__/fix_reduce.cpython-38.opt-2.pycnu�[���U

e5dE�@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base��touch_importc@s eZdZdZdZdZdd�ZdS)�	FixReduceTZpreai
    power< 'reduce'
        trailer< '('
            arglist< (
                (not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any) |
                (not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any)
            ) >
        ')' >
    >
    cCstdd|�dS)N�	functools�reducer)�selfZnodeZresults�r	�0/usr/lib64/python3.8/lib2to3/fixes/fix_reduce.py�	transform"szFixReduce.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�orderZPATTERNrr	r	r	r
rsrN)Zlib2to3rZlib2to3.fixer_utilrZBaseFixrr	r	r	r
�<module>
sPK(:�ZL�\��,__pycache__/fix_renames.cpython-38.opt-2.pycnu�[���U

e5d��@sRddlmZddlmZmZdddiiZiZdd�Zdd	�ZGd
d�dej	�Z
dS)
�)�
fixer_base)�Name�
attr_chain�sysZmaxint�maxsizecCsdd�tt|��dS)N�(�|�))�join�map�repr)�members�r�1/usr/lib64/python3.8/lib2to3/fixes/fix_renames.py�
alternatessrccsZtt���D]H\}}t|���D]2\}}|t||f<d|||fVd||fVq qdS)Nz�
                  import_from< 'from' module_name=%r 'import'
                      ( attr_name=%r | import_as_name< attr_name=%r 'as' any >) >
                  z^
                  power< module_name=%r trailer< '.' attr_name=%r > any* >
                  )�list�MAPPING�items�LOOKUP)�module�replaceZold_attr�new_attrrrr�
build_patterns��rcs8eZdZdZd�e��ZdZ�fdd�Zdd�Z	�Z
S)�
FixRenamesTrZprecs@tt|�j��|�}|r<t�fdd�t|d�D��r8dS|SdS)Nc3s|]}�|�VqdS)Nr)�.0�obj��matchrr�	<genexpr>5sz#FixRenames.match.<locals>.<genexpr>�parentF)�superrr�anyr)�self�node�results��	__class__rrr1szFixRenames.matchcCsD|�d�}|�d�}|r@|r@t|j|jf}|�t||jd��dS)NZmodule_name�	attr_name)�prefix)�getr�valuerrr()r"r#r$Zmod_namer'rrrr�	transform>s


zFixRenames.transform)�__name__�
__module__�__qualname__Z
BM_compatibler
rZPATTERN�orderrr+�
__classcell__rrr%rr*s

rN)�rZ
fixer_utilrrrrrrZBaseFixrrrrr�<module>
sPK(:�Z���+__pycache__/fix_idioms.cpython-38.opt-1.pycnu�[���U

e5d�@sNdZddlmZddlmZmZmZmZmZm	Z	dZ
dZGdd�dej�Z
dS)	a�Adjust some old Python 2 idioms to their modern counterparts.

* Change some type comparisons to isinstance() calls:
    type(x) == T -> isinstance(x, T)
    type(x) is T -> isinstance(x, T)
    type(x) != T -> not isinstance(x, T)
    type(x) is not T -> not isinstance(x, T)

* Change "while 1:" into "while True:".

* Change both

    v = list(EXPR)
    v.sort()
    foo(v)

and the more general

    v = EXPR
    v.sort()
    foo(v)

into

    v = sorted(EXPR)
    foo(v)
�)�
fixer_base)�Call�Comma�Name�Node�	BlankLine�symsz0(n='!=' | '==' | 'is' | n=comp_op< 'is' 'not' >)z(power< 'type' trailer< '(' x=any ')' > >csPeZdZdZdeeeefZ�fdd�Zdd�Zdd�Z	d	d
�Z
dd�Z�ZS)
�	FixIdiomsTa�
        isinstance=comparison< %s %s T=any >
        |
        isinstance=comparison< T=any %s %s >
        |
        while_stmt< 'while' while='1' ':' any+ >
        |
        sorted=any<
            any*
            simple_stmt<
              expr_stmt< id1=any '='
                         power< list='list' trailer< '(' (not arglist<any+>) any ')' > >
              >
              '\n'
            >
            sort=
            simple_stmt<
              power< id2=any
                     trailer< '.' 'sort' > trailer< '(' ')' >
              >
              '\n'
            >
            next=any*
        >
        |
        sorted=any<
            any*
            simple_stmt< expr_stmt< id1=any '=' expr=any > '\n' >
            sort=
            simple_stmt<
              power< id2=any
                     trailer< '.' 'sort' > trailer< '(' ')' >
              >
              '\n'
            >
            next=any*
        >
    cs8tt|��|�}|r4d|kr4|d|dkr0|SdS|S)N�sortedZid1Zid2)�superr	�match)�self�node�r��	__class__��0/usr/lib64/python3.8/lib2to3/fixes/fix_idioms.pyrOszFixIdioms.matchcCsHd|kr|�||�Sd|kr(|�||�Sd|kr<|�||�Std��dS)N�
isinstance�whiler
z
Invalid match)�transform_isinstance�transform_while�transform_sort�RuntimeError)r
r�resultsrrr�	transformZszFixIdioms.transformcCsh|d��}|d��}d|_d|_ttd�|t�|g�}d|kr\d|_ttjtd�|g�}|j|_|S)N�x�T�� r�n�not)�clone�prefixrrrrrZnot_test)r
rrrrZtestrrrrdszFixIdioms.transform_isinstancecCs |d}|�td|jd��dS)Nr�True�r#)�replacerr#)r
rrZonerrrrpszFixIdioms.transform_whilecCs�|d}|d}|�d�}|�d�}|r>|�td|jd��n8|rn|��}d|_|�ttd�|g|jd��ntd��|��|j}d	|kr�|r�|�d	�d
|d
jf}	d	�	|	�|d
_n"t
�}
|j�|
�|�d	�d
|
_dS)N�sort�next�list�exprr
r%rzshould not have reached here�
�)
�getr&rr#r"rr�remove�
rpartition�joinr�parentZappend_child)r
rrZ	sort_stmtZ	next_stmtZ	list_callZsimple_expr�newZbtwnZprefix_linesZend_linerrrrts,

�
zFixIdioms.transform_sort)
�__name__�
__module__�__qualname__Zexplicit�TYPE�CMPZPATTERNrrrrr�
__classcell__rrrrr	%s%
�'
r	N)�__doc__rrZ
fixer_utilrrrrrrr7r6ZBaseFixr	rrrr�<module>s
 PK(:�Z�O�'

)__pycache__/fix_isinstance.cpython-38.pycnu�[���U

e5dH�@s2dZddlmZddlmZGdd�dej�ZdS)a,Fixer that cleans up a tuple argument to isinstance after the tokens
in it were fixed.  This is mainly used to remove double occurrences of
tokens as a leftover of the long -> int / unicode -> str conversion.

eg.  isinstance(x, (int, long)) -> isinstance(x, (int, int))
       -> isinstance(x, int)
�)�
fixer_base)�tokenc@s eZdZdZdZdZdd�ZdS)�
FixIsinstanceTz�
    power<
        'isinstance'
        trailer< '(' arglist< any ',' atom< '('
            args=testlist_gexp< any+ >
        ')' > > ')' >
    >
    �cCs�t�}|d}|j}g}t|�}|D]p\}}	|	jtjkrr|	j|krr|t|�dkr�||djtjkr�t	|�q$q$|�
|	�|	jtjkr$|�|	j�q$|r�|djtjkr�|d=t|�dkr�|j}
|
j
|d_
|
�|d�n||dd�<|��dS)N�args�����)�setZchildren�	enumerate�typer�NAME�value�len�COMMA�next�append�add�parent�prefix�replaceZchanged)�selfZnodeZresultsZnames_insertedZtestlistrZnew_args�iterator�idx�argZatom�r�4/usr/lib64/python3.8/lib2to3/fixes/fix_isinstance.py�	transforms*$
zFixIsinstance.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZ	run_orderrrrrrrs	rN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK(:�Z�	�'��-__pycache__/fix_operator.cpython-38.opt-2.pycnu�[���U

e5db
�@sJddlZddlmZddlmZmZmZmZdd�Z	Gdd�dej
�ZdS)�N)�
fixer_base)�Call�Name�String�touch_importcs�fdd�}|S)Ncs
�|_|S�N)�
invocation)�f��s��2/usr/lib64/python3.8/lib2to3/fixes/fix_operator.py�decszinvocation.<locals>.decr)rrrr
r
rsrc@s�eZdZdZdZdZdZdeeed�Zdd�Z	e
d	�d
d��Ze
d�d
d��Ze
d�dd��Z
e
d�dd��Ze
d�dd��Ze
d�dd��Ze
d�dd��Zdd�Zd d!�Zd"d#�Zd$S)%�FixOperatorTZprez�
              method=('isCallable'|'sequenceIncludes'
                     |'isSequenceType'|'isMappingType'|'isNumberType'
                     |'repeat'|'irepeat')
              z'(' obj=any ')'z�
              power< module='operator'
                trailer< '.' %(methods)s > trailer< %(obj)s > >
              |
              power< %(methods)s trailer< %(obj)s > >
              )�methods�objcCs"|�||�}|dk	r|||�SdSr)�
_check_method)�self�node�results�methodrrr
�	transform+szFixOperator.transformzoperator.contains(%s)cCs|�||d�S)N�contains��_handle_rename�rrrrrr
�_sequenceIncludes0szFixOperator._sequenceIncludeszcallable(%s)cCs"|d}ttd�|��g|jd�S)Nr�callable��prefix)rr�cloner)rrrrrrr
�_isCallable4szFixOperator._isCallablezoperator.mul(%s)cCs|�||d�S)N�mulrrrrr
�_repeat9szFixOperator._repeatzoperator.imul(%s)cCs|�||d�S)N�imulrrrrr
�_irepeat=szFixOperator._irepeatz(isinstance(%s, collections.abc.Sequence)cCs|�||dd�S)N�collections.abc�Sequence��_handle_type2abcrrrr
�_isSequenceTypeAszFixOperator._isSequenceTypez'isinstance(%s, collections.abc.Mapping)cCs|�||dd�S)Nr&�Mappingr(rrrr
�_isMappingTypeEszFixOperator._isMappingTypezisinstance(%s, numbers.Number)cCs|�||dd�S)NZnumbers�Numberr(rrrr
�
_isNumberTypeIszFixOperator._isNumberTypecCs|dd}||_|��dS)Nrr)�valueZchanged)rrr�namerrrr
rMszFixOperator._handle_renamecCsFtd||�|d}|��tdd�||g��g}ttd�||jd�S)Nrz, �.�
isinstancer)rr r�joinrrr)rrr�module�abcr�argsrrr
r)RszFixOperator._handle_type2abccCs^t|d|ddj�}t|tjj�rZd|kr2|St|d�f}|j|}|�|d|�dS)N�_rrr4rzYou should use '%s' here.)	�getattrr/r2�collectionsr5�Callable�strrZwarning)rrrr�subZinvocation_strrrr
rXs
zFixOperator._check_methodN)�__name__�
__module__�__qualname__Z
BM_compatible�orderrr�dictZPATTERNrrrr!r#r%r*r,r.rr)rrrrr
rs2
�






r)Zcollections.abcr9Zlib2to3rZlib2to3.fixer_utilrrrrrZBaseFixrrrrr
�<module>sPK(:�Z�߽0��6__pycache__/fix_itertools_imports.cpython-38.opt-1.pycnu�[���U

e5d&�@s:dZddlmZddlmZmZmZGdd�dej�ZdS)zA Fixer for imports of itertools.(imap|ifilter|izip|ifilterfalse) �)�
fixer_base)�	BlankLine�syms�tokenc@s"eZdZdZde�Zdd�ZdS)�FixItertoolsImportsTzT
              import_from< 'from' 'itertools' 'import' imports=any >
              cCsZ|d}|jtjks|js"|g}n|j}|ddd�D]|}|jtjkrR|j}|}n|jtjkrddS|jd}|j}|dkr�d|_|��q6|dkr6|�	�|ddkr�dnd	|_q6|jdd�p�|g}d
}	|D]&}|	r�|jtj
kr�|��q�|	d
N}	q�|�r|djtj
k�r|����q�|j�s4t|dd��r@|j
dk�rV|j}
t�}|
|_|SdS)
N�imports�r)ZimapZizipZifilter)ZifilterfalseZizip_longest��f�filterfalse�zip_longestT����value)�typerZimport_as_name�childrenr�NAMEr�STAR�removeZchanged�COMMA�pop�getattr�parent�prefixr)�selfZnodeZresultsrrZchild�memberZ	name_node�member_nameZremove_comma�p�r�;/usr/lib64/python3.8/lib2to3/fixes/fix_itertools_imports.py�	transformsF

�

�zFixItertoolsImports.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�localsZPATTERNrrrrrrs
�rN)	�__doc__Zlib2to3rZlib2to3.fixer_utilrrrZBaseFixrrrrr�<module>sPK(:�Z���Ӽ�#__pycache__/fix_long.cpython-38.pycnu�[���U

e5d��@s2dZddlmZddlmZGdd�dej�ZdS)z/Fixer that turns 'long' into 'int' everywhere.
�)�
fixer_base)�is_probably_builtinc@seZdZdZdZdd�ZdS)�FixLongTz'long'cCst|�rd|_|��dS)N�int)r�valueZchanged)�selfZnodeZresults�r�./usr/lib64/python3.8/lib2to3/fixes/fix_long.py�	transformszFixLong.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrr	rsrN)�__doc__Zlib2to3rZlib2to3.fixer_utilrZBaseFixrrrrr	�<module>sPK(:�Z
5�<<+__pycache__/fix_urllib.cpython-38.opt-2.pycnu�[���U

e5d� �@s�ddlmZmZddlmZmZmZmZmZm	Z	m
Z
ddddddd	d
dgfdd
ddddddddddddddgfddgfgddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4gfdd5d6gfgd7�Zed8�ed9d:�d;d<�Z
Gd=d>�d>e�Zd?S)@�)�
alternates�
FixImports)�Name�Comma�
FromImport�Newline�find_indentation�Node�symszurllib.requestZ	URLopenerZFancyURLopenerZurlretrieveZ
_urlopenerZurlopenZ
urlcleanupZpathname2urlZurl2pathnamezurllib.parseZquoteZ
quote_plusZunquoteZunquote_plusZ	urlencodeZ	splitattrZ	splithostZ
splitnportZsplitpasswdZ	splitportZ
splitqueryZsplittagZ	splittypeZ	splituserZ
splitvaluezurllib.errorZContentTooShortErrorZinstall_openerZbuild_openerZRequestZOpenerDirectorZBaseHandlerZHTTPDefaultErrorHandlerZHTTPRedirectHandlerZHTTPCookieProcessorZProxyHandlerZHTTPPasswordMgrZHTTPPasswordMgrWithDefaultRealmZAbstractBasicAuthHandlerZHTTPBasicAuthHandlerZProxyBasicAuthHandlerZAbstractDigestAuthHandlerZHTTPDigestAuthHandlerZProxyDigestAuthHandlerZHTTPHandlerZHTTPSHandlerZFileHandlerZ
FTPHandlerZCacheFTPHandlerZUnknownHandlerZURLErrorZ	HTTPError)�urllib�urllib2rr�ccsvt�}t��D]b\}}|D]T}|\}}t|�}d||fVd|||fVd|Vd|Vd||fVqqdS)Nz�import_name< 'import' (module=%r
                                  | dotted_as_names< any* module=%r any* >) >
                  z�import_from< 'from' mod_member=%r 'import'
                       ( member=%s | import_as_name< member=%s 'as' any > |
                         import_as_names< members=any*  >) >
                  zIimport_from< 'from' module_star=%r 'import' star='*' >
                  ztimport_name< 'import'
                                  dotted_as_name< module_as=%r 'as' any > >
                  zKpower< bare_with_attr=%r trailer< '.' member=%s > any* >
                  )�set�MAPPING�itemsr)ZbareZ
old_moduleZchanges�changeZ
new_module�members�r�0/usr/lib64/python3.8/lib2to3/fixes/fix_urllib.py�
build_pattern0s(�����rc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�	FixUrllibcCsd�t��S)N�|)�joinr)�selfrrrrIszFixUrllib.build_patterncCsv|�d�}|j}g}t|jdd�D] }|�t|d|d�t�g�q&|�tt|jdd|d��|�|�dS)N�module���r��prefix)	�getrr�value�extendrr�append�replace)r�node�resultsZ
import_mod�pref�names�namerrr�transform_importLs
 zFixUrllib.transform_importcCs&|�d�}|j}|�d�}|r�t|t�r0|d}d}t|jD]}|j|dkr>|d}q^q>|rv|�t||d��n|�|d��n�g}i}	|d}
|
D]�}|j	t
jkr�|jdj}|jdj}n
|j}d}|d	kr�t|jD]B}||dkr�|d|	k�r|�
|d�|	�|dg��
|�q�q�g}
t|�}d
}dd�}|D]�}|	|}g}|dd
�D]"}|�|||��|�
t���q^|�||d
|��t||�}|�r�|jj�|��r�||_|
�
|�d}�qB|
�rg}|
dd
�D]}|�|t�g��q�|�
|
d
�|�|�n|�|d�dS)N�
mod_member�memberrr
r�!This is an invalid module elementr��,TcSsX|jtjkrHt|jdj|d�|jd��|jd��g}ttj|�gSt|j|d�gS)Nrrr
r,)�typer
�import_as_namer�childrenrZcloner	)r'rZkidsrrr�handle_name�s�z/FixUrllib.transform_member.<locals>.handle_namerFzAll module elements are invalid)rr�
isinstance�listrrr"r�cannot_convertr.r
r/r0r!�
setdefaultrr rr�parent�endswithr)rr#r$r)r%r*�new_namer�modulesZmod_dictrZas_name�member_nameZ	new_nodesZindentation�firstr1rZeltsr&Zelt�newZnodesZnew_noderrr�transform_member\sh




zFixUrllib.transform_membercCs~|�d�}|�d�}d}t|t�r*|d}t|jD]}|j|dkr4|d}qTq4|rn|�t||jd��n|�|d�dS)N�bare_with_attrr*rr
rr+)	rr2r3rrr"rrr4)rr#r$Z
module_dotr*r8rrrr�
transform_dot�s


�
zFixUrllib.transform_dotcCsz|�d�r|�||�n^|�d�r0|�||�nF|�d�rH|�||�n.|�d�r`|�|d�n|�d�rv|�|d�dS)Nrr)r>Zmodule_starzCannot handle star imports.Z	module_asz#This module is now multiple modules)rr(r=r?r4)rr#r$rrr�	transform�s




zFixUrllib.transformN)�__name__�
__module__�__qualname__rr(r=r?r@rrrrrGs
LrN)Zlib2to3.fixes.fix_importsrrZlib2to3.fixer_utilrrrrrr	r
rr!rrrrrr�<module>s|$������
�����!PK(:�Z7)����.__pycache__/fix_raw_input.cpython-38.opt-2.pycnu�[���U

e5d��@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�FixRawInputTzU
              power< name='raw_input' trailer< '(' [any] ')' > any* >
              cCs |d}|�td|jd��dS)N�name�input)�prefix)�replacerr)�selfZnodeZresultsr�r
�3/usr/lib64/python3.8/lib2to3/fixes/fix_raw_input.py�	transformszFixRawInput.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrr
r
r
rrsrN)�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK(:�Z}����/__pycache__/fix_basestring.cpython-38.opt-1.pycnu�[���U

e5d@�@s2dZddlmZddlmZGdd�dej�ZdS)zFixer for basestring -> str.�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixBasestringTz'basestring'cCstd|jd�S)N�str)�prefix)rr)�selfZnodeZresults�r�4/usr/lib64/python3.8/lib2to3/fixes/fix_basestring.py�	transform
szFixBasestring.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrr	rsrN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr	�<module>sPK(:�ZA���~~&__pycache__/fix_sys_exc.cpython-38.pycnu�[���U

e5d
�@sJdZddlmZddlmZmZmZmZmZm	Z	m
Z
Gdd�dej�ZdS)z�Fixer for sys.exc_{type, value, traceback}

sys.exc_type -> sys.exc_info()[0]
sys.exc_value -> sys.exc_info()[1]
sys.exc_traceback -> sys.exc_info()[2]
�)�
fixer_base)�Attr�Call�Name�Number�	Subscript�Node�symsc@s:eZdZdddgZdZdd�dd�eD��Zd	d
�ZdS)�	FixSysExc�exc_type�	exc_value�
exc_tracebackTzN
              power< 'sys' trailer< dot='.' attribute=(%s) > >
              �|ccs|]}d|VqdS)z'%s'N�)�.0�err�1/usr/lib64/python3.8/lib2to3/fixes/fix_sys_exc.py�	<genexpr>szFixSysExc.<genexpr>cCst|dd}t|j�|j��}ttd�|jd�}ttd�|�}|dj|djd_|�	t
|��ttj
||jd�S)NZ	attribute��exc_info)�prefix�sys�dot�)rr�index�valuerrrrZchildren�appendrrr	Zpower)�selfZnodeZresultsZsys_attrrZcall�attrrrr�	transformszFixSysExc.transformN)�__name__�
__module__�__qualname__rZ
BM_compatible�joinZPATTERNrrrrrr
s
�r
N)
�__doc__�rZ
fixer_utilrrrrrrr	ZBaseFixr
rrrr�<module>s
$PK(:�ZP�����,__pycache__/fix_sys_exc.cpython-38.opt-2.pycnu�[���U

e5d
�@sFddlmZddlmZmZmZmZmZmZm	Z	Gdd�dej
�ZdS)�)�
fixer_base)�Attr�Call�Name�Number�	Subscript�Node�symsc@s:eZdZdddgZdZdd�dd�eD��Zd	d
�ZdS)�	FixSysExc�exc_type�	exc_value�
exc_tracebackTzN
              power< 'sys' trailer< dot='.' attribute=(%s) > >
              �|ccs|]}d|VqdS)z'%s'N�)�.0�err�1/usr/lib64/python3.8/lib2to3/fixes/fix_sys_exc.py�	<genexpr>szFixSysExc.<genexpr>cCst|dd}t|j�|j��}ttd�|jd�}ttd�|�}|dj|djd_|�	t
|��ttj
||jd�S)NZ	attribute��exc_info)�prefix�sys�dot�)rr�index�valuerrrrZchildren�appendrrr	Zpower)�selfZnodeZresultsZsys_attrrZcall�attrrrr�	transformszFixSysExc.transformN)�__name__�
__module__�__qualname__rZ
BM_compatible�joinZPATTERNrrrrrr
s
�r
N)�rZ
fixer_utilrrrrrrr	ZBaseFixr
rrrr�<module>s$PK(:�Zy_�$*__pycache__/fix_throw.cpython-38.opt-1.pycnu�[���U

e5d.�@sZdZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZGdd�dej�Z
dS)	z�Fixer for generator.throw(E, V, T).

g.throw(E)       -> g.throw(E)
g.throw(E, V)    -> g.throw(E(V))
g.throw(E, V, T) -> g.throw(E(V).with_traceback(T))

g.throw("foo"[, V[, T]]) will warn about string exceptions.�)�pytree)�token)�
fixer_base)�Name�Call�ArgList�Attr�is_tuplec@seZdZdZdZdd�ZdS)�FixThrowTz�
    power< any trailer< '.' 'throw' >
           trailer< '(' args=arglist< exc=any ',' val=any [',' tb=any] > ')' >
    >
    |
    power< any trailer< '.' 'throw' > trailer< '(' exc=any ')' > >
    cCs�|j}|d��}|jtjkr.|�|d�dS|�d�}|dkrDdS|��}t|�rndd�|jdd�D�}nd|_	|g}|d	}d
|kr�|d
��}d|_	t
||�}	t|	td��t
|g�g}
|�t�|j|
��n|�t
||��dS)N�excz+Python 3 does not support string exceptions�valcSsg|]}|���qS�)�clone)�.0�cr
r
�//usr/lib64/python3.8/lib2to3/fixes/fix_throw.py�
<listcomp>)sz&FixThrow.transform.<locals>.<listcomp>������args�tb�with_traceback)�symsr�typer�STRINGZcannot_convert�getr	Zchildren�prefixrrrr�replacerZNodeZpower)�selfZnodeZresultsrrrrZ
throw_argsr�eZwith_tbr
r
r�	transforms*

zFixThrow.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr!r
r
r
rr
sr
N)�__doc__rrZpgen2rrZ
fixer_utilrrrrr	ZBaseFixr
r
r
r
r�<module>s

PK(:�Zn�^3"__pycache__/fix_map.cpython-38.pycnu�[���U

e5d8�@sfdZddlmZddlmZddlmZmZmZm	Z	m
Z
ddlmZ
ddlmZGdd�dej�Zd	S)
aFixer that changes map(F, ...) into list(map(F, ...)) unless there
exists a 'from future_builtins import map' statement in the top-level
namespace.

As a special case, map(None, X) is changed into list(X).  (This is
necessary because the semantics are changed in this case -- the new
map(None, X) is equivalent to [(x,) for x in X].)

We avoid the transformation (except for the special case mentioned
above) if the map() call is directly contained in iter(<>), list(<>),
tuple(<>), sorted(<>), ...join(<>), or for V in <>:.

NOTE: This is still not correct if the original code was depending on
map(F, X, Y, ...) to go on until the longest argument is exhausted,
substituting None for missing values -- like zip(), it now stops as
soon as the shortest argument is exhausted.
�)�token)�
fixer_base)�Name�ArgList�Call�ListComp�in_special_context)�python_symbols)�Nodec@s eZdZdZdZdZdd�ZdS)�FixMapTaL
    map_none=power<
        'map'
        trailer< '(' arglist< 'None' ',' arg=any [','] > ')' >
        [extra_trailers=trailer*]
    >
    |
    map_lambda=power<
        'map'
        trailer<
            '('
            arglist<
                lambdef< 'lambda'
                         (fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any
                >
                ','
                it=any
            >
            ')'
        >
        [extra_trailers=trailer*]
    >
    |
    power<
        'map' args=trailer< '(' [any] ')' >
        [extra_trailers=trailer*]
    >
    zfuture_builtins.mapcCs�|�|�rdSg}d|kr6|dD]}|�|���q"|jjtjkrr|�|d�|��}d|_t	t
d�|g�}�n&d|kr�t|d��|d��|d���}ttj
|g|dd	�}n�d
|kr�|d��}d|_n�d|k�rf|d}|jtjk�rH|jd
jtjk�rH|jd
jdjtjk�rH|jd
jdjdk�rH|�|d�dSttj
t
d�|��g�}d|_t|��rtdSttj
t
d�t|g�g|�}d|_|j|_|S)NZextra_trailerszYou should use a for loop here��listZ
map_lambdaZxp�fp�it)�prefixZmap_none�arg�args���Nonezjcannot convert map(None, ...) with multiple arguments because map() now truncates to the shortest sequence�map)Zshould_skip�appendZclone�parent�type�symsZsimple_stmtZwarningrrrrr
ZpowerZtrailerZchildrenZarglistr�NAME�valuerr)�selfZnodeZresultsZtrailers�t�newr�r �-/usr/lib64/python3.8/lib2to3/fixes/fix_map.py�	transform@sN


�
���
zFixMap.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onr"r r r r!rsrN)�__doc__Zpgen2rrrZ
fixer_utilrrrrrZpygramr	rZpytreer
ZConditionalFixrr r r r!�<module>sPK(:�Z��ҋ�$__pycache__/fix_apply.cpython-38.pycnu�[���U

e5d*	�@sRdZddlmZddlmZddlmZddlmZmZm	Z	Gdd�dej
�ZdS)	zIFixer for apply().

This converts apply(func, v, k) into (func)(*v, **k).�)�pytree)�token)�
fixer_base)�Call�Comma�parenthesizec@seZdZdZdZdd�ZdS)�FixApplyTa.
    power< 'apply'
        trailer<
            '('
            arglist<
                (not argument<NAME '=' any>) func=any ','
                (not argument<NAME '=' any>) args=any [','
                (not argument<NAME '=' any>) kwds=any] [',']
            >
            ')'
        >
    >
    c	Cs4|j}|st�|d}|d}|�d�}|rN|j|jjkrN|jdjdkrNdS|rt|j|jjkrt|jdjdkrtdS|j}|��}|jt	j
|jfkr�|j|jks�|jdjt	j
kr�t|�}d|_|��}d|_|dk	r�|��}d|_t�t	jd	�|g}|dk	�r&|�t�t�t	j
d�|g�d
|d_t|||d�S)N�func�args�kwds�>�**�*r
����r� )�prefix)�syms�AssertionError�get�typeZargumentZchildren�valuerZcloner�NAMEZatomZpower�
DOUBLESTARrrZLeaf�STAR�extendrr)	�selfZnodeZresultsrr	r
rrZ	l_newargs�r�//usr/lib64/python3.8/lib2to3/fixes/fix_apply.py�	transformsH
��
��
�
zFixApply.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)�__doc__rrZpgen2rrZ
fixer_utilrrrZBaseFixrrrrr�<module>s
PK(:�ZW���&__pycache__/fix_renames.cpython-38.pycnu�[���U

e5d��@sVdZddlmZddlmZmZdddiiZiZdd�Zd	d
�Z	Gdd�dej
�Zd
S)z?Fix incompatible renames

Fixes:
  * sys.maxint -> sys.maxsize
�)�
fixer_base)�Name�
attr_chain�sysZmaxint�maxsizecCsdd�tt|��dS)N�(�|�))�join�map�repr)�members�r�1/usr/lib64/python3.8/lib2to3/fixes/fix_renames.py�
alternatessrccsZtt���D]H\}}t|���D]2\}}|t||f<d|||fVd||fVq qdS)Nz�
                  import_from< 'from' module_name=%r 'import'
                      ( attr_name=%r | import_as_name< attr_name=%r 'as' any >) >
                  z^
                  power< module_name=%r trailer< '.' attr_name=%r > any* >
                  )�list�MAPPING�items�LOOKUP)�module�replaceZold_attr�new_attrrrr�
build_patterns��rcs8eZdZdZd�e��ZdZ�fdd�Zdd�Z	�Z
S)�
FixRenamesTrZprecs@tt|�j��|�}|r<t�fdd�t|d�D��r8dS|SdS)Nc3s|]}�|�VqdS)Nr)�.0�obj��matchrr�	<genexpr>5sz#FixRenames.match.<locals>.<genexpr>�parentF)�superrr�anyr)�self�node�results��	__class__rrr1szFixRenames.matchcCsD|�d�}|�d�}|r@|r@t|j|jf}|�t||jd��dS)NZmodule_name�	attr_name)�prefix)�getr�valuerrr()r"r#r$Zmod_namer'rrrr�	transform>s


zFixRenames.transform)�__name__�
__module__�__qualname__Z
BM_compatibler
rZPATTERN�orderrr+�
__classcell__rrr%rr*s

rN)�__doc__�rZ
fixer_utilrrrrrrZBaseFixrrrrr�<module>s	PK(:�Z���^^)__pycache__/fix_xreadlines.cpython-38.pycnu�[���U

e5d��@s2dZddlmZddlmZGdd�dej�ZdS)zpFix "for x in f.xreadlines()" -> "for x in f".

This fixer will also convert g(f.xreadlines) into g(f.__iter__).�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixXreadlinesTz�
    power< call=any+ trailer< '.' 'xreadlines' > trailer< '(' ')' > >
    |
    power< any+ trailer< '.' no_call='xreadlines' > >
    cCs@|�d�}|r$|�td|jd��n|�dd�|dD��dS)N�no_call�__iter__)�prefixcSsg|]}|���qS�)Zclone)�.0�xrr�4/usr/lib64/python3.8/lib2to3/fixes/fix_xreadlines.py�
<listcomp>sz+FixXreadlines.transform.<locals>.<listcomp>Zcall)�get�replacerr)�selfZnodeZresultsrrrr�	transforms
zFixXreadlines.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK(:�Z�O�ww-__pycache__/fix_operator.cpython-38.opt-1.pycnu�[���U

e5db
�@sNdZddlZddlmZddlmZmZmZm	Z	dd�Z
Gdd�dej�ZdS)	a�Fixer for operator functions.

operator.isCallable(obj)       -> callable(obj)
operator.sequenceIncludes(obj) -> operator.contains(obj)
operator.isSequenceType(obj)   -> isinstance(obj, collections.abc.Sequence)
operator.isMappingType(obj)    -> isinstance(obj, collections.abc.Mapping)
operator.isNumberType(obj)     -> isinstance(obj, numbers.Number)
operator.repeat(obj, n)        -> operator.mul(obj, n)
operator.irepeat(obj, n)       -> operator.imul(obj, n)
�N)�
fixer_base)�Call�Name�String�touch_importcs�fdd�}|S)Ncs
�|_|S�N)�
invocation)�f��s��2/usr/lib64/python3.8/lib2to3/fixes/fix_operator.py�decszinvocation.<locals>.decr)rrrr
r
rsrc@s�eZdZdZdZdZdZdeeed�Zdd�Z	e
d	�d
d��Ze
d�d
d��Ze
d�dd��Z
e
d�dd��Ze
d�dd��Ze
d�dd��Ze
d�dd��Zdd�Zd d!�Zd"d#�Zd$S)%�FixOperatorTZprez�
              method=('isCallable'|'sequenceIncludes'
                     |'isSequenceType'|'isMappingType'|'isNumberType'
                     |'repeat'|'irepeat')
              z'(' obj=any ')'z�
              power< module='operator'
                trailer< '.' %(methods)s > trailer< %(obj)s > >
              |
              power< %(methods)s trailer< %(obj)s > >
              )�methods�objcCs"|�||�}|dk	r|||�SdSr)�
_check_method)�self�node�results�methodrrr
�	transform+szFixOperator.transformzoperator.contains(%s)cCs|�||d�S)N�contains��_handle_rename�rrrrrr
�_sequenceIncludes0szFixOperator._sequenceIncludeszcallable(%s)cCs"|d}ttd�|��g|jd�S)Nr�callable��prefix)rr�cloner)rrrrrrr
�_isCallable4szFixOperator._isCallablezoperator.mul(%s)cCs|�||d�S)N�mulrrrrr
�_repeat9szFixOperator._repeatzoperator.imul(%s)cCs|�||d�S)N�imulrrrrr
�_irepeat=szFixOperator._irepeatz(isinstance(%s, collections.abc.Sequence)cCs|�||dd�S)N�collections.abc�Sequence��_handle_type2abcrrrr
�_isSequenceTypeAszFixOperator._isSequenceTypez'isinstance(%s, collections.abc.Mapping)cCs|�||dd�S)Nr&�Mappingr(rrrr
�_isMappingTypeEszFixOperator._isMappingTypezisinstance(%s, numbers.Number)cCs|�||dd�S)NZnumbers�Numberr(rrrr
�
_isNumberTypeIszFixOperator._isNumberTypecCs|dd}||_|��dS)Nrr)�valueZchanged)rrr�namerrrr
rMszFixOperator._handle_renamecCsFtd||�|d}|��tdd�||g��g}ttd�||jd�S)Nrz, �.�
isinstancer)rr r�joinrrr)rrr�module�abcr�argsrrr
r)RszFixOperator._handle_type2abccCs^t|d|ddj�}t|tjj�rZd|kr2|St|d�f}|j|}|�|d|�dS)N�_rrr4rzYou should use '%s' here.)	�getattrr/r2�collectionsr5�Callable�strrZwarning)rrrr�subZinvocation_strrrr
rXs
zFixOperator._check_methodN)�__name__�
__module__�__qualname__Z
BM_compatible�orderrr�dictZPATTERNrrrr!r#r%r*r,r.rr)rrrrr
rs2
�






r)
�__doc__Zcollections.abcr9Zlib2to3rZlib2to3.fixer_utilrrrrrZBaseFixrrrrr
�<module>s
PK(:�Z�'�Z-__pycache__/fix_execfile.cpython-38.opt-2.pycnu�[���U

e5d�@sRddlmZddlmZmZmZmZmZmZm	Z	m
Z
mZmZGdd�dej
�ZdS)�)�
fixer_base)
�Comma�Name�Call�LParen�RParen�Dot�Node�ArgList�String�symsc@seZdZdZdZdd�ZdS)�FixExecfileTz�
    power< 'execfile' trailer< '(' arglist< filename=any [',' globals=any [',' locals=any ] ] > ')' > >
    |
    power< 'execfile' trailer< '(' filename=any ')' > >
    cCs&|d}|�d�}|�d�}|jdjd��}t|��t�tdd�g|d�}ttjt	d�|g�}ttj
t�t	d	�g�ttj
t�t
�g�g}	|g|	}
|��}d|_td
d�}|
t�|t�|g}
tt	d�|
d�}|g}|dk	r�|�t�|��g�|dk	�r|�t�|��g�tt	d
�||jd�S)N�filename�globals�locals���z"rb"� )Zrparen�open�readz'exec'�compile��exec)�prefix)�getZchildrenZcloner
rrr	rZpowerrZtrailerrrrrr�extend)�selfZnodeZresultsrrrZexecfile_parenZ	open_argsZ	open_callrZ	open_exprZfilename_argZexec_strZcompile_argsZcompile_call�args�r�2/usr/lib64/python3.8/lib2to3/fixes/fix_execfile.py�	transforms.

��


zFixExecfile.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrr
sr
N)rrZ
fixer_utilrrrrrrr	r
rrZBaseFixr
rrrr�<module>
s0PK(:�Z=�LJ�.__pycache__/fix_funcattrs.cpython-38.opt-2.pycnu�[���U

e5d��@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�FixFuncattrsTz�
    power< any+ trailer< '.' attr=('func_closure' | 'func_doc' | 'func_globals'
                                  | 'func_name' | 'func_defaults' | 'func_code'
                                  | 'func_dict') > any* >
    cCs2|dd}|�td|jdd�|jd��dS)N�attr�z__%s__�)�prefix)�replacer�valuer)�selfZnodeZresultsr�r�3/usr/lib64/python3.8/lib2to3/fixes/fix_funcattrs.py�	transforms�zFixFuncattrs.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrr
r	srN)�rZ
fixer_utilrZBaseFixrrrrr
�<module>sPK(:�Z��fh'__pycache__/fix_imports2.cpython-38.pycnu�[���U

e5d!�@s0dZddlmZddd�ZGdd�dej�ZdS)zTFix incompatible imports and module references that must be fixed after
fix_imports.�)�fix_importsZdbm)ZwhichdbZanydbmc@seZdZdZeZdS)�FixImports2�N)�__name__�
__module__�__qualname__Z	run_order�MAPPING�mapping�r
r
�2/usr/lib64/python3.8/lib2to3/fixes/fix_imports2.pyrsrN)�__doc__�rrZ
FixImportsrr
r
r
r�<module>s
�PK(:�Ze�~�(__pycache__/fix_raw_input.cpython-38.pycnu�[���U

e5d��@s2dZddlmZddlmZGdd�dej�ZdS)z2Fixer that changes raw_input(...) into input(...).�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�FixRawInputTzU
              power< name='raw_input' trailer< '(' [any] ')' > any* >
              cCs |d}|�td|jd��dS)N�name�input)�prefix)�replacerr)�selfZnodeZresultsr�r
�3/usr/lib64/python3.8/lib2to3/fixes/fix_raw_input.py�	transformszFixRawInput.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrr
r
r
rrsrN)�__doc__�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK(:�Z�$0@ll*__pycache__/fix_input.cpython-38.opt-2.pycnu�[���U

e5d��@sHddlmZddlmZmZddlmZe�d�ZGdd�dej�Z	dS)�)�
fixer_base)�Call�Name)�patcompz&power< 'eval' trailer< '(' any ')' > >c@seZdZdZdZdd�ZdS)�FixInputTzL
              power< 'input' args=trailer< '(' [any] ')' > >
              cCs6t�|jj�rdS|��}d|_ttd�|g|jd�S)N��eval)�prefix)�context�match�parentZcloner	rr)�selfZnodeZresults�new�r�//usr/lib64/python3.8/lib2to3/fixes/fix_input.py�	transforms
zFixInput.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrr
srN)
rrZ
fixer_utilrrrZcompile_patternr
ZBaseFixrrrrr�<module>s
PK(:�Z�;�%%0__pycache__/fix_itertools_imports.cpython-38.pycnu�[���U

e5d&�@s:dZddlmZddlmZmZmZGdd�dej�ZdS)zA Fixer for imports of itertools.(imap|ifilter|izip|ifilterfalse) �)�
fixer_base)�	BlankLine�syms�tokenc@s"eZdZdZde�Zdd�ZdS)�FixItertoolsImportsTzT
              import_from< 'from' 'itertools' 'import' imports=any >
              cCsp|d}|jtjks|js"|g}n|j}|ddd�D]�}|jtjkrR|j}|}n,|jtjkrddS|jtjkstt�|jd}|j}|dkr�d|_|�	�q6|dkr6|�
�|ddkr�dnd	|_q6|jdd�p�|g}d
}	|D]*}|	�r|jtjk�r|�	�q�|	d
N}	q�|�r4|djtjk�r4|���	��q|j�sJt
|dd��rV|jdk�rl|j}
t�}|
|_|SdS)
N�imports�r)ZimapZizipZifilter)ZifilterfalseZizip_longest��f�filterfalse�zip_longestT����value)�typerZimport_as_name�childrenr�NAMEr�STAR�AssertionError�removeZchanged�COMMA�pop�getattr�parent�prefixr)�selfZnodeZresultsrrZchild�memberZ	name_node�member_nameZremove_comma�p�r�;/usr/lib64/python3.8/lib2to3/fixes/fix_itertools_imports.py�	transformsH

�

�zFixItertoolsImports.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�localsZPATTERNr rrrrrs
�rN)	�__doc__Zlib2to3rZlib2to3.fixer_utilrrrZBaseFixrrrrr�<module>sPK(:�Z�6���#__pycache__/__init__.cpython-38.pycnu�[���U

e5d/�@sdS)N�rrr�./usr/lib64/python3.8/lib2to3/fixes/__init__.py�<module>�PK(:�Z
�?��,__pycache__/fix_getcwdu.cpython-38.opt-2.pycnu�[���U

e5d��@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixGetcwduTzR
              power< 'os' trailer< dot='.' name='getcwdu' > any* >
              cCs |d}|�td|jd��dS)N�name�getcwd)�prefix)�replacerr)�selfZnodeZresultsr�r
�1/usr/lib64/python3.8/lib2to3/fixes/fix_getcwdu.py�	transformszFixGetcwdu.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrr
r
r
rr
srN)�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK(:�Z���ٜ�'__pycache__/fix_execfile.cpython-38.pycnu�[���U

e5d�@sVdZddlmZddlmZmZmZmZmZm	Z	m
Z
mZmZm
Z
Gdd�dej�ZdS)zoFixer for execfile.

This converts usages of the execfile function into calls to the built-in
exec() function.
�)�
fixer_base)
�Comma�Name�Call�LParen�RParen�Dot�Node�ArgList�String�symsc@seZdZdZdZdd�ZdS)�FixExecfileTz�
    power< 'execfile' trailer< '(' arglist< filename=any [',' globals=any [',' locals=any ] ] > ')' > >
    |
    power< 'execfile' trailer< '(' filename=any ')' > >
    cCs.|st�|d}|�d�}|�d�}|jdjd��}t|��t�tdd�g|d�}ttj	t
d�|g�}ttjt�t
d	�g�ttjt
�t�g�g}	|g|	}
|��}d|_td
d�}|
t�|t�|g}
tt
d�|
d�}|g}|dk	r�|�t�|��g�|dk	�r|�t�|��g�tt
d
�||jd�S)N�filename�globals�locals���z"rb"� )Zrparen�open�readz'exec'�compile��exec)�prefix)�AssertionError�getZchildrenZcloner
rrr	rZpowerrZtrailerrrrrr�extend)�selfZnodeZresultsrrrZexecfile_parenZ	open_argsZ	open_callrZ	open_exprZfilename_argZexec_strZcompile_argsZcompile_call�args�r�2/usr/lib64/python3.8/lib2to3/fixes/fix_execfile.py�	transforms0

��


zFixExecfile.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr rrrrr
sr
N)�__doc__rrZ
fixer_utilrrrrrrr	r
rrZBaseFixr
rrrr�<module>s0PK(:�Z���	�	+__pycache__/fix_xrange.cpython-38.opt-2.pycnu�[���U

e5d�
�@sBddlmZddlmZmZmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Name�Call�consuming_calls)�patcompcsheZdZdZdZ�fdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
Z
e�e
�Z
dZe�e�Zdd�Z�ZS)�	FixXrangeTz�
              power<
                 (name='range'|name='xrange') trailer< '(' args=any ')' >
              rest=any* >
              cstt|��||�t�|_dS�N)�superr�
start_tree�set�transformed_xranges��selfZtree�filename��	__class__��0/usr/lib64/python3.8/lib2to3/fixes/fix_xrange.pyr
szFixXrange.start_treecCs
d|_dSr)rr
rrr�finish_treeszFixXrange.finish_treecCsD|d}|jdkr|�||�S|jdkr4|�||�Stt|���dS)N�nameZxrange�range)�value�transform_xrange�transform_range�
ValueError�repr�r�node�resultsrrrr�	transforms

zFixXrange.transformcCs0|d}|�td|jd��|j�t|��dS)Nrr��prefix)�replacerr!r�add�idrrrrr$szFixXrange.transform_xrangecCsft|�|jkrb|�|�sbttd�|d��g�}ttd�|g|jd�}|dD]}|�|�qN|SdS)Nr�args�listr �rest)r$r�in_special_contextrrZcloner!Zappend_child)rrrZ
range_callZ	list_call�nrrrr*s��zFixXrange.transform_rangez3power< func=NAME trailer< '(' node=any ')' > any* >z�for_stmt< 'for' any 'in' node=any ':' any* >
            | comp_for< 'for' any 'in' node=any any* >
            | comparison< any 'in' node=any any*>
         cCsf|jdkrdSi}|jjdk	rJ|j�|jj|�rJ|d|krJ|djtkS|j�|j|�od|d|kS)NFr�func)�parent�p1�matchrr�p2)rrrrrrr(?s
�
�zFixXrange.in_special_context)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrrZP1rZcompile_patternr,ZP2r.r(�
__classcell__rrrrrs	

rN)	�rZ
fixer_utilrrrrZBaseFixrrrrr�<module>sPK(:�Z��

#__pycache__/fix_dict.cpython-38.pycnu�[���U

e5d��@sjdZddlmZddlmZddlmZddlmZmZmZddlmZej	dhBZ
Gdd	�d	ej�Zd
S)ajFixer for dict methods.

d.keys() -> list(d.keys())
d.items() -> list(d.items())
d.values() -> list(d.values())

d.iterkeys() -> iter(d.keys())
d.iteritems() -> iter(d.items())
d.itervalues() -> iter(d.values())

d.viewkeys() -> d.keys()
d.viewitems() -> d.items()
d.viewvalues() -> d.values()

Except in certain very specific contexts: the iter() can be dropped
when the context is list(), sorted(), iter() or for...in; the list()
can be dropped when the context is list() or sorted() (but not iter()
or for...in!). Special contexts that apply to both: list(), sorted(), tuple()
set(), any(), all(), sum().

Note: iter(d.keys()) could be written as iter(d) but since the
original d.iterkeys() was also redundant we don't fix this.  And there
are (rare) contexts where it makes a difference (e.g. when passing it
as an argument to a function that introspects the argument).
�)�pytree)�patcomp)�
fixer_base)�Name�Call�Dot)�
fixer_util�iterc@s@eZdZdZdZdd�ZdZe�e�Z	dZ
e�e
�Zdd�Zd	S)
�FixDictTa
    power< head=any+
         trailer< '.' method=('keys'|'items'|'values'|
                              'iterkeys'|'iteritems'|'itervalues'|
                              'viewkeys'|'viewitems'|'viewvalues') >
         parens=trailer< '(' ')' >
         tail=any*
    >
    c
	Cs|d}|dd}|d}|j}|j}|�d�}|�d�}	|sD|	rP|dd�}|dksdtt|���d	d
�|D�}dd
�|D�}|o�|�||�}
|t�|jt	�t
||jd�g�|d
��g}t�|j
|�}|
s�|	s�d|_tt
|r�dnd�|g�}|�rt�|j
|g|�}|j|_|S)N�head�method��tailr	Zview�)�keys�items�valuescSsg|]}|���qS���clone��.0�nrr�./usr/lib64/python3.8/lib2to3/fixes/fix_dict.py�
<listcomp>Asz%FixDict.transform.<locals>.<listcomp>cSsg|]}|���qSrrrrrrrBs)�prefixZparens��list)�syms�value�
startswith�AssertionError�repr�in_special_contextrZNodeZtrailerrrrrZpowerr)
�self�node�resultsrrrrZmethod_name�isiterZisviewZspecial�args�newrrr�	transform6s<


���
�zFixDict.transformz3power< func=NAME trailer< '(' node=any ')' > any* >zmfor_stmt< 'for' any 'in' node=any ':' any* >
            | comp_for< 'for' any 'in' node=any any* >
         cCs�|jdkrdSi}|jjdk	r^|j�|jj|�r^|d|kr^|rN|djtkS|djtjkS|sfdS|j�|j|�o�|d|kS)NFr%�func)�parent�p1�matchr�iter_exemptr�consuming_calls�p2)r$r%r'r&rrrr#Zs
�
�zFixDict.in_special_contextN)
�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr*ZP1rZcompile_patternr-ZP2r1r#rrrrr
)s


r
N)
�__doc__rrrrrrrrr0r/ZBaseFixr
rrrr�<module>sPK(:�Z݉p��*__pycache__/fix_raise.cpython-38.opt-1.pycnu�[���U

e5dn�@sZdZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZGdd�dej�Z
dS)	a[Fixer for 'raise E, V, T'

raise         -> raise
raise E       -> raise E
raise E, V    -> raise E(V)
raise E, V, T -> raise E(V).with_traceback(T)
raise E, None, T -> raise E.with_traceback(T)

raise (((E, E'), E''), E'''), V -> raise E(V)
raise "foo", V, T               -> warns about string exceptions


CAVEATS:
1) "raise E, V" will be incorrectly translated if V is an exception
   instance. The correct Python 3 idiom is

        raise E from V

   but since we can't detect instance-hood by syntax alone and since
   any client code would have to be changed as well, we don't automate
   this.
�)�pytree)�token)�
fixer_base)�Name�Call�Attr�ArgList�is_tuplec@seZdZdZdZdd�ZdS)�FixRaiseTzB
    raise_stmt< 'raise' exc=any [',' val=any [',' tb=any]] >
    cCsh|j}|d��}|jtjkr2d}|�||�dSt|�r^t|�rX|jdjd��}q:d|_d|kr�t	�
|jtd�|g�}|j|_|S|d��}t|�r�dd	�|jdd
�D�}nd|_|g}d|k�rB|d��}	d|	_|}
|jtj
ks�|jd
k�rt||�}
t|
td��t|	g�g}t	�
|jtd�g|�}|j|_|St	j
|jtd�t||�g|jd�SdS)N�excz+Python 3 does not support string exceptions��� �val�raisecSsg|]}|���qS�)�clone)�.0�crr�//usr/lib64/python3.8/lib2to3/fixes/fix_raise.py�
<listcomp>Dsz&FixRaise.transform.<locals>.<listcomp>�����tb�None�with_traceback)�prefix)�symsr�typer�STRINGZcannot_convertr	ZchildrenrrZNodeZ
raise_stmtr�NAME�valuerrrZsimple_stmt)�selfZnodeZresultsrr�msg�newr�argsr�eZwith_tbrrr�	transform&sB

�zFixRaise.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr'rrrrr
sr
N)�__doc__rrZpgen2rrZ
fixer_utilrrrrr	ZBaseFixr
rrrr�<module>s
PK(:�Z 2ny		(__pycache__/fix_itertools.cpython-38.pycnu�[���U

e5d�@s2dZddlmZddlmZGdd�dej�ZdS)aT Fixer for itertools.(imap|ifilter|izip) --> (map|filter|zip) and
    itertools.ifilterfalse --> itertools.filterfalse (bugs 2360-2363)

    imports from itertools are fixed in fix_itertools_import.py

    If itertools is imported as something else (ie: import itertools as it;
    it.izip(spam, eggs)) method calls will not get fixed.
    �)�
fixer_base)�Namec@s*eZdZdZdZde�ZdZdd�ZdS)�FixItertoolsTz7('imap'|'ifilter'|'izip'|'izip_longest'|'ifilterfalse')z�
              power< it='itertools'
                  trailer<
                     dot='.' func=%(it_funcs)s > trailer< '(' [any] ')' > >
              |
              power< func=%(it_funcs)s trailer< '(' [any] ')' > >
              �cCs�d}|dd}d|krV|jdkrV|d|d}}|j}|��|��|j�|�|p^|j}|�t|jdd�|d��dS)N�func��it)ZifilterfalseZizip_longest�dot�)�prefix)�valuer�remove�parent�replacer)�selfZnodeZresultsrrr	r�r�3/usr/lib64/python3.8/lib2to3/fixes/fix_itertools.py�	transforms�
zFixItertools.transformN)	�__name__�
__module__�__qualname__Z
BM_compatibleZit_funcs�localsZPATTERNZ	run_orderrrrrrrs�	rN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr�<module>s
PK(:�Zd�s��fix_dict.pynu�[���# Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Fixer for dict methods.

d.keys() -> list(d.keys())
d.items() -> list(d.items())
d.values() -> list(d.values())

d.iterkeys() -> iter(d.keys())
d.iteritems() -> iter(d.items())
d.itervalues() -> iter(d.values())

d.viewkeys() -> d.keys()
d.viewitems() -> d.items()
d.viewvalues() -> d.values()

Except in certain very specific contexts: the iter() can be dropped
when the context is list(), sorted(), iter() or for...in; the list()
can be dropped when the context is list() or sorted() (but not iter()
or for...in!). Special contexts that apply to both: list(), sorted(), tuple()
set(), any(), all(), sum().

Note: iter(d.keys()) could be written as iter(d) but since the
original d.iterkeys() was also redundant we don't fix this.  And there
are (rare) contexts where it makes a difference (e.g. when passing it
as an argument to a function that introspects the argument).
"""

# Local imports
from .. import pytree
from .. import patcomp
from .. import fixer_base
from ..fixer_util import Name, Call, Dot
from .. import fixer_util


iter_exempt = fixer_util.consuming_calls | {"iter"}


class FixDict(fixer_base.BaseFix):
    BM_compatible = True

    PATTERN = """
    power< head=any+
         trailer< '.' method=('keys'|'items'|'values'|
                              'iterkeys'|'iteritems'|'itervalues'|
                              'viewkeys'|'viewitems'|'viewvalues') >
         parens=trailer< '(' ')' >
         tail=any*
    >
    """

    def transform(self, node, results):
        head = results["head"]
        method = results["method"][0] # Extract node for method name
        tail = results["tail"]
        syms = self.syms
        method_name = method.value
        isiter = method_name.startswith("iter")
        isview = method_name.startswith("view")
        if isiter or isview:
            method_name = method_name[4:]
        assert method_name in ("keys", "items", "values"), repr(method)
        head = [n.clone() for n in head]
        tail = [n.clone() for n in tail]
        special = not tail and self.in_special_context(node, isiter)
        args = head + [pytree.Node(syms.trailer,
                                   [Dot(),
                                    Name(method_name,
                                         prefix=method.prefix)]),
                       results["parens"].clone()]
        new = pytree.Node(syms.power, args)
        if not (special or isview):
            new.prefix = ""
            new = Call(Name("iter" if isiter else "list"), [new])
        if tail:
            new = pytree.Node(syms.power, [new] + tail)
        new.prefix = node.prefix
        return new

    P1 = "power< func=NAME trailer< '(' node=any ')' > any* >"
    p1 = patcomp.compile_pattern(P1)

    P2 = """for_stmt< 'for' any 'in' node=any ':' any* >
            | comp_for< 'for' any 'in' node=any any* >
         """
    p2 = patcomp.compile_pattern(P2)

    def in_special_context(self, node, isiter):
        if node.parent is None:
            return False
        results = {}
        if (node.parent.parent is not None and
               self.p1.match(node.parent.parent, results) and
               results["node"] is node):
            if isiter:
                # iter(d.iterkeys()) -> iter(d.keys()), etc.
                return results["func"].value in iter_exempt
            else:
                # list(d.keys()) -> list(d.keys()), etc.
                return results["func"].value in fixer_util.consuming_calls
        if not isiter:
            return False
        # for ... in d.iterkeys() -> for ... in d.keys(), etc.
        return self.p2.match(node.parent, results) and results["node"] is node
PK(:�Z������fix_paren.pynu�[���"""Fixer that addes parentheses where they are required

This converts ``[x for x in 1, 2]`` to ``[x for x in (1, 2)]``."""

# By Taek Joo Kim and Benjamin Peterson

# Local imports
from .. import fixer_base
from ..fixer_util import LParen, RParen

# XXX This doesn't support nested for loops like [x for x in 1, 2 for x in 1, 2]
class FixParen(fixer_base.BaseFix):
    BM_compatible = True

    PATTERN = """
        atom< ('[' | '(')
            (listmaker< any
                comp_for<
                    'for' NAME 'in'
                    target=testlist_safe< any (',' any)+ [',']
                     >
                    [any]
                >
            >
            |
            testlist_gexp< any
                comp_for<
                    'for' NAME 'in'
                    target=testlist_safe< any (',' any)+ [',']
                     >
                    [any]
                >
            >)
        (']' | ')') >
    """

    def transform(self, node, results):
        target = results["target"]

        lparen = LParen()
        lparen.prefix = target.prefix
        target.prefix = "" # Make it hug the parentheses
        target.insert_child(0, lparen)
        target.append_child(RParen())
PK(:�Zq�|��fix_input.pynu�[���"""Fixer that changes input(...) into eval(input(...))."""
# Author: Andre Roberge

# Local imports
from .. import fixer_base
from ..fixer_util import Call, Name
from .. import patcomp


context = patcomp.compile_pattern("power< 'eval' trailer< '(' any ')' > >")


class FixInput(fixer_base.BaseFix):
    BM_compatible = True
    PATTERN = """
              power< 'input' args=trailer< '(' [any] ')' > >
              """

    def transform(self, node, results):
        # If we're already wrapped in an eval() call, we're done.
        if context.match(node.parent.parent):
            return

        new = node.clone()
        new.prefix = ""
        return Call(Name("eval"), [new], prefix=node.prefix)
PK(:�Zr�399
fix_reload.pynu�[���"""Fixer for reload().

reload(s) -> importlib.reload(s)"""

# Local imports
from .. import fixer_base
from ..fixer_util import ImportAndCall, touch_import


class FixReload(fixer_base.BaseFix):
    BM_compatible = True
    order = "pre"

    PATTERN = """
    power< 'reload'
           trailer< lpar='('
                    ( not(arglist | argument<any '=' any>) obj=any
                      | obj=arglist<(not argument<any '=' any>) any ','> )
                    rpar=')' >
           after=any*
    >
    """

    def transform(self, node, results):
        if results:
            # I feel like we should be able to express this logic in the
            # PATTERN above but I don't know how to do it so...
            obj = results['obj']
            if obj:
                if (obj.type == self.syms.argument and
                    obj.children[0].value in {'**', '*'}):
                    return  # Make no change.
        names = ('importlib', 'reload')
        new = ImportAndCall(node, results, names)
        touch_import(None, 'importlib', node)
        return new
PK(:�ZN2E���fix_xreadlines.pynu�[���"""Fix "for x in f.xreadlines()" -> "for x in f".

This fixer will also convert g(f.xreadlines) into g(f.__iter__)."""
# Author: Collin Winter

# Local imports
from .. import fixer_base
from ..fixer_util import Name


class FixXreadlines(fixer_base.BaseFix):
    BM_compatible = True
    PATTERN = """
    power< call=any+ trailer< '.' 'xreadlines' > trailer< '(' ')' > >
    |
    power< any+ trailer< '.' no_call='xreadlines' > >
    """

    def transform(self, node, results):
        no_call = results.get("no_call")

        if no_call:
            no_call.replace(Name("__iter__", prefix=no_call.prefix))
        else:
            node.replace([x.clone() for x in results["call"]])
PK(:�ZIkN�fffix_next.pynu�[���"""Fixer for it.next() -> next(it), per PEP 3114."""
# Author: Collin Winter

# Things that currently aren't covered:
#   - listcomp "next" names aren't warned
#   - "with" statement targets aren't checked

# Local imports
from ..pgen2 import token
from ..pygram import python_symbols as syms
from .. import fixer_base
from ..fixer_util import Name, Call, find_binding

bind_warning = "Calls to builtin next() possibly shadowed by global binding"


class FixNext(fixer_base.BaseFix):
    BM_compatible = True
    PATTERN = """
    power< base=any+ trailer< '.' attr='next' > trailer< '(' ')' > >
    |
    power< head=any+ trailer< '.' attr='next' > not trailer< '(' ')' > >
    |
    classdef< 'class' any+ ':'
              suite< any*
                     funcdef< 'def'
                              name='next'
                              parameters< '(' NAME ')' > any+ >
                     any* > >
    |
    global=global_stmt< 'global' any* 'next' any* >
    """

    order = "pre" # Pre-order tree traversal

    def start_tree(self, tree, filename):
        super(FixNext, self).start_tree(tree, filename)

        n = find_binding('next', tree)
        if n:
            self.warning(n, bind_warning)
            self.shadowed_next = True
        else:
            self.shadowed_next = False

    def transform(self, node, results):
        assert results

        base = results.get("base")
        attr = results.get("attr")
        name = results.get("name")

        if base:
            if self.shadowed_next:
                attr.replace(Name("__next__", prefix=attr.prefix))
            else:
                base = [n.clone() for n in base]
                base[0].prefix = ""
                node.replace(Call(Name("next", prefix=node.prefix), base))
        elif name:
            n = Name("__next__", prefix=name.prefix)
            name.replace(n)
        elif attr:
            # We don't do this transformation if we're assigning to "x.next".
            # Unfortunately, it doesn't seem possible to do this in PATTERN,
            #  so it's being done here.
            if is_assign_target(node):
                head = results["head"]
                if "".join([str(n) for n in head]).strip() == '__builtin__':
                    self.warning(node, bind_warning)
                return
            attr.replace(Name("__next__"))
        elif "global" in results:
            self.warning(node, bind_warning)
            self.shadowed_next = True


### The following functions help test if node is part of an assignment
###  target.

def is_assign_target(node):
    assign = find_assign(node)
    if assign is None:
        return False

    for child in assign.children:
        if child.type == token.EQUAL:
            return False
        elif is_subtree(child, node):
            return True
    return False

def find_assign(node):
    if node.type == syms.expr_stmt:
        return node
    if node.type == syms.simple_stmt or node.parent is None:
        return None
    return find_assign(node.parent)

def is_subtree(root, node):
    if root == node:
        return True
    return any(is_subtree(c, node) for c in root.children)
PK(:�Z 2�Ϳ	�	fix_exitfunc.pynu�[���"""
Convert use of sys.exitfunc to use the atexit module.
"""

# Author: Benjamin Peterson

from lib2to3 import pytree, fixer_base
from lib2to3.fixer_util import Name, Attr, Call, Comma, Newline, syms


class FixExitfunc(fixer_base.BaseFix):
    keep_line_order = True
    BM_compatible = True

    PATTERN = """
              (
                  sys_import=import_name<'import'
                      ('sys'
                      |
                      dotted_as_names< (any ',')* 'sys' (',' any)* >
                      )
                  >
              |
                  expr_stmt<
                      power< 'sys' trailer< '.' 'exitfunc' > >
                  '=' func=any >
              )
              """

    def __init__(self, *args):
        super(FixExitfunc, self).__init__(*args)

    def start_tree(self, tree, filename):
        super(FixExitfunc, self).start_tree(tree, filename)
        self.sys_import = None

    def transform(self, node, results):
        # First, find the sys import. We'll just hope it's global scope.
        if "sys_import" in results:
            if self.sys_import is None:
                self.sys_import = results["sys_import"]
            return

        func = results["func"].clone()
        func.prefix = ""
        register = pytree.Node(syms.power,
                               Attr(Name("atexit"), Name("register"))
                               )
        call = Call(register, [func], node.prefix)
        node.replace(call)

        if self.sys_import is None:
            # That's interesting.
            self.warning(node, "Can't find sys import; Please add an atexit "
                             "import at the top of your file.")
            return

        # Now add an atexit import after the sys import.
        names = self.sys_import.children[1]
        if names.type == syms.dotted_as_names:
            names.append_child(Comma())
            names.append_child(Name("atexit", " "))
        else:
            containing_stmt = self.sys_import.parent
            position = containing_stmt.children.index(self.sys_import)
            stmt_container = containing_stmt.parent
            new_import = pytree.Node(syms.import_name,
                              [Name("import"), Name("atexit", " ")]
                              )
            new = pytree.Node(syms.simple_stmt, [new_import])
            containing_stmt.insert_child(position + 1, Newline())
            containing_stmt.insert_child(position + 2, new)
PK(:�Z>ӵ;&&fix_itertools_imports.pynu�[���""" Fixer for imports of itertools.(imap|ifilter|izip|ifilterfalse) """

# Local imports
from lib2to3 import fixer_base
from lib2to3.fixer_util import BlankLine, syms, token


class FixItertoolsImports(fixer_base.BaseFix):
    BM_compatible = True
    PATTERN = """
              import_from< 'from' 'itertools' 'import' imports=any >
              """ %(locals())

    def transform(self, node, results):
        imports = results['imports']
        if imports.type == syms.import_as_name or not imports.children:
            children = [imports]
        else:
            children = imports.children
        for child in children[::2]:
            if child.type == token.NAME:
                member = child.value
                name_node = child
            elif child.type == token.STAR:
                # Just leave the import as is.
                return
            else:
                assert child.type == syms.import_as_name
                name_node = child.children[0]
            member_name = name_node.value
            if member_name in ('imap', 'izip', 'ifilter'):
                child.value = None
                child.remove()
            elif member_name in ('ifilterfalse', 'izip_longest'):
                node.changed()
                name_node.value = ('filterfalse' if member_name[1] == 'f'
                                   else 'zip_longest')

        # Make sure the import statement is still sane
        children = imports.children[:] or [imports]
        remove_comma = True
        for child in children:
            if remove_comma and child.type == token.COMMA:
                child.remove()
            else:
                remove_comma ^= True

        while children and children[-1].type == token.COMMA:
            children.pop().remove()

        # If there are no imports left, just get rid of the entire statement
        if (not (imports.children or getattr(imports, 'value', None)) or
            imports.parent is None):
            p = node.prefix
            node = BlankLine()
            node.prefix = p
            return node
PK(:�ZJ�b�BBfix_ws_comma.pynu�[���"""Fixer that changes 'a ,b' into 'a, b'.

This also changes '{a :b}' into '{a: b}', but does not touch other
uses of colons.  It does not touch other uses of whitespace.

"""

from .. import pytree
from ..pgen2 import token
from .. import fixer_base

class FixWsComma(fixer_base.BaseFix):

    explicit = True # The user must ask for this fixers

    PATTERN = """
    any<(not(',') any)+ ',' ((not(',') any)+ ',')* [not(',') any]>
    """

    COMMA = pytree.Leaf(token.COMMA, ",")
    COLON = pytree.Leaf(token.COLON, ":")
    SEPS = (COMMA, COLON)

    def transform(self, node, results):
        new = node.clone()
        comma = False
        for child in new.children:
            if child in self.SEPS:
                prefix = child.prefix
                if prefix.isspace() and "\n" not in prefix:
                    child.prefix = ""
                comma = True
            else:
                if comma:
                    prefix = child.prefix
                    if not prefix:
                        child.prefix = " "
                comma = False
        return new
PK(:�Z��NN
fix_buffer.pynu�[���# Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Fixer that changes buffer(...) into memoryview(...)."""

# Local imports
from .. import fixer_base
from ..fixer_util import Name


class FixBuffer(fixer_base.BaseFix):
    BM_compatible = True

    explicit = True # The user must ask for this fixer

    PATTERN = """
              power< name='buffer' trailer< '(' [any] ')' > any* >
              """

    def transform(self, node, results):
        name = results["name"]
        name.replace(Name("memoryview", prefix=name.prefix))
PK(:�Z+&^^fix_methodattrs.pynu�[���"""Fix bound method attributes (method.im_? -> method.__?__).
"""
# Author: Christian Heimes

# Local imports
from .. import fixer_base
from ..fixer_util import Name

MAP = {
    "im_func" : "__func__",
    "im_self" : "__self__",
    "im_class" : "__self__.__class__"
    }

class FixMethodattrs(fixer_base.BaseFix):
    BM_compatible = True
    PATTERN = """
    power< any+ trailer< '.' attr=('im_func' | 'im_self' | 'im_class') > any* >
    """

    def transform(self, node, results):
        attr = results["attr"][0]
        new = MAP[attr.value]
        attr.replace(Name(new, prefix=attr.prefix))
PK(:�Z'�� � 
fix_urllib.pynu�[���"""Fix changes imports of urllib which are now incompatible.
   This is rather similar to fix_imports, but because of the more
   complex nature of the fixing for urllib, it has its own fixer.
"""
# Author: Nick Edds

# Local imports
from lib2to3.fixes.fix_imports import alternates, FixImports
from lib2to3.fixer_util import (Name, Comma, FromImport, Newline,
                                find_indentation, Node, syms)

MAPPING = {"urllib":  [
                ("urllib.request",
                    ["URLopener", "FancyURLopener", "urlretrieve",
                     "_urlopener", "urlopen", "urlcleanup",
                     "pathname2url", "url2pathname"]),
                ("urllib.parse",
                    ["quote", "quote_plus", "unquote", "unquote_plus",
                     "urlencode", "splitattr", "splithost", "splitnport",
                     "splitpasswd", "splitport", "splitquery", "splittag",
                     "splittype", "splituser", "splitvalue", ]),
                ("urllib.error",
                    ["ContentTooShortError"])],
           "urllib2" : [
                ("urllib.request",
                    ["urlopen", "install_opener", "build_opener",
                     "Request", "OpenerDirector", "BaseHandler",
                     "HTTPDefaultErrorHandler", "HTTPRedirectHandler",
                     "HTTPCookieProcessor", "ProxyHandler",
                     "HTTPPasswordMgr",
                     "HTTPPasswordMgrWithDefaultRealm",
                     "AbstractBasicAuthHandler",
                     "HTTPBasicAuthHandler", "ProxyBasicAuthHandler",
                     "AbstractDigestAuthHandler",
                     "HTTPDigestAuthHandler", "ProxyDigestAuthHandler",
                     "HTTPHandler", "HTTPSHandler", "FileHandler",
                     "FTPHandler", "CacheFTPHandler",
                     "UnknownHandler"]),
                ("urllib.error",
                    ["URLError", "HTTPError"]),
           ]
}

# Duplicate the url parsing functions for urllib2.
MAPPING["urllib2"].append(MAPPING["urllib"][1])


def build_pattern():
    bare = set()
    for old_module, changes in MAPPING.items():
        for change in changes:
            new_module, members = change
            members = alternates(members)
            yield """import_name< 'import' (module=%r
                                  | dotted_as_names< any* module=%r any* >) >
                  """ % (old_module, old_module)
            yield """import_from< 'from' mod_member=%r 'import'
                       ( member=%s | import_as_name< member=%s 'as' any > |
                         import_as_names< members=any*  >) >
                  """ % (old_module, members, members)
            yield """import_from< 'from' module_star=%r 'import' star='*' >
                  """ % old_module
            yield """import_name< 'import'
                                  dotted_as_name< module_as=%r 'as' any > >
                  """ % old_module
            # bare_with_attr has a special significance for FixImports.match().
            yield """power< bare_with_attr=%r trailer< '.' member=%s > any* >
                  """ % (old_module, members)


class FixUrllib(FixImports):

    def build_pattern(self):
        return "|".join(build_pattern())

    def transform_import(self, node, results):
        """Transform for the basic import case. Replaces the old
           import name with a comma separated list of its
           replacements.
        """
        import_mod = results.get("module")
        pref = import_mod.prefix

        names = []

        # create a Node list of the replacement modules
        for name in MAPPING[import_mod.value][:-1]:
            names.extend([Name(name[0], prefix=pref), Comma()])
        names.append(Name(MAPPING[import_mod.value][-1][0], prefix=pref))
        import_mod.replace(names)

    def transform_member(self, node, results):
        """Transform for imports of specific module elements. Replaces
           the module to be imported from with the appropriate new
           module.
        """
        mod_member = results.get("mod_member")
        pref = mod_member.prefix
        member = results.get("member")

        # Simple case with only a single member being imported
        if member:
            # this may be a list of length one, or just a node
            if isinstance(member, list):
                member = member[0]
            new_name = None
            for change in MAPPING[mod_member.value]:
                if member.value in change[1]:
                    new_name = change[0]
                    break
            if new_name:
                mod_member.replace(Name(new_name, prefix=pref))
            else:
                self.cannot_convert(node, "This is an invalid module element")

        # Multiple members being imported
        else:
            # a dictionary for replacements, order matters
            modules = []
            mod_dict = {}
            members = results["members"]
            for member in members:
                # we only care about the actual members
                if member.type == syms.import_as_name:
                    as_name = member.children[2].value
                    member_name = member.children[0].value
                else:
                    member_name = member.value
                    as_name = None
                if member_name != ",":
                    for change in MAPPING[mod_member.value]:
                        if member_name in change[1]:
                            if change[0] not in mod_dict:
                                modules.append(change[0])
                            mod_dict.setdefault(change[0], []).append(member)

            new_nodes = []
            indentation = find_indentation(node)
            first = True
            def handle_name(name, prefix):
                if name.type == syms.import_as_name:
                    kids = [Name(name.children[0].value, prefix=prefix),
                            name.children[1].clone(),
                            name.children[2].clone()]
                    return [Node(syms.import_as_name, kids)]
                return [Name(name.value, prefix=prefix)]
            for module in modules:
                elts = mod_dict[module]
                names = []
                for elt in elts[:-1]:
                    names.extend(handle_name(elt, pref))
                    names.append(Comma())
                names.extend(handle_name(elts[-1], pref))
                new = FromImport(module, names)
                if not first or node.parent.prefix.endswith(indentation):
                    new.prefix = indentation
                new_nodes.append(new)
                first = False
            if new_nodes:
                nodes = []
                for new_node in new_nodes[:-1]:
                    nodes.extend([new_node, Newline()])
                nodes.append(new_nodes[-1])
                node.replace(nodes)
            else:
                self.cannot_convert(node, "All module elements are invalid")

    def transform_dot(self, node, results):
        """Transform for calls to module members in code."""
        module_dot = results.get("bare_with_attr")
        member = results.get("member")
        new_name = None
        if isinstance(member, list):
            member = member[0]
        for change in MAPPING[module_dot.value]:
            if member.value in change[1]:
                new_name = change[0]
                break
        if new_name:
            module_dot.replace(Name(new_name,
                                    prefix=module_dot.prefix))
        else:
            self.cannot_convert(node, "This is an invalid module element")

    def transform(self, node, results):
        if results.get("module"):
            self.transform_import(node, results)
        elif results.get("mod_member"):
            self.transform_member(node, results)
        elif results.get("bare_with_attr"):
            self.transform_dot(node, results)
        # Renaming and star imports are not supported for these modules.
        elif results.get("module_star"):
            self.cannot_convert(node, "Cannot handle star imports.")
        elif results.get("module_as"):
            self.cannot_convert(node, "This module is now multiple modules")
PK(:�Z�7h##
fix_future.pynu�[���"""Remove __future__ imports

from __future__ import foo is replaced with an empty line.
"""
# Author: Christian Heimes

# Local imports
from .. import fixer_base
from ..fixer_util import BlankLine

class FixFuture(fixer_base.BaseFix):
    BM_compatible = True

    PATTERN = """import_from< 'from' module_name="__future__" 'import' any >"""

    # This should be run last -- some things check for the import
    run_order = 10

    def transform(self, node, results):
        new = BlankLine()
        new.prefix = node.prefix
        return new
PK(:�Z�޽���fix_standarderror.pynu�[���# Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Fixer for StandardError -> Exception."""

# Local imports
from .. import fixer_base
from ..fixer_util import Name


class FixStandarderror(fixer_base.BaseFix):
    BM_compatible = True
    PATTERN = """
              'StandardError'
              """

    def transform(self, node, results):
        return Name("Exception", prefix=node.prefix)
PK(:�Z��M1		
fix_zip.pynu�[���"""
Fixer that changes zip(seq0, seq1, ...) into list(zip(seq0, seq1, ...)
unless there exists a 'from future_builtins import zip' statement in the
top-level namespace.

We avoid the transformation if the zip() call is directly contained in
iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or for V in <>:.
"""

# Local imports
from .. import fixer_base
from ..pytree import Node
from ..pygram import python_symbols as syms
from ..fixer_util import Name, ArgList, in_special_context


class FixZip(fixer_base.ConditionalFix):

    BM_compatible = True
    PATTERN = """
    power< 'zip' args=trailer< '(' [any] ')' > [trailers=trailer*]
    >
    """

    skip_on = "future_builtins.zip"

    def transform(self, node, results):
        if self.should_skip(node):
            return

        if in_special_context(node):
            return None

        args = results['args'].clone()
        args.prefix = ""

        trailers = []
        if 'trailers' in results:
            trailers = [n.clone() for n in results['trailers']]
            for n in trailers:
                n.prefix = ""

        new = Node(syms.power, [Name("zip"), args], prefix="")
        new = Node(syms.power, [Name("list"), ArgList([new])] + trailers)
        new.prefix = node.prefix
        return new
PK(:�Zܬ'!!fix_imports2.pynu�[���"""Fix incompatible imports and module references that must be fixed after
fix_imports."""
from . import fix_imports


MAPPING = {
            'whichdb': 'dbm',
            'anydbm': 'dbm',
          }


class FixImports2(fix_imports.FixImports):

    run_order = 7

    mapping = MAPPING
PK):�Z�:���fix_exec.pynu�[���# Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Fixer for exec.

This converts usages of the exec statement into calls to a built-in
exec() function.

exec code in ns1, ns2 -> exec(code, ns1, ns2)
"""

# Local imports
from .. import fixer_base
from ..fixer_util import Comma, Name, Call


class FixExec(fixer_base.BaseFix):
    BM_compatible = True

    PATTERN = """
    exec_stmt< 'exec' a=any 'in' b=any [',' c=any] >
    |
    exec_stmt< 'exec' (not atom<'(' [any] ')'>) a=any >
    """

    def transform(self, node, results):
        assert results
        syms = self.syms
        a = results["a"]
        b = results.get("b")
        c = results.get("c")
        args = [a.clone()]
        args[0].prefix = ""
        if b is not None:
            args.extend([Comma(), b.clone()])
        if c is not None:
            args.extend([Comma(), c.clone()])

        return Call(Name("exec"), args, prefix=node.prefix)
PK):�Z誔�*	*	fix_apply.pynu�[���# Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Fixer for apply().

This converts apply(func, v, k) into (func)(*v, **k)."""

# Local imports
from .. import pytree
from ..pgen2 import token
from .. import fixer_base
from ..fixer_util import Call, Comma, parenthesize

class FixApply(fixer_base.BaseFix):
    BM_compatible = True

    PATTERN = """
    power< 'apply'
        trailer<
            '('
            arglist<
                (not argument<NAME '=' any>) func=any ','
                (not argument<NAME '=' any>) args=any [','
                (not argument<NAME '=' any>) kwds=any] [',']
            >
            ')'
        >
    >
    """

    def transform(self, node, results):
        syms = self.syms
        assert results
        func = results["func"]
        args = results["args"]
        kwds = results.get("kwds")
        # I feel like we should be able to express this logic in the
        # PATTERN above but I don't know how to do it so...
        if args:
            if (args.type == self.syms.argument and
                args.children[0].value in {'**', '*'}):
                return  # Make no change.
        if kwds and (kwds.type == self.syms.argument and
                     kwds.children[0].value == '**'):
            return  # Make no change.
        prefix = node.prefix
        func = func.clone()
        if (func.type not in (token.NAME, syms.atom) and
            (func.type != syms.power or
             func.children[-2].type == token.DOUBLESTAR)):
            # Need to parenthesize
            func = parenthesize(func)
        func.prefix = ""
        args = args.clone()
        args.prefix = ""
        if kwds is not None:
            kwds = kwds.clone()
            kwds.prefix = ""
        l_newargs = [pytree.Leaf(token.STAR, "*"), args]
        if kwds is not None:
            l_newargs.extend([Comma(),
                              pytree.Leaf(token.DOUBLESTAR, "**"),
                              kwds])
            l_newargs[-2].prefix = " " # that's the ** token
        # XXX Sometimes we could be cleverer, e.g. apply(f, (x, y) + t)
        # can be translated into f(x, y, *t) instead of f(*(x, y) + t)
        #new = pytree.Node(syms.power, (func, ArgList(l_newargs)))
        return Call(func, l_newargs, prefix=prefix)
PK):�ZO�+��fix_tuple_params.pynu�[���"""Fixer for function definitions with tuple parameters.

def func(((a, b), c), d):
    ...

    ->

def func(x, d):
    ((a, b), c) = x
    ...

It will also support lambdas:

    lambda (x, y): x + y -> lambda t: t[0] + t[1]

    # The parens are a syntax error in Python 3
    lambda (x): x + y -> lambda x: x + y
"""
# Author: Collin Winter

# Local imports
from .. import pytree
from ..pgen2 import token
from .. import fixer_base
from ..fixer_util import Assign, Name, Newline, Number, Subscript, syms

def is_docstring(stmt):
    return isinstance(stmt, pytree.Node) and \
           stmt.children[0].type == token.STRING

class FixTupleParams(fixer_base.BaseFix):
    run_order = 4 #use a lower order since lambda is part of other
                  #patterns
    BM_compatible = True

    PATTERN = """
              funcdef< 'def' any parameters< '(' args=any ')' >
                       ['->' any] ':' suite=any+ >
              |
              lambda=
              lambdef< 'lambda' args=vfpdef< '(' inner=any ')' >
                       ':' body=any
              >
              """

    def transform(self, node, results):
        if "lambda" in results:
            return self.transform_lambda(node, results)

        new_lines = []
        suite = results["suite"]
        args = results["args"]
        # This crap is so "def foo(...): x = 5; y = 7" is handled correctly.
        # TODO(cwinter): suite-cleanup
        if suite[0].children[1].type == token.INDENT:
            start = 2
            indent = suite[0].children[1].value
            end = Newline()
        else:
            start = 0
            indent = "; "
            end = pytree.Leaf(token.INDENT, "")

        # We need access to self for new_name(), and making this a method
        #  doesn't feel right. Closing over self and new_lines makes the
        #  code below cleaner.
        def handle_tuple(tuple_arg, add_prefix=False):
            n = Name(self.new_name())
            arg = tuple_arg.clone()
            arg.prefix = ""
            stmt = Assign(arg, n.clone())
            if add_prefix:
                n.prefix = " "
            tuple_arg.replace(n)
            new_lines.append(pytree.Node(syms.simple_stmt,
                                         [stmt, end.clone()]))

        if args.type == syms.tfpdef:
            handle_tuple(args)
        elif args.type == syms.typedargslist:
            for i, arg in enumerate(args.children):
                if arg.type == syms.tfpdef:
                    # Without add_prefix, the emitted code is correct,
                    #  just ugly.
                    handle_tuple(arg, add_prefix=(i > 0))

        if not new_lines:
            return

        # This isn't strictly necessary, but it plays nicely with other fixers.
        # TODO(cwinter) get rid of this when children becomes a smart list
        for line in new_lines:
            line.parent = suite[0]

        # TODO(cwinter) suite-cleanup
        after = start
        if start == 0:
            new_lines[0].prefix = " "
        elif is_docstring(suite[0].children[start]):
            new_lines[0].prefix = indent
            after = start + 1

        for line in new_lines:
            line.parent = suite[0]
        suite[0].children[after:after] = new_lines
        for i in range(after+1, after+len(new_lines)+1):
            suite[0].children[i].prefix = indent
        suite[0].changed()

    def transform_lambda(self, node, results):
        args = results["args"]
        body = results["body"]
        inner = simplify_args(results["inner"])

        # Replace lambda ((((x)))): x  with lambda x: x
        if inner.type == token.NAME:
            inner = inner.clone()
            inner.prefix = " "
            args.replace(inner)
            return

        params = find_params(args)
        to_index = map_to_index(params)
        tup_name = self.new_name(tuple_name(params))

        new_param = Name(tup_name, prefix=" ")
        args.replace(new_param.clone())
        for n in body.post_order():
            if n.type == token.NAME and n.value in to_index:
                subscripts = [c.clone() for c in to_index[n.value]]
                new = pytree.Node(syms.power,
                                  [new_param.clone()] + subscripts)
                new.prefix = n.prefix
                n.replace(new)


### Helper functions for transform_lambda()

def simplify_args(node):
    if node.type in (syms.vfplist, token.NAME):
        return node
    elif node.type == syms.vfpdef:
        # These look like vfpdef< '(' x ')' > where x is NAME
        # or another vfpdef instance (leading to recursion).
        while node.type == syms.vfpdef:
            node = node.children[1]
        return node
    raise RuntimeError("Received unexpected node %s" % node)

def find_params(node):
    if node.type == syms.vfpdef:
        return find_params(node.children[1])
    elif node.type == token.NAME:
        return node.value
    return [find_params(c) for c in node.children if c.type != token.COMMA]

def map_to_index(param_list, prefix=[], d=None):
    if d is None:
        d = {}
    for i, obj in enumerate(param_list):
        trailer = [Subscript(Number(str(i)))]
        if isinstance(obj, list):
            map_to_index(obj, trailer, d=d)
        else:
            d[obj] = prefix + trailer
    return d

def tuple_name(param_list):
    l = []
    for obj in param_list:
        if isinstance(obj, list):
            l.append(tuple_name(obj))
        else:
            l.append(obj)
    return "_".join(l)
PK):�Z��w  fix_metaclass.pynu�[���"""Fixer for __metaclass__ = X -> (metaclass=X) methods.

   The various forms of classef (inherits nothing, inherits once, inherits
   many) don't parse the same in the CST so we look at ALL classes for
   a __metaclass__ and if we find one normalize the inherits to all be
   an arglist.

   For one-liner classes ('class X: pass') there is no indent/dedent so
   we normalize those into having a suite.

   Moving the __metaclass__ into the classdef can also cause the class
   body to be empty so there is some special casing for that as well.

   This fixer also tries very hard to keep original indenting and spacing
   in all those corner cases.

"""
# Author: Jack Diederich

# Local imports
from .. import fixer_base
from ..pygram import token
from ..fixer_util import syms, Node, Leaf


def has_metaclass(parent):
    """ we have to check the cls_node without changing it.
        There are two possibilities:
          1)  clsdef => suite => simple_stmt => expr_stmt => Leaf('__meta')
          2)  clsdef => simple_stmt => expr_stmt => Leaf('__meta')
    """
    for node in parent.children:
        if node.type == syms.suite:
            return has_metaclass(node)
        elif node.type == syms.simple_stmt and node.children:
            expr_node = node.children[0]
            if expr_node.type == syms.expr_stmt and expr_node.children:
                left_side = expr_node.children[0]
                if isinstance(left_side, Leaf) and \
                        left_side.value == '__metaclass__':
                    return True
    return False


def fixup_parse_tree(cls_node):
    """ one-line classes don't get a suite in the parse tree so we add
        one to normalize the tree
    """
    for node in cls_node.children:
        if node.type == syms.suite:
            # already in the preferred format, do nothing
            return

    # !%@#! oneliners have no suite node, we have to fake one up
    for i, node in enumerate(cls_node.children):
        if node.type == token.COLON:
            break
    else:
        raise ValueError("No class suite and no ':'!")

    # move everything into a suite node
    suite = Node(syms.suite, [])
    while cls_node.children[i+1:]:
        move_node = cls_node.children[i+1]
        suite.append_child(move_node.clone())
        move_node.remove()
    cls_node.append_child(suite)
    node = suite


def fixup_simple_stmt(parent, i, stmt_node):
    """ if there is a semi-colon all the parts count as part of the same
        simple_stmt.  We just want the __metaclass__ part so we move
        everything after the semi-colon into its own simple_stmt node
    """
    for semi_ind, node in enumerate(stmt_node.children):
        if node.type == token.SEMI: # *sigh*
            break
    else:
        return

    node.remove() # kill the semicolon
    new_expr = Node(syms.expr_stmt, [])
    new_stmt = Node(syms.simple_stmt, [new_expr])
    while stmt_node.children[semi_ind:]:
        move_node = stmt_node.children[semi_ind]
        new_expr.append_child(move_node.clone())
        move_node.remove()
    parent.insert_child(i, new_stmt)
    new_leaf1 = new_stmt.children[0].children[0]
    old_leaf1 = stmt_node.children[0].children[0]
    new_leaf1.prefix = old_leaf1.prefix


def remove_trailing_newline(node):
    if node.children and node.children[-1].type == token.NEWLINE:
        node.children[-1].remove()


def find_metas(cls_node):
    # find the suite node (Mmm, sweet nodes)
    for node in cls_node.children:
        if node.type == syms.suite:
            break
    else:
        raise ValueError("No class suite!")

    # look for simple_stmt[ expr_stmt[ Leaf('__metaclass__') ] ]
    for i, simple_node in list(enumerate(node.children)):
        if simple_node.type == syms.simple_stmt and simple_node.children:
            expr_node = simple_node.children[0]
            if expr_node.type == syms.expr_stmt and expr_node.children:
                # Check if the expr_node is a simple assignment.
                left_node = expr_node.children[0]
                if isinstance(left_node, Leaf) and \
                        left_node.value == '__metaclass__':
                    # We found an assignment to __metaclass__.
                    fixup_simple_stmt(node, i, simple_node)
                    remove_trailing_newline(simple_node)
                    yield (node, i, simple_node)


def fixup_indent(suite):
    """ If an INDENT is followed by a thing with a prefix then nuke the prefix
        Otherwise we get in trouble when removing __metaclass__ at suite start
    """
    kids = suite.children[::-1]
    # find the first indent
    while kids:
        node = kids.pop()
        if node.type == token.INDENT:
            break

    # find the first Leaf
    while kids:
        node = kids.pop()
        if isinstance(node, Leaf) and node.type != token.DEDENT:
            if node.prefix:
                node.prefix = ''
            return
        else:
            kids.extend(node.children[::-1])


class FixMetaclass(fixer_base.BaseFix):
    BM_compatible = True

    PATTERN = """
    classdef<any*>
    """

    def transform(self, node, results):
        if not has_metaclass(node):
            return

        fixup_parse_tree(node)

        # find metaclasses, keep the last one
        last_metaclass = None
        for suite, i, stmt in find_metas(node):
            last_metaclass = stmt
            stmt.remove()

        text_type = node.children[0].type # always Leaf(nnn, 'class')

        # figure out what kind of classdef we have
        if len(node.children) == 7:
            # Node(classdef, ['class', 'name', '(', arglist, ')', ':', suite])
            #                 0        1       2    3        4    5    6
            if node.children[3].type == syms.arglist:
                arglist = node.children[3]
            # Node(classdef, ['class', 'name', '(', 'Parent', ')', ':', suite])
            else:
                parent = node.children[3].clone()
                arglist = Node(syms.arglist, [parent])
                node.set_child(3, arglist)
        elif len(node.children) == 6:
            # Node(classdef, ['class', 'name', '(',  ')', ':', suite])
            #                 0        1       2     3    4    5
            arglist = Node(syms.arglist, [])
            node.insert_child(3, arglist)
        elif len(node.children) == 4:
            # Node(classdef, ['class', 'name', ':', suite])
            #                 0        1       2    3
            arglist = Node(syms.arglist, [])
            node.insert_child(2, Leaf(token.RPAR, ')'))
            node.insert_child(2, arglist)
            node.insert_child(2, Leaf(token.LPAR, '('))
        else:
            raise ValueError("Unexpected class definition")

        # now stick the metaclass in the arglist
        meta_txt = last_metaclass.children[0].children[0]
        meta_txt.value = 'metaclass'
        orig_meta_prefix = meta_txt.prefix

        if arglist.children:
            arglist.append_child(Leaf(token.COMMA, ','))
            meta_txt.prefix = ' '
        else:
            meta_txt.prefix = ''

        # compact the expression "metaclass = Meta" -> "metaclass=Meta"
        expr_stmt = last_metaclass.children[0]
        assert expr_stmt.type == syms.expr_stmt
        expr_stmt.children[1].prefix = ''
        expr_stmt.children[2].prefix = ''

        arglist.append_child(last_metaclass)

        fixup_indent(suite)

        # check for empty suite
        if not suite.children:
            # one-liner that was just __metaclass_
            suite.remove()
            pass_leaf = Leaf(text_type, 'pass')
            pass_leaf.prefix = orig_meta_prefix
            node.append_child(pass_leaf)
            node.append_child(Leaf(token.NEWLINE, '\n'))

        elif len(suite.children) > 1 and \
                 (suite.children[-2].type == token.INDENT and
                  suite.children[-1].type == token.DEDENT):
            # there was only one line in the class body and it was __metaclass__
            pass_leaf = Leaf(text_type, 'pass')
            suite.insert_child(-1, pass_leaf)
            suite.insert_child(-1, Leaf(token.NEWLINE, '\n'))
PK):�Z�f�ϡ�fix_set_literal.pynu�[���"""
Optional fixer to transform set() calls to set literals.
"""

# Author: Benjamin Peterson

from lib2to3 import fixer_base, pytree
from lib2to3.fixer_util import token, syms



class FixSetLiteral(fixer_base.BaseFix):

    BM_compatible = True
    explicit = True

    PATTERN = """power< 'set' trailer< '('
                     (atom=atom< '[' (items=listmaker< any ((',' any)* [',']) >
                                |
                                single=any) ']' >
                     |
                     atom< '(' items=testlist_gexp< any ((',' any)* [',']) > ')' >
                     )
                     ')' > >
              """

    def transform(self, node, results):
        single = results.get("single")
        if single:
            # Make a fake listmaker
            fake = pytree.Node(syms.listmaker, [single.clone()])
            single.replace(fake)
            items = fake
        else:
            items = results["items"]

        # Build the contents of the literal
        literal = [pytree.Leaf(token.LBRACE, "{")]
        literal.extend(n.clone() for n in items.children)
        literal.append(pytree.Leaf(token.RBRACE, "}"))
        # Set the prefix of the right brace to that of the ')' or ']'
        literal[-1].prefix = items.next_sibling.prefix
        maker = pytree.Node(syms.dictsetmaker, literal)
        maker.prefix = node.prefix

        # If the original was a one tuple, we need to remove the extra comma.
        if len(maker.children) == 4:
            n = maker.children[2]
            n.remove()
            maker.children[-1].prefix = n.prefix

        # Finally, replace the set call with our shiny new literal.
        return maker
PK):�Z���I

fix_sys_exc.pynu�[���"""Fixer for sys.exc_{type, value, traceback}

sys.exc_type -> sys.exc_info()[0]
sys.exc_value -> sys.exc_info()[1]
sys.exc_traceback -> sys.exc_info()[2]
"""

# By Jeff Balogh and Benjamin Peterson

# Local imports
from .. import fixer_base
from ..fixer_util import Attr, Call, Name, Number, Subscript, Node, syms

class FixSysExc(fixer_base.BaseFix):
    # This order matches the ordering of sys.exc_info().
    exc_info = ["exc_type", "exc_value", "exc_traceback"]
    BM_compatible = True
    PATTERN = """
              power< 'sys' trailer< dot='.' attribute=(%s) > >
              """ % '|'.join("'%s'" % e for e in exc_info)

    def transform(self, node, results):
        sys_attr = results["attribute"][0]
        index = Number(self.exc_info.index(sys_attr.value))

        call = Call(Name("exc_info"), prefix=sys_attr.prefix)
        attr = Attr(Name("sys"), call)
        attr[1].children[0].prefix = results["dot"].prefix
        attr.append(Subscript(index))
        return Node(syms.power, attr, prefix=node.prefix)
PK):�Za�.�eefix_repr.pynu�[���# Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Fixer that transforms `xyzzy` into repr(xyzzy)."""

# Local imports
from .. import fixer_base
from ..fixer_util import Call, Name, parenthesize


class FixRepr(fixer_base.BaseFix):

    BM_compatible = True
    PATTERN = """
              atom < '`' expr=any '`' >
              """

    def transform(self, node, results):
        expr = results["expr"].clone()

        if expr.type == self.syms.testlist1:
            expr = parenthesize(expr)
        return Call(Name("repr"), [expr], prefix=node.prefix)
PK):�Z�&���fix_unicode.pynu�[���r"""Fixer for unicode.

* Changes unicode to str and unichr to chr.

* If "...\u..." is not unicode literal change it into "...\\u...".

* Change u"..." into "...".

"""

from ..pgen2 import token
from .. import fixer_base

_mapping = {"unichr" : "chr", "unicode" : "str"}

class FixUnicode(fixer_base.BaseFix):
    BM_compatible = True
    PATTERN = "STRING | 'unicode' | 'unichr'"

    def start_tree(self, tree, filename):
        super(FixUnicode, self).start_tree(tree, filename)
        self.unicode_literals = 'unicode_literals' in tree.future_features

    def transform(self, node, results):
        if node.type == token.NAME:
            new = node.clone()
            new.value = _mapping[node.value]
            return new
        elif node.type == token.STRING:
            val = node.value
            if not self.unicode_literals and val[0] in '\'"' and '\\' in val:
                val = r'\\'.join([
                    v.replace('\\u', r'\\u').replace('\\U', r'\\U')
                    for v in val.split(r'\\')
                ])
            if val[0] in 'uU':
                val = val[1:]
            if val == node.value:
                return node
            new = node.clone()
            new.value = val
            return new
PK):�ZGg��fix_itertools.pynu�[���""" Fixer for itertools.(imap|ifilter|izip) --> (map|filter|zip) and
    itertools.ifilterfalse --> itertools.filterfalse (bugs 2360-2363)

    imports from itertools are fixed in fix_itertools_import.py

    If itertools is imported as something else (ie: import itertools as it;
    it.izip(spam, eggs)) method calls will not get fixed.
    """

# Local imports
from .. import fixer_base
from ..fixer_util import Name

class FixItertools(fixer_base.BaseFix):
    BM_compatible = True
    it_funcs = "('imap'|'ifilter'|'izip'|'izip_longest'|'ifilterfalse')"
    PATTERN = """
              power< it='itertools'
                  trailer<
                     dot='.' func=%(it_funcs)s > trailer< '(' [any] ')' > >
              |
              power< func=%(it_funcs)s trailer< '(' [any] ')' > >
              """ %(locals())

    # Needs to be run after fix_(map|zip|filter)
    run_order = 6

    def transform(self, node, results):
        prefix = None
        func = results['func'][0]
        if ('it' in results and
            func.value not in ('ifilterfalse', 'izip_longest')):
            dot, it = (results['dot'], results['it'])
            # Remove the 'itertools'
            prefix = it.prefix
            it.remove()
            # Replace the node which contains ('.', 'function') with the
            # function (to be consistent with the second part of the pattern)
            dot.remove()
            func.parent.replace(func)

        prefix = prefix or func.prefix
        func.replace(Name(func.value[1:], prefix=prefix))
PK):�Z�?k��fix_getcwdu.pynu�[���"""
Fixer that changes os.getcwdu() to os.getcwd().
"""
# Author: Victor Stinner

# Local imports
from .. import fixer_base
from ..fixer_util import Name

class FixGetcwdu(fixer_base.BaseFix):
    BM_compatible = True

    PATTERN = """
              power< 'os' trailer< dot='.' name='getcwdu' > any* >
              """

    def transform(self, node, results):
        name = results["name"]
        name.replace(Name("getcwd", prefix=name.prefix))
PK):�Z�{Wkfix_execfile.pynu�[���# Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Fixer for execfile.

This converts usages of the execfile function into calls to the built-in
exec() function.
"""

from .. import fixer_base
from ..fixer_util import (Comma, Name, Call, LParen, RParen, Dot, Node,
                          ArgList, String, syms)


class FixExecfile(fixer_base.BaseFix):
    BM_compatible = True

    PATTERN = """
    power< 'execfile' trailer< '(' arglist< filename=any [',' globals=any [',' locals=any ] ] > ')' > >
    |
    power< 'execfile' trailer< '(' filename=any ')' > >
    """

    def transform(self, node, results):
        assert results
        filename = results["filename"]
        globals = results.get("globals")
        locals = results.get("locals")

        # Copy over the prefix from the right parentheses end of the execfile
        # call.
        execfile_paren = node.children[-1].children[-1].clone()
        # Construct open().read().
        open_args = ArgList([filename.clone(), Comma(), String('"rb"', ' ')],
                            rparen=execfile_paren)
        open_call = Node(syms.power, [Name("open"), open_args])
        read = [Node(syms.trailer, [Dot(), Name('read')]),
                Node(syms.trailer, [LParen(), RParen()])]
        open_expr = [open_call] + read
        # Wrap the open call in a compile call. This is so the filename will be
        # preserved in the execed code.
        filename_arg = filename.clone()
        filename_arg.prefix = " "
        exec_str = String("'exec'", " ")
        compile_args = open_expr + [Comma(), filename_arg, Comma(), exec_str]
        compile_call = Call(Name("compile"), compile_args, "")
        # Finally, replace the execfile call with an exec call.
        args = [compile_call]
        if globals is not None:
            args.extend([Comma(), globals.clone()])
        if locals is not None:
            args.extend([Comma(), locals.clone()])
        return Call(Name("exec"), args, prefix=node.prefix)
PK):�Zi�G���fix_long.pynu�[���# Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Fixer that turns 'long' into 'int' everywhere.
"""

# Local imports
from lib2to3 import fixer_base
from lib2to3.fixer_util import is_probably_builtin


class FixLong(fixer_base.BaseFix):
    BM_compatible = True
    PATTERN = "'long'"

    def transform(self, node, results):
        if is_probably_builtin(node):
            node.value = "int"
            node.changed()
PK):�ZH��gHHfix_isinstance.pynu�[���# Copyright 2008 Armin Ronacher.
# Licensed to PSF under a Contributor Agreement.

"""Fixer that cleans up a tuple argument to isinstance after the tokens
in it were fixed.  This is mainly used to remove double occurrences of
tokens as a leftover of the long -> int / unicode -> str conversion.

eg.  isinstance(x, (int, long)) -> isinstance(x, (int, int))
       -> isinstance(x, int)
"""

from .. import fixer_base
from ..fixer_util import token


class FixIsinstance(fixer_base.BaseFix):
    BM_compatible = True
    PATTERN = """
    power<
        'isinstance'
        trailer< '(' arglist< any ',' atom< '('
            args=testlist_gexp< any+ >
        ')' > > ')' >
    >
    """

    run_order = 6

    def transform(self, node, results):
        names_inserted = set()
        testlist = results["args"]
        args = testlist.children
        new_args = []
        iterator = enumerate(args)
        for idx, arg in iterator:
            if arg.type == token.NAME and arg.value in names_inserted:
                if idx < len(args) - 1 and args[idx + 1].type == token.COMMA:
                    next(iterator)
                    continue
            else:
                new_args.append(arg)
                if arg.type == token.NAME:
                    names_inserted.add(arg.value)
        if new_args and new_args[-1].type == token.COMMA:
            del new_args[-1]
        if len(new_args) == 1:
            atom = testlist.parent
            new_args[0].prefix = atom.prefix
            atom.replace(new_args[0])
        else:
            args[:] = new_args
            node.changed()
PK):�Z�<��;;	fix_ne.pynu�[���# Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.

"""Fixer that turns <> into !=."""

# Local imports
from .. import pytree
from ..pgen2 import token
from .. import fixer_base


class FixNe(fixer_base.BaseFix):
    # This is so simple that we don't need the pattern compiler.

    _accept_type = token.NOTEQUAL

    def match(self, node):
        # Override
        return node.value == "<>"

    def transform(self, node, results):
        new = pytree.Leaf(token.NOTEQUAL, "!=", prefix=node.prefix)
        return new
PK):�Z?���OOfix_nonzero.pynu�[���"""Fixer for __nonzero__ -> __bool__ methods."""
# Author: Collin Winter

# Local imports
from .. import fixer_base
from ..fixer_util import Name

class FixNonzero(fixer_base.BaseFix):
    BM_compatible = True
    PATTERN = """
    classdef< 'class' any+ ':'
              suite< any*
                     funcdef< 'def' name='__nonzero__'
                              parameters< '(' NAME ')' > any+ >
                     any* > >
    """

    def transform(self, node, results):
        name = results["name"]
        new = Name("__bool__", prefix=name.prefix)
        name.replace(new)
PK):�ZF����fix_funcattrs.pynu�[���"""Fix function attribute names (f.func_x -> f.__x__)."""
# Author: Collin Winter

# Local imports
from .. import fixer_base
from ..fixer_util import Name


class FixFuncattrs(fixer_base.BaseFix):
    BM_compatible = True

    PATTERN = """
    power< any+ trailer< '.' attr=('func_closure' | 'func_doc' | 'func_globals'
                                  | 'func_name' | 'func_defaults' | 'func_code'
                                  | 'func_dict') > any* >
    """

    def transform(self, node, results):
        attr = results["attr"][0]
        attr.replace(Name(("__%s__" % attr.value[5:]),
                          prefix=attr.prefix))
PK):�Z6ng��
fix_import.pynu�[���"""Fixer for import statements.
If spam is being imported from the local directory, this import:
    from spam import eggs
Becomes:
    from .spam import eggs

And this import:
    import spam
Becomes:
    from . import spam
"""

# Local imports
from .. import fixer_base
from os.path import dirname, join, exists, sep
from ..fixer_util import FromImport, syms, token


def traverse_imports(names):
    """
    Walks over all the names imported in a dotted_as_names node.
    """
    pending = [names]
    while pending:
        node = pending.pop()
        if node.type == token.NAME:
            yield node.value
        elif node.type == syms.dotted_name:
            yield "".join([ch.value for ch in node.children])
        elif node.type == syms.dotted_as_name:
            pending.append(node.children[0])
        elif node.type == syms.dotted_as_names:
            pending.extend(node.children[::-2])
        else:
            raise AssertionError("unknown node type")


class FixImport(fixer_base.BaseFix):
    BM_compatible = True

    PATTERN = """
    import_from< 'from' imp=any 'import' ['('] any [')'] >
    |
    import_name< 'import' imp=any >
    """

    def start_tree(self, tree, name):
        super(FixImport, self).start_tree(tree, name)
        self.skip = "absolute_import" in tree.future_features

    def transform(self, node, results):
        if self.skip:
            return
        imp = results['imp']

        if node.type == syms.import_from:
            # Some imps are top-level (eg: 'import ham')
            # some are first level (eg: 'import ham.eggs')
            # some are third level (eg: 'import ham.eggs as spam')
            # Hence, the loop
            while not hasattr(imp, 'value'):
                imp = imp.children[0]
            if self.probably_a_local_import(imp.value):
                imp.value = "." + imp.value
                imp.changed()
        else:
            have_local = False
            have_absolute = False
            for mod_name in traverse_imports(imp):
                if self.probably_a_local_import(mod_name):
                    have_local = True
                else:
                    have_absolute = True
            if have_absolute:
                if have_local:
                    # We won't handle both sibling and absolute imports in the
                    # same statement at the moment.
                    self.warning(node, "absolute and local imports together")
                return

            new = FromImport(".", [imp])
            new.prefix = node.prefix
            return new

    def probably_a_local_import(self, imp_name):
        if imp_name.startswith("."):
            # Relative imports are certainly not local imports.
            return False
        imp_name = imp_name.split(".", 1)[0]
        base_path = dirname(self.filename)
        base_path = join(base_path, imp_name)
        # If there is no __init__.py next to the file its not in a package
        # so can't be a relative import.
        if not exists(join(dirname(base_path), "__init__.py")):
            return False
        for ext in [".py", sep, ".pyc", ".so", ".sl", ".pyd"]:
            if exists(base_path + ext):
                return True
        return False
PK�E[5ڍ_(__pycache__/fix_map.cpython-36.opt-1.pycnu�[���3


 \8�@sfdZddlmZddlmZddlmZmZmZm	Z	m
Z
ddlmZ
ddlmZGdd�dej�Zd	S)
aFixer that changes map(F, ...) into list(map(F, ...)) unless there
exists a 'from future_builtins import map' statement in the top-level
namespace.

As a special case, map(None, X) is changed into list(X).  (This is
necessary because the semantics are changed in this case -- the new
map(None, X) is equivalent to [(x,) for x in X].)

We avoid the transformation (except for the special case mentioned
above) if the map() call is directly contained in iter(<>), list(<>),
tuple(<>), sorted(<>), ...join(<>), or for V in <>:.

NOTE: This is still not correct if the original code was depending on
map(F, X, Y, ...) to go on until the longest argument is exhausted,
substituting None for missing values -- like zip(), it now stops as
soon as the shortest argument is exhausted.
�)�token)�
fixer_base)�Name�ArgList�Call�ListComp�in_special_context)�python_symbols)�Nodec@s eZdZdZdZdZdd�ZdS)�FixMapTaL
    map_none=power<
        'map'
        trailer< '(' arglist< 'None' ',' arg=any [','] > ')' >
        [extra_trailers=trailer*]
    >
    |
    map_lambda=power<
        'map'
        trailer<
            '('
            arglist<
                lambdef< 'lambda'
                         (fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any
                >
                ','
                it=any
            >
            ')'
        >
        [extra_trailers=trailer*]
    >
    |
    power<
        'map' args=trailer< '(' [any] ')' >
        [extra_trailers=trailer*]
    >
    zfuture_builtins.mapcCs�|j|�rdSg}d|kr:x|dD]}|j|j��q$W|jjtjkrv|j|d�|j�}d|_t	t
d�|g�}�n&d|kr�t|dj�|dj�|dj��}ttj
|g|dd	�}n�d
|kr�|dj�}d|_n�d|k�rj|d}|jtjk�rL|jd
jtjk�rL|jd
jdjtjk�rL|jd
jdjdk�rL|j|d�dSttj
t
d�|j�g�}d|_t|��rxdSttj
t
d�t|g�g|�}d|_|j|_|S)NZextra_trailerszYou should use a for loop here��listZ
map_lambdaZxp�fp�it)�prefixZmap_none�arg�args���Nonezjcannot convert map(None, ...) with multiple arguments because map() now truncates to the shortest sequence�map)Zshould_skip�appendZclone�parent�type�symsZsimple_stmtZwarningrrrrr
ZpowerZtrailerZchildrenZarglistr�NAME�valuerr)�selfZnodeZresultsZtrailers�t�newr�r �-/usr/lib64/python3.6/lib2to3/fixes/fix_map.py�	transform@sF



zFixMap.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onr"r r r r!rsrN)�__doc__Zpgen2rrrZ
fixer_utilrrrrrZpygramr	rZpytreer
ZConditionalFixrr r r r!�<module>sPK�E[�#���*__pycache__/fix_numliterals.cpython-36.pycnu�[���3


 \�@s>dZddlmZddlmZddlmZGdd�dej�ZdS)z-Fixer that turns 1L into 1, 0755 into 0o755.
�)�token)�
fixer_base)�Numberc@s"eZdZejZdd�Zdd�ZdS)�FixNumliteralscCs|jjd�p|jddkS)N�0��Ll���)�value�
startswith)�self�node�r�5/usr/lib64/python3.6/lib2to3/fixes/fix_numliterals.py�matchszFixNumliterals.matchcCs`|j}|ddkr |dd�}n2|jd�rR|j�rRtt|��dkrRd|dd�}t||jd�S)NrrrZ0o)�prefixr	r	)r
r�isdigit�len�setrr)rr
Zresults�valrrr�	transforms"zFixNumliterals.transformN)�__name__�
__module__�__qualname__r�NUMBERZ_accept_typerrrrrrrsrN)	�__doc__Zpgen2r�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK�E[K�t�!!+__pycache__/fix_urllib.cpython-36.opt-2.pycnu�[���3


 \� �@s�ddlmZmZddlmZmZmZmZmZm	Z	m
Z
ddddddd	d
dgfdd
ddddddddddddddgfddgfgddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4gfdd5d6gfgd7�Zed8jed9d:�d;d<�Z
Gd=d>�d>e�Zd?S)@�)�
alternates�
FixImports)�Name�Comma�
FromImport�Newline�find_indentation�Node�symszurllib.requestZ	URLopenerZFancyURLopenerZurlretrieveZ
_urlopenerZurlopenZ
urlcleanupZpathname2urlZurl2pathnamezurllib.parseZquoteZ
quote_plusZunquoteZunquote_plusZ	urlencodeZ	splitattrZ	splithostZ
splitnportZsplitpasswdZ	splitportZ
splitqueryZsplittagZ	splittypeZ	splituserZ
splitvaluezurllib.errorZContentTooShortErrorZinstall_openerZbuild_openerZRequestZOpenerDirectorZBaseHandlerZHTTPDefaultErrorHandlerZHTTPRedirectHandlerZHTTPCookieProcessorZProxyHandlerZHTTPPasswordMgrZHTTPPasswordMgrWithDefaultRealmZAbstractBasicAuthHandlerZHTTPBasicAuthHandlerZProxyBasicAuthHandlerZAbstractDigestAuthHandlerZHTTPDigestAuthHandlerZProxyDigestAuthHandlerZHTTPHandlerZHTTPSHandlerZFileHandlerZ
FTPHandlerZCacheFTPHandlerZUnknownHandlerZURLErrorZ	HTTPError)�urllib�urllib2rr�ccs~t�}xrtj�D]f\}}x\|D]T}|\}}t|�}d||fVd|||fVd|Vd|Vd||fVqWqWdS)Nz�import_name< 'import' (module=%r
                                  | dotted_as_names< any* module=%r any* >) >
                  z�import_from< 'from' mod_member=%r 'import'
                       ( member=%s | import_as_name< member=%s 'as' any > |
                         import_as_names< members=any*  >) >
                  zIimport_from< 'from' module_star=%r 'import' star='*' >
                  ztimport_name< 'import'
                                  dotted_as_name< module_as=%r 'as' any > >
                  zKpower< bare_with_attr=%r trailer< '.' member=%s > any* >
                  )�set�MAPPING�itemsr)ZbareZ
old_moduleZchanges�changeZ
new_module�members�r�0/usr/lib64/python3.6/lib2to3/fixes/fix_urllib.py�
build_pattern0s


rc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�	FixUrllibcCsdjt��S)N�|)�joinr)�selfrrrrIszFixUrllib.build_patterncCsz|jd�}|j}g}x6t|jdd�D] }|jt|d|d�t�g�q(W|jtt|jdd|d��|j|�dS)N�moduler
r)�prefix���r)	�getrr�value�extendrr�append�replace)r�node�resultsZ
import_mod�pref�names�namerrr�transform_importLs
  zFixUrllib.transform_importcCs>|jd�}|j}|jd�}|r�t|t�r0|d}d}x*t|jD]}|j|dkr@|d}Pq@W|rx|jt||d��n|j|d��n�g}i}	|d}
x�|
D]�}|j	t
jkr�|jdj}|jdj}n
|j}d}|d	kr�xPt|jD]B}||dkr�|d|	k�r|j
|d�|	j|dg�j
|�q�Wq�Wg}
t|�}d
}dd�}x�|D]�}|	|}g}x2|dd�D]"}|j|||��|j
t���qlW|j||d|��t||�}|�s�|jjj|��r�||_|
j
|�d
}�qNW|
�r.g}x&|
dd�D]}|j|t�g��q�W|j
|
d�|j|�n|j|d�dS)N�
mod_member�memberrr
)rz!This is an invalid module elementr��,TcSsX|jtjkrHt|jdj|d�|jdj�|jdj�g}ttj|�gSt|j|d�gS)Nr)rr
r*)�typer
�import_as_namer�childrenrZcloner	)r&rZkidsrrr�handle_name�sz/FixUrllib.transform_member.<locals>.handle_nameFzAll module elements are invalidrrrr)rr�
isinstance�listrrr!r�cannot_convertr,r
r-r.r �
setdefaultrrrr�parent�endswithr)rr"r#r(r$r)�new_namer�modulesZmod_dictrZas_name�member_nameZ	new_nodesZindentation�firstr/rZeltsr%Zelt�newZnodesZnew_noderrr�transform_member\sh







zFixUrllib.transform_membercCs�|jd�}|jd�}d}t|t�r*|d}x*t|jD]}|j|dkr6|d}Pq6W|rp|jt||jd��n|j|d�dS)N�bare_with_attrr)rr
)rz!This is an invalid module element)	rr0r1rrr!rrr2)rr"r#Z
module_dotr)r6rrrr�
transform_dot�s


zFixUrllib.transform_dotcCsz|jd�r|j||�n^|jd�r0|j||�nF|jd�rH|j||�n.|jd�r`|j|d�n|jd�rv|j|d�dS)Nrr(r<Zmodule_starzCannot handle star imports.Z	module_asz#This module is now multiple modules)rr'r;r=r2)rr"r#rrr�	transform�s




zFixUrllib.transformN)�__name__�
__module__�__qualname__rr'r;r=r>rrrrrGs
LrN)Zlib2to3.fixes.fix_importsrrZlib2to3.fixer_utilrrrrrr	r
rr rrrrrr�<module>s>$
PK�E[Cy�F��*__pycache__/fix_paren.cpython-36.opt-2.pycnu�[���3


 \��@s2ddlmZddlmZmZGdd�dej�ZdS)�)�
fixer_base)�LParen�RParenc@seZdZdZdZdd�ZdS)�FixParenTa
        atom< ('[' | '(')
            (listmaker< any
                comp_for<
                    'for' NAME 'in'
                    target=testlist_safe< any (',' any)+ [',']
                     >
                    [any]
                >
            >
            |
            testlist_gexp< any
                comp_for<
                    'for' NAME 'in'
                    target=testlist_safe< any (',' any)+ [',']
                     >
                    [any]
                >
            >)
        (']' | ')') >
    cCs8|d}t�}|j|_d|_|jd|�|jt��dS)N�target��)r�prefixZinsert_childZappend_childr)�selfZnodeZresultsrZlparen�r�//usr/lib64/python3.6/lib2to3/fixes/fix_paren.py�	transform%szFixParen.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrrrsrN)rrZ
fixer_utilrrZBaseFixrrrrr�<module>sPK�E[�rD���0__pycache__/fix_methodattrs.cpython-36.opt-1.pycnu�[���3


 \^�@s>dZddlmZddlmZdddd�ZGdd	�d	ej�Zd
S)z;Fix bound method attributes (method.im_? -> method.__?__).
�)�
fixer_base)�Name�__func__�__self__z__self__.__class__)Zim_funcZim_selfZim_classc@seZdZdZdZdd�ZdS)�FixMethodattrsTzU
    power< any+ trailer< '.' attr=('im_func' | 'im_self' | 'im_class') > any* >
    cCs.|dd}t|j}|jt||jd��dS)N�attr�)�prefix)�MAP�value�replacerr	)�selfZnodeZresultsr�new�r�5/usr/lib64/python3.6/lib2to3/fixes/fix_methodattrs.py�	transforms
zFixMethodattrs.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)�__doc__�rZ
fixer_utilrr
ZBaseFixrrrrr�<module>sPK�E[�N���#__pycache__/fix_dict.cpython-36.pycnu�[���3


 \��@sjdZddlmZddlmZddlmZddlmZmZmZddlmZej	dhBZ
Gdd	�d	ej�Zd
S)ajFixer for dict methods.

d.keys() -> list(d.keys())
d.items() -> list(d.items())
d.values() -> list(d.values())

d.iterkeys() -> iter(d.keys())
d.iteritems() -> iter(d.items())
d.itervalues() -> iter(d.values())

d.viewkeys() -> d.keys()
d.viewitems() -> d.items()
d.viewvalues() -> d.values()

Except in certain very specific contexts: the iter() can be dropped
when the context is list(), sorted(), iter() or for...in; the list()
can be dropped when the context is list() or sorted() (but not iter()
or for...in!). Special contexts that apply to both: list(), sorted(), tuple()
set(), any(), all(), sum().

Note: iter(d.keys()) could be written as iter(d) but since the
original d.iterkeys() was also redundant we don't fix this.  And there
are (rare) contexts where it makes a difference (e.g. when passing it
as an argument to a function that introspects the argument).
�)�pytree)�patcomp)�
fixer_base)�Name�Call�Dot)�
fixer_util�iterc@s@eZdZdZdZdd�ZdZeje�Z	dZ
eje
�Zdd�Zd	S)
�FixDictTa
    power< head=any+
         trailer< '.' method=('keys'|'items'|'values'|
                              'iterkeys'|'iteritems'|'itervalues'|
                              'viewkeys'|'viewitems'|'viewvalues') >
         parens=trailer< '(' ')' >
         tail=any*
    >
    c
Cs|d}|dd}|d}|j}|j}|jd�}|jd�}	|sD|	rP|dd�}|dksdtt|���dd�|D�}d
d�|D�}|o�|j||�}
|tj|jt	�t
||jd�g�|dj�g}tj|j
|�}|
p�|	s�d|_tt
|r�dnd�|g�}|�rtj|j
|g|�}|j|_|S)N�head�method��tailr	Zview��keys�items�valuescSsg|]}|j��qS�)�clone)�.0�nrr�./usr/lib64/python3.6/lib2to3/fixes/fix_dict.py�
<listcomp>Asz%FixDict.transform.<locals>.<listcomp>cSsg|]}|j��qSr)r)rrrrrrBs)�prefixZparens��list)rrr)�syms�value�
startswith�AssertionError�repr�in_special_contextrZNodeZtrailerrrrrZpowerr)
�self�node�resultsrrrrZmethod_name�isiterZisviewZspecial�args�newrrr�	transform6s4


zFixDict.transformz3power< func=NAME trailer< '(' node=any ')' > any* >zmfor_stmt< 'for' any 'in' node=any ':' any* >
            | comp_for< 'for' any 'in' node=any any* >
         cCs�|jdkrdSi}|jjdk	r^|jj|jj|�r^|d|kr^|rN|djtkS|djtjkS|sfdS|jj|j|�o�|d|kS)NFr#�func)�parent�p1�matchr�iter_exemptr�consuming_calls�p2)r"r#r%r$rrrr!Zs
zFixDict.in_special_contextN)
�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr(ZP1rZcompile_patternr+ZP2r/r!rrrrr
)s


r
N)
�__doc__rrrrrrrrr.r-ZBaseFixr
rrrr�<module>sPK�E[k�-O�
�
%__pycache__/fix_except.cpython-36.pycnu�[���3


 \
�@sfdZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZmZdd�Z
Gdd	�d	ej�Zd
S)a�Fixer for except statements with named exceptions.

The following cases will be converted:

- "except E, T:" where T is a name:

    except E as T:

- "except E, T:" where T is not a name, tuple or list:

        except E as t:
            T = t

    This is done because the target of an "except" clause must be a
    name.

- "except E, T:" where T is a tuple or list literal:

        except E as t:
            T = t.args
�)�pytree)�token)�
fixer_base)�Assign�Attr�Name�is_tuple�is_list�symsccsHxBt|�D]6\}}|jtjkr
|jdjdkr
|||dfVq
WdS)N��exceptr)�	enumerate�typer
�
except_clause�children�value)Znodes�i�n�r�0/usr/lib64/python3.6/lib2to3/fixes/fix_except.py�find_exceptssrc@seZdZdZdZdd�ZdS)�	FixExceptTa1
    try_stmt< 'try' ':' (simple_stmt | suite)
                  cleanup=(except_clause ':' (simple_stmt | suite))+
                  tail=(['except' ':' (simple_stmt | suite)]
                        ['else' ':' (simple_stmt | suite)]
                        ['finally' ':' (simple_stmt | suite)]) >
    cCs�|j}dd�|dD�}dd�|dD�}�x*t|�D�]\}}t|j�dkr6|jdd�\}}	}
|	jtdd	d
��|
jtjk�rDt|j	�d	d
�}|
j
�}d|_|
j|�|j
�}|j}
x"t|
�D]\}}t
|tj�r�Pq�Wt|
�s�t|
��rt|t|td���}n
t||�}x&t|
d|��D]}|jd
|��q W|j||�q6|
jdkr6d	|
_q6Wdd�|jdd�D�||}tj|j|�S)NcSsg|]}|j��qSr)�clone)�.0rrrr�
<listcomp>2sz'FixExcept.transform.<locals>.<listcomp>�tailcSsg|]}|j��qSr)r)rZchrrrr4sZcleanup���as� )�prefix��argsrcSsg|]}|j��qSr)r)r�crrrr\s�)r
r�lenr�replacerrr�NAME�new_namerr r
�
isinstancerZNoderr	rr�reversedZinsert_child)�selfZnodeZresultsr
rZtry_cleanuprZe_suite�EZcomma�NZnew_N�targetZsuite_stmtsrZstmtZassignZchildrrrr�	transform/s6



 zFixExcept.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr/rrrrr$srN)�__doc__r!rZpgen2rrZ
fixer_utilrrrrr	r
rZBaseFixrrrrr�<module>s PK�E[�^\���.__pycache__/fix_raw_input.cpython-36.opt-2.pycnu�[���3


 \��@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�FixRawInputTzU
              power< name='raw_input' trailer< '(' [any] ')' > any* >
              cCs |d}|jtd|jd��dS)N�name�input)�prefix)�replacerr)�selfZnodeZresultsr�r
�3/usr/lib64/python3.6/lib2to3/fixes/fix_raw_input.py�	transformszFixRawInput.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrr
r
r
rrsrN)�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK�E[>���%__pycache__/fix_future.cpython-36.pycnu�[���3


 \#�@s2dZddlmZddlmZGdd�dej�ZdS)zVRemove __future__ imports

from __future__ import foo is replaced with an empty line.
�)�
fixer_base)�	BlankLinec@s eZdZdZdZdZdd�ZdS)�	FixFutureTz;import_from< 'from' module_name="__future__" 'import' any >�
cCst�}|j|_|S)N)r�prefix)�selfZnodeZresults�new�r	�0/usr/lib64/python3.6/lib2to3/fixes/fix_future.py�	transformszFixFuture.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZ	run_orderrr	r	r	r
rsrN)�__doc__�rZ
fixer_utilrZBaseFixrr	r	r	r
�<module>sPK�E[�^��(__pycache__/fix_metaclass.cpython-36.pycnu�[���3


 \ �@svdZddlmZddlmZddlmZmZmZdd�Z	dd�Z
d	d
�Zdd�Zd
d�Z
dd�ZGdd�dej�ZdS)a�Fixer for __metaclass__ = X -> (metaclass=X) methods.

   The various forms of classef (inherits nothing, inherits once, inherints
   many) don't parse the same in the CST so we look at ALL classes for
   a __metaclass__ and if we find one normalize the inherits to all be
   an arglist.

   For one-liner classes ('class X: pass') there is no indent/dedent so
   we normalize those into having a suite.

   Moving the __metaclass__ into the classdef can also cause the class
   body to be empty so there is some special casing for that as well.

   This fixer also tries very hard to keep original indenting and spacing
   in all those corner cases.

�)�
fixer_base)�token)�syms�Node�LeafcCsxxr|jD]h}|jtjkr t|�S|jtjkr|jr|jd}|jtjkr|jr|jd}t|t�r|j	dkrdSqWdS)z� we have to check the cls_node without changing it.
        There are two possibilities:
          1)  clsdef => suite => simple_stmt => expr_stmt => Leaf('__meta')
          2)  clsdef => simple_stmt => expr_stmt => Leaf('__meta')
    ��
__metaclass__TF)
�children�typer�suite�
has_metaclass�simple_stmt�	expr_stmt�
isinstancer�value)�parent�node�	expr_nodeZ	left_side�r�3/usr/lib64/python3.6/lib2to3/fixes/fix_metaclass.pyrs



rcCs�x|jD]}|jtjkrdSqWx,t|j�D]\}}|jtjkr,Pq,Wtd��ttjg�}x:|j|dd�r�|j|d}|j	|j
��|j�q\W|j	|�|}dS)zf one-line classes don't get a suite in the parse tree so we add
        one to normalize the tree
    NzNo class suite and no ':'!�)r	r
rr�	enumerater�COLON�
ValueErrorr�append_child�clone�remove)�cls_noder�ir�	move_noderrr�fixup_parse_tree-s
r c
Cs�x(t|j�D]\}}|jtjkrPqWdS|j�ttjg�}ttj	|g�}x2|j|d�r~|j|}|j
|j��|j�qNW|j||�|jdjd}|jdjd}	|	j
|_
dS)z� if there is a semi-colon all the parts count as part of the same
        simple_stmt.  We just want the __metaclass__ part so we move
        everything after the semi-colon into its own simple_stmt node
    Nr)rr	r
r�SEMIrrrrr
rr�insert_child�prefix)
rrZ	stmt_nodeZsemi_indrZnew_exprZnew_stmtrZ	new_leaf1Z	old_leaf1rrr�fixup_simple_stmtGs
r$cCs*|jr&|jdjtjkr&|jdj�dS)Nr���r%)r	r
r�NEWLINEr)rrrr�remove_trailing_newline_sr'ccs�x$|jD]}|jtjkrPqWtd��x�tt|j��D]t\}}|jtjkr6|jr6|jd}|jtjkr6|jr6|jd}t	|t
�r6|jdkr6t|||�t
|�|||fVq6WdS)NzNo class suite!rr)r	r
rrr�listrr
rrrrr$r')rrrZsimple_noderZ	left_noderrr�
find_metasds



r)cCs�|jddd�}x|r.|j�}|jtjkrPqWxL|r||j�}t|t�rd|jtjkrd|jr`d|_dS|j	|jddd��q2WdS)z� If an INDENT is followed by a thing with a prefix then nuke the prefix
        Otherwise we get in trouble when removing __metaclass__ at suite start
    Nr�r%r%)
r	�popr
r�INDENTrr�DEDENTr#�extend)rZkidsrrrr�fixup_indent{sr/c@seZdZdZdZdd�ZdS)�FixMetaclassTz
    classdef<any*>
    cCsNt|�sdSt|�d}x"t|�D]\}}}|}|j�q"W|jdj}t|j�dkr�|jdjtjkrt|jd}n(|jdj	�}	t
tj|	g�}|jd|�n�t|j�dkr�t
tjg�}|jd|�nZt|j�dk�rt
tjg�}|jdt
tjd��|jd|�|jdt
tjd��ntd	��|jdjd}
d
|
_|
j}|j�r^|jt
tjd��d|
_nd
|
_|jd}|jtjk�s�t�d
|jd_d
|jd_|j|�t|�|j�s�|j�t
|d�}
||
_|j|
�|jt
tjd��nbt|j�dk�rJ|jdjtjk�rJ|jdjtjk�rJt
|d�}
|jd|
�|jdt
tjd��dS)Nr����r�)�(zUnexpected class definition�	metaclass�,� r*r�pass�
���r%r%r%)rr r)rr	r
�lenr�arglistrrZ	set_childr"rr�RPAR�LPARrrr#r�COMMAr�AssertionErrorr/r&r,r-)�selfrZresultsZlast_metaclassrrZstmtZ	text_typer>rZmeta_txtZorig_meta_prefixrZ	pass_leafrrr�	transform�s`




zFixMetaclass.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrDrrrrr0�sr0N)�__doc__r*rZpygramrZ
fixer_utilrrrrr r$r'r)r/ZBaseFixr0rrrr�<module>sPK�E[C�pb��$__pycache__/fix_raise.cpython-36.pycnu�[���3


 \n�@sZdZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZGdd�dej�Z
dS)	a[Fixer for 'raise E, V, T'

raise         -> raise
raise E       -> raise E
raise E, V    -> raise E(V)
raise E, V, T -> raise E(V).with_traceback(T)
raise E, None, T -> raise E.with_traceback(T)

raise (((E, E'), E''), E'''), V -> raise E(V)
raise "foo", V, T               -> warns about string exceptions


CAVEATS:
1) "raise E, V" will be incorrectly translated if V is an exception
   instance. The correct Python 3 idiom is

        raise E from V

   but since we can't detect instance-hood by syntax alone and since
   any client code would have to be changed as well, we don't automate
   this.
�)�pytree)�token)�
fixer_base)�Name�Call�Attr�ArgList�is_tuplec@seZdZdZdZdd�ZdS)�FixRaiseTzB
    raise_stmt< 'raise' exc=any [',' val=any [',' tb=any]] >
    cCsl|j}|dj�}|jtjkr2d}|j||�dSt|�rbx t|�rZ|jdjdj�}q<Wd|_d|kr�t	j
|jtd�|g�}|j|_|S|dj�}t|�r�dd	�|jdd�D�}nd
|_|g}d|k�rF|dj�}	d
|	_|}
|jtj
kp�|jdk�rt||�}
t|
td
��t|	g�g}t	j
|jtd�g|�}|j|_|St	j
|jtd�t||�g|jd�SdS)N�excz+Python 3 does not support string exceptions��� �val�raisecSsg|]}|j��qS�)�clone)�.0�crr�//usr/lib64/python3.6/lib2to3/fixes/fix_raise.py�
<listcomp>Dsz&FixRaise.transform.<locals>.<listcomp>��tb�None�with_traceback)�prefix���)�symsr�typer�STRINGZcannot_convertr	ZchildrenrrZNodeZ
raise_stmtr�NAME�valuerrrZsimple_stmt)�selfZnodeZresultsrr�msg�newr�argsr�eZwith_tbrrr�	transform&s@


zFixRaise.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr'rrrrr
sr
N)�__doc__rrZpgen2rrZ
fixer_utilrrrrr	ZBaseFixr
rrrr�<module>s
PK�E[�A	�uu+__pycache__/fix_reload.cpython-36.opt-1.pycnu�[���3


 \��@s6dZddlmZddlmZmZGdd�dej�ZdS)z/Fixer for reload().

reload(s) -> imp.reload(s)�)�
fixer_base)�
ImportAndCall�touch_importc@s eZdZdZdZdZdd�ZdS)�	FixReloadTZprez�
    power< 'reload'
           trailer< lpar='('
                    ( not(arglist | argument<any '=' any>) obj=any
                      | obj=arglist<(not argument<any '=' any>) any ','> )
                    rpar=')' >
           after=any*
    >
    cCsd|rD|d}|rD|j|jjkr"dS|j|jjkrD|jdjdkrDdSd}t|||�}tdd|�|S)N�obj�z**�imp�reload)rr	)�typeZsymsZ	star_exprZargumentZchildren�valuerr)�selfZnodeZresultsr�names�new�r�0/usr/lib64/python3.6/lib2to3/fixes/fix_reload.py�	transformszFixReload.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�orderZPATTERNrrrrrr
s
rN)�__doc__�rZ
fixer_utilrrZBaseFixrrrrr�<module>sPK�E[�j���&__pycache__/fix_unicode.cpython-36.pycnu�[���3


 \��@s<dZddlmZddlmZddd�ZGdd�dej�Zd	S)
z�Fixer for unicode.

* Changes unicode to str and unichr to chr.

* If "...\u..." is not unicode literal change it into "...\\u...".

* Change u"..." into "...".

�)�token)�
fixer_base�chr�str)ZunichrZunicodecs,eZdZdZdZ�fdd�Zdd�Z�ZS)�
FixUnicodeTzSTRING | 'unicode' | 'unichr'cs"tt|�j||�d|jk|_dS)N�unicode_literals)�superr�
start_treeZfuture_featuresr)�selfZtree�filename)�	__class__��1/usr/lib64/python3.6/lib2to3/fixes/fix_unicode.pyr	szFixUnicode.start_treecCs�|jtjkr$|j�}t|j|_|S|jtjkr�|j}|jrl|ddkrld|krldjdd�|j	d�D��}|ddkr�|dd�}||jkr�|S|j�}||_|SdS)	N�z'"�\z\\cSs g|]}|jdd�jdd��qS)z\uz\\uz\Uz\\U)�replace)�.0�vr
r
r�
<listcomp>!sz(FixUnicode.transform.<locals>.<listcomp>ZuU�)
�typer�NAMEZclone�_mapping�value�STRINGr�join�split)r
ZnodeZresults�new�valr
r
r�	transforms"
zFixUnicode.transform)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr	r�
__classcell__r
r
)rrrsrN)�__doc__Zpgen2r�rrZBaseFixrr
r
r
r�<module>	s
PK�E[:\��NN)__pycache__/fix_exec.cpython-36.opt-1.pycnu�[���3


 \��@s:dZddlmZddlmZmZmZGdd�dej�ZdS)z�Fixer for exec.

This converts usages of the exec statement into calls to a built-in
exec() function.

exec code in ns1, ns2 -> exec(code, ns1, ns2)
�)�
fixer_base)�Comma�Name�Callc@seZdZdZdZdd�ZdS)�FixExecTzx
    exec_stmt< 'exec' a=any 'in' b=any [',' c=any] >
    |
    exec_stmt< 'exec' (not atom<'(' [any] ')'>) a=any >
    cCs�|j}|d}|jd�}|jd�}|j�g}d|d_|dk	rR|jt�|j�g�|dk	rn|jt�|j�g�ttd�||jd�S)N�a�b�c���exec)�prefix)�syms�getZcloner
�extendrrr)�selfZnodeZresultsrrrr	�args�r�./usr/lib64/python3.6/lib2to3/fixes/fix_exec.py�	transforms



zFixExec.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)	�__doc__r
rZ
fixer_utilrrrZBaseFixrrrrr�<module>
sPK�E[���YY$__pycache__/fix_paren.cpython-36.pycnu�[���3


 \��@s6dZddlmZddlmZmZGdd�dej�ZdS)zuFixer that addes parentheses where they are required

This converts ``[x for x in 1, 2]`` to ``[x for x in (1, 2)]``.�)�
fixer_base)�LParen�RParenc@seZdZdZdZdd�ZdS)�FixParenTa
        atom< ('[' | '(')
            (listmaker< any
                comp_for<
                    'for' NAME 'in'
                    target=testlist_safe< any (',' any)+ [',']
                     >
                    [any]
                >
            >
            |
            testlist_gexp< any
                comp_for<
                    'for' NAME 'in'
                    target=testlist_safe< any (',' any)+ [',']
                     >
                    [any]
                >
            >)
        (']' | ')') >
    cCs8|d}t�}|j|_d|_|jd|�|jt��dS)N�target��)r�prefixZinsert_childZappend_childr)�selfZnodeZresultsrZlparen�r�//usr/lib64/python3.6/lib2to3/fixes/fix_paren.py�	transform%szFixParen.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrrrsrN)�__doc__rrZ
fixer_utilrrZBaseFixrrrrr�<module>sPK�E[E�3��'__pycache__/fix_execfile.cpython-36.pycnu�[���3


 \�@sVdZddlmZddlmZmZmZmZmZm	Z	m
Z
mZmZm
Z
Gdd�dej�ZdS)zoFixer for execfile.

This converts usages of the execfile function into calls to the built-in
exec() function.
�)�
fixer_base)
�Comma�Name�Call�LParen�RParen�Dot�Node�ArgList�String�symsc@seZdZdZdZdd�ZdS)�FixExecfileTz�
    power< 'execfile' trailer< '(' arglist< filename=any [',' globals=any [',' locals=any ] ] > ')' > >
    |
    power< 'execfile' trailer< '(' filename=any ')' > >
    cCs0|st�|d}|jd�}|jd�}|jdjdj�}t|j�t�tdd�g|d�}ttj	t
d�|g�}ttjt�t
d	�g�ttjt
�t�g�g}	|g|	}
|j�}d|_td
d�}|
t�|t�|g}
tt
d�|
d�}|g}|dk	�r�|jt�|j�g�|dk	�r|jt�|j�g�tt
d
�||jd�S)N�filename�globals�locals�z"rb"� )Zrparen�open�readz'exec'�compile��exec)�prefix���r)�AssertionError�getZchildrenZcloner
rrr	rZpowerrZtrailerrrrrr�extend)�selfZnodeZresultsrrrZexecfile_parenZ	open_argsZ	open_callrZ	open_exprZfilename_argZexec_strZcompile_argsZcompile_call�args�r�2/usr/lib64/python3.6/lib2to3/fixes/fix_execfile.py�	transforms,





zFixExecfile.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr!rrrr r
sr
N)�__doc__rrZ
fixer_utilrrrrrrr	r
rrZBaseFixr
rrrr �<module>s0PK�E[��Ȍ�
�
+__pycache__/fix_import.cpython-36.opt-1.pycnu�[���3


 \��@sZdZddlmZddlmZmZmZmZddlm	Z	m
Z
mZdd�ZGdd	�d	ej
�Zd
S)z�Fixer for import statements.
If spam is being imported from the local directory, this import:
    from spam import eggs
Becomes:
    from .spam import eggs

And this import:
    import spam
Becomes:
    from . import spam
�)�
fixer_base�)�dirname�join�exists�sep)�
FromImport�syms�tokenccs�|g}x�|r�|j�}|jtjkr*|jVq|jtjkrPdjdd�|jD��Vq|jtj	krn|j
|jd�q|jtjkr�|j|jddd��qt
d��qWdS)	zF
    Walks over all the names imported in a dotted_as_names node.
    �cSsg|]
}|j�qS�)�value)�.0Zchrr�0/usr/lib64/python3.6/lib2to3/fixes/fix_import.py�
<listcomp>sz$traverse_imports.<locals>.<listcomp>rNrzunknown node type���)�pop�typer
�NAMEr
r	Zdotted_namer�childrenZdotted_as_name�appendZdotted_as_names�extend�AssertionError)�names�pending�noderrr�traverse_importss
rcs4eZdZdZdZ�fdd�Zdd�Zdd�Z�ZS)	�	FixImportTzj
    import_from< 'from' imp=any 'import' ['('] any [')'] >
    |
    import_name< 'import' imp=any >
    cs"tt|�j||�d|jk|_dS)NZabsolute_import)�superr�
start_treeZfuture_features�skip)�selfZtree�name)�	__class__rrr/szFixImport.start_treecCs�|jr
dS|d}|jtjkrZxt|d�s6|jd}q W|j|j�r�d|j|_|j�n^d}d}x$t	|�D]}|j|�r�d}qld}qlW|r�|r�|j
|d�dStd|g�}|j|_|SdS)N�impr
r�.FTz#absolute and local imports together)
r rr	Zimport_from�hasattrr�probably_a_local_importr
ZchangedrZwarningr�prefix)r!rZresultsr$Z
have_localZ
have_absoluteZmod_name�newrrr�	transform3s,

zFixImport.transformcCsv|jd�rdS|jdd�d}t|j�}t||�}ttt|�d��sHdSx(dtddd	d
gD]}t||�rZdSqZWdS)Nr%F�rz__init__.pyz.pyz.pycz.soz.slz.pydT)�
startswith�splitr�filenamerrr)r!Zimp_name�	base_pathZextrrrr'Us


z!FixImport.probably_a_local_import)	�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrr*r'�
__classcell__rr)r#rr&s
"rN)�__doc__rrZos.pathrrrrZ
fixer_utilrr	r
rZBaseFixrrrrr�<module>s
PK�E[��G$	$	+__pycache__/fix_filter.cpython-36.opt-1.pycnu�[���3


 \[
�@sVdZddlmZddlmZddlmZddlm	Z	m
Z
mZmZGdd�dej
�ZdS)	a�Fixer that changes filter(F, X) into list(filter(F, X)).

We avoid the transformation if the filter() call is directly contained
in iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or
for V in <>:.

NOTE: This is still not correct if the original code was depending on
filter(F, X) to return a string if X is a string and a tuple if X is a
tuple.  That would require type inference, which we don't do.  Let
Python 2.6 figure it out.
�)�
fixer_base)�Node)�python_symbols)�Name�ArgList�ListComp�in_special_contextc@s eZdZdZdZdZdd�ZdS)�	FixFilterTaV
    filter_lambda=power<
        'filter'
        trailer<
            '('
            arglist<
                lambdef< 'lambda'
                         (fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any
                >
                ','
                it=any
            >
            ')'
        >
        [extra_trailers=trailer*]
    >
    |
    power<
        'filter'
        trailer< '(' arglist< none='None' ',' seq=any > ')' >
        [extra_trailers=trailer*]
    >
    |
    power<
        'filter'
        args=trailer< '(' [any] ')' >
        [extra_trailers=trailer*]
    >
    zfuture_builtins.filtercCs2|j|�rdSg}d|kr:x|dD]}|j|j��q$Wd|kr�t|jd�j�|jd�j�|jd�j�|jd�j��}ttj|g|dd�}n�d|kr�ttd	�td	�|d
j�td	��}ttj|g|dd�}nTt	|�r�dS|dj�}ttjtd�|gdd�}ttjtd
�t
|g�g|�}d|_|j|_|S)NZextra_trailersZ
filter_lambda�fp�itZxp�)�prefixZnoneZ_f�seq�args�filter�list)Zshould_skip�appendZcloner�getr�symsZpowerrrrr
)�selfZnodeZresultsZtrailers�t�newr�r�0/usr/lib64/python3.6/lib2to3/fixes/fix_filter.py�	transform:s4


zFixFilter.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onrrrrrr	sr	N)�__doc__rrZpytreerZpygramrrZ
fixer_utilrrrrZConditionalFixr	rrrr�<module>s
PK�E[�폏��)__pycache__/__init__.cpython-36.opt-2.pycnu�[���3


 \/�@sdS)N�rrr�./usr/lib64/python3.6/lib2to3/fixes/__init__.py�<module>sPK�E[؈��]].__pycache__/fix_metaclass.cpython-36.opt-2.pycnu�[���3


 \ �@srddlmZddlmZddlmZmZmZdd�Zdd�Z	dd	�Z
d
d�Zdd
�Zdd�Z
Gdd�dej�ZdS)�)�
fixer_base)�token)�syms�Node�LeafcCsxxr|jD]h}|jtjkr t|�S|jtjkr|jr|jd}|jtjkr|jr|jd}t|t�r|j	dkrdSqWdS)N��
__metaclass__TF)
�children�typer�suite�
has_metaclass�simple_stmt�	expr_stmt�
isinstancer�value)�parent�node�	expr_nodeZ	left_side�r�3/usr/lib64/python3.6/lib2to3/fixes/fix_metaclass.pyrs



rcCs�x|jD]}|jtjkrdSqWx,t|j�D]\}}|jtjkr,Pq,Wtd��ttjg�}x:|j|dd�r�|j|d}|j	|j
��|j�q\W|j	|�|}dS)NzNo class suite and no ':'!�)r	r
rr�	enumerater�COLON�
ValueErrorr�append_child�clone�remove)�cls_noder�ir�	move_noderrr�fixup_parse_tree-s
r c
Cs�x(t|j�D]\}}|jtjkrPqWdS|j�ttjg�}ttj	|g�}x2|j|d�r~|j|}|j
|j��|j�qNW|j||�|jdjd}|jdjd}	|	j
|_
dS)Nr)rr	r
r�SEMIrrrrr
rr�insert_child�prefix)
rrZ	stmt_nodeZsemi_indrZnew_exprZnew_stmtrZ	new_leaf1Z	old_leaf1rrr�fixup_simple_stmtGs
r$cCs*|jr&|jdjtjkr&|jdj�dS)Nr���r%)r	r
r�NEWLINEr)rrrr�remove_trailing_newline_sr'ccs�x$|jD]}|jtjkrPqWtd��x�tt|j��D]t\}}|jtjkr6|jr6|jd}|jtjkr6|jr6|jd}t	|t
�r6|jdkr6t|||�t
|�|||fVq6WdS)NzNo class suite!rr)r	r
rrr�listrr
rrrrr$r')rrrZsimple_noderZ	left_noderrr�
find_metasds



r)cCs�|jddd�}x|r.|j�}|jtjkrPqWxL|r||j�}t|t�rd|jtjkrd|jr`d|_dS|j	|jddd��q2WdS)Nr�r%r%)
r	�popr
r�INDENTrr�DEDENTr#�extend)rZkidsrrrr�fixup_indent{sr/c@seZdZdZdZdd�ZdS)�FixMetaclassTz
    classdef<any*>
    cCs<t|�sdSt|�d}x"t|�D]\}}}|}|j�q"W|jdj}t|j�dkr�|jdjtjkrt|jd}n(|jdj	�}	t
tj|	g�}|jd|�n�t|j�dkr�t
tjg�}|jd|�nZt|j�dk�rt
tjg�}|jdt
tjd��|jd|�|jdt
tjd��ntd	��|jdjd}
d
|
_|
j}|j�r^|jt
tjd��d|
_nd
|
_|jd}d
|jd_d
|jd_|j|�t|�|j�s�|j�t
|d�}
||
_|j|
�|jt
tjd��nbt|j�dk�r8|jdjtjk�r8|jdjtjk�r8t
|d�}
|jd|
�|jdt
tjd��dS)Nr����r�)�(zUnexpected class definition�	metaclass�,� r*r�pass�
���r%r%r%)rr r)rr	r
�lenr�arglistrrZ	set_childr"rr�RPAR�LPARrrr#r�COMMAr/r&r,r-)�selfrZresultsZlast_metaclassrrZstmtZ	text_typer>rZmeta_txtZorig_meta_prefixrZ	pass_leafrrr�	transform�s^




zFixMetaclass.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrCrrrrr0�sr0N)r*rZpygramrZ
fixer_utilrrrrr r$r'r)r/ZBaseFixr0rrrr�<module>sPK�E[��.]		$__pycache__/fix_print.cpython-36.pycnu�[���3


 \�@sldZddlmZddlmZddlmZddlmZddlmZm	Z	m
Z
mZejd�Z
Gdd	�d	ej�Zd
S)aFixer for print.

Change:
    'print'          into 'print()'
    'print ...'      into 'print(...)'
    'print ... ,'    into 'print(..., end=" ")'
    'print >>x, ...' into 'print(..., file=x)'

No changes are applied if print_function is imported from __future__

�)�patcomp)�pytree)�token)�
fixer_base)�Name�Call�Comma�Stringz"atom< '(' [atom|STRING|NAME] ')' >c@s$eZdZdZdZdd�Zdd�ZdS)�FixPrintTzP
              simple_stmt< any* bare='print' any* > | print_stmt
              c
Cs�|st�|jd�}|r4|jttd�g|jd��dS|jdtd�ksJt�|jdd�}t|�dkrvtj	|d�rvdSd}}}|r�|dt
�kr�|dd�}d}|r�|dtjt
jd�kr�t|�dks�t�|dj�}|d	d�}d
d�|D�}|�rd|d_|dk	�s"|dk	�s"|dk	�rz|dk	�rB|j|d
tt|���|dk	�rb|j|dtt|���|dk	�rz|j|d|�ttd�|�}	|j|	_|	S)NZbare�print)�prefix��� z>>r�cSsg|]}|j��qS�)�clone)�.0�argrr�//usr/lib64/python3.6/lib2to3/fixes/fix_print.py�
<listcomp>?sz&FixPrint.transform.<locals>.<listcomp>��sep�end�file���r)�AssertionError�get�replacerrrZchildren�len�parend_expr�matchrr�Leafr�
RIGHTSHIFTr�	add_kwargr	�repr)
�selfZnodeZresultsZ
bare_print�argsrrrZl_argsZn_stmtrrr�	transform%s>




zFixPrint.transformcCsNd|_tj|jjt|�tjtjd�|f�}|r@|j	t
��d|_|j	|�dS)Nr�=r)rrZNodeZsymsZargumentrr"r�EQUAL�appendr)r&Zl_nodesZs_kwdZn_exprZ
n_argumentrrrr$Ms
zFixPrint.add_kwargN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr(r$rrrrr
s(r
N)�__doc__rrrZpgen2rrZ
fixer_utilrrrr	Zcompile_patternr ZBaseFixr
rrrr�<module>sPK�E[��C�	�	+__pycache__/fix_xrange.cpython-36.opt-2.pycnu�[���3


 \�
�@sBddlmZddlmZmZmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Name�Call�consuming_calls)�patcompcsheZdZdZdZ�fdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
Z
eje
�Z
dZeje�Zdd�Z�ZS)�	FixXrangeTz�
              power<
                 (name='range'|name='xrange') trailer< '(' args=any ')' >
              rest=any* >
              cstt|�j||�t�|_dS)N)�superr�
start_tree�set�transformed_xranges)�self�tree�filename)�	__class__��0/usr/lib64/python3.6/lib2to3/fixes/fix_xrange.pyr	szFixXrange.start_treecCs
d|_dS)N)r)rr
rrrr�finish_treeszFixXrange.finish_treecCsD|d}|jdkr|j||�S|jdkr4|j||�Stt|���dS)N�nameZxrange�range)�value�transform_xrange�transform_range�
ValueError�repr)r�node�resultsrrrr�	transforms

zFixXrange.transformcCs0|d}|jtd|jd��|jjt|��dS)Nrr)�prefix)�replacerrr�add�id)rrrrrrrr$szFixXrange.transform_xrangecCslt|�|jkrh|j|�rhttd�|dj�g�}ttd�|g|jd�}x|dD]}|j|�qRW|SdS)Nr�args�list)r�rest)r r�in_special_contextrrZclonerZappend_child)rrrZ
range_callZ	list_call�nrrrr*s
zFixXrange.transform_rangez3power< func=NAME trailer< '(' node=any ')' > any* >z�for_stmt< 'for' any 'in' node=any ':' any* >
            | comp_for< 'for' any 'in' node=any any* >
            | comparison< any 'in' node=any any*>
         cCsf|jdkrdSi}|jjdk	rJ|jj|jj|�rJ|d|krJ|djtkS|jj|j|�od|d|kS)NFr�func)�parent�p1�matchrr�p2)rrrrrrr$?s
zFixXrange.in_special_context)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr	rrrrZP1rZcompile_patternr(ZP2r*r$�
__classcell__rr)rrrs	

rN)	�rZ
fixer_utilrrrrZBaseFixrrrrr�<module>sPK�E[I��4��-__pycache__/fix_exitfunc.cpython-36.opt-1.pycnu�[���3


 \�	�@sJdZddlmZmZddlmZmZmZmZm	Z	m
Z
Gdd�dej�ZdS)z7
Convert use of sys.exitfunc to use the atexit module.
�)�pytree�
fixer_base)�Name�Attr�Call�Comma�Newline�symscs<eZdZdZdZdZ�fdd�Z�fdd�Zdd�Z�Z	S)	�FixExitfuncTa�
              (
                  sys_import=import_name<'import'
                      ('sys'
                      |
                      dotted_as_names< (any ',')* 'sys' (',' any)* >
                      )
                  >
              |
                  expr_stmt<
                      power< 'sys' trailer< '.' 'exitfunc' > >
                  '=' func=any >
              )
              cstt|�j|�dS)N)�superr
�__init__)�self�args)�	__class__��2/usr/lib64/python3.6/lib2to3/fixes/fix_exitfunc.pyrszFixExitfunc.__init__cstt|�j||�d|_dS)N)rr
�
start_tree�
sys_import)r
Ztree�filename)rrrr!szFixExitfunc.start_treecCs&d|kr |jdkr|d|_dS|dj�}d|_tjtjttd�td���}t	||g|j�}|j
|�|jdkr�|j|d�dS|jjd}|j
tjkr�|jt��|jtdd��nj|jj}|jj|j�}|j}	tjtjtd	�tdd�g�}
tjtj|
g�}|j|dt��|j|d
|�dS)Nr�func��atexit�registerzKCan't find sys import; Please add an atexit import at the top of your file.�� �import�)rZclone�prefixrZNoder	Zpowerrrr�replaceZwarningZchildren�typeZdotted_as_namesZappend_childr�parent�indexZimport_nameZsimple_stmtZinsert_childr)r
ZnodeZresultsrrZcall�namesZcontaining_stmtZpositionZstmt_containerZ
new_import�newrrr�	transform%s2



zFixExitfunc.transform)
�__name__�
__module__�__qualname__Zkeep_line_orderZ
BM_compatibleZPATTERNrrr$�
__classcell__rr)rrr
sr
N)
�__doc__Zlib2to3rrZlib2to3.fixer_utilrrrrrr	ZBaseFixr
rrrr�<module>s PK�E[��
�OO+__pycache__/fix_urllib.cpython-36.opt-1.pycnu�[���3


 \� �@s�dZddlmZmZddlmZmZmZmZm	Z	m
Z
mZdddddd	d
ddgfd
dddddddddddddddgfddgfgdd	dd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5gfdd6d7gfgd8�Zed9j
ed:d;�d<d=�ZGd>d?�d?e�Zd@S)Az�Fix changes imports of urllib which are now incompatible.
   This is rather similar to fix_imports, but because of the more
   complex nature of the fixing for urllib, it has its own fixer.
�)�
alternates�
FixImports)�Name�Comma�
FromImport�Newline�find_indentation�Node�symszurllib.requestZ	URLopenerZFancyURLopenerZurlretrieveZ
_urlopenerZurlopenZ
urlcleanupZpathname2urlZurl2pathnamezurllib.parseZquoteZ
quote_plusZunquoteZunquote_plusZ	urlencodeZ	splitattrZ	splithostZ
splitnportZsplitpasswdZ	splitportZ
splitqueryZsplittagZ	splittypeZ	splituserZ
splitvaluezurllib.errorZContentTooShortErrorZinstall_openerZbuild_openerZRequestZOpenerDirectorZBaseHandlerZHTTPDefaultErrorHandlerZHTTPRedirectHandlerZHTTPCookieProcessorZProxyHandlerZHTTPPasswordMgrZHTTPPasswordMgrWithDefaultRealmZAbstractBasicAuthHandlerZHTTPBasicAuthHandlerZProxyBasicAuthHandlerZAbstractDigestAuthHandlerZHTTPDigestAuthHandlerZProxyDigestAuthHandlerZHTTPHandlerZHTTPSHandlerZFileHandlerZ
FTPHandlerZCacheFTPHandlerZUnknownHandlerZURLErrorZ	HTTPError)�urllib�urllib2rr�ccs~t�}xrtj�D]f\}}x\|D]T}|\}}t|�}d||fVd|||fVd|Vd|Vd||fVqWqWdS)Nz�import_name< 'import' (module=%r
                                  | dotted_as_names< any* module=%r any* >) >
                  z�import_from< 'from' mod_member=%r 'import'
                       ( member=%s | import_as_name< member=%s 'as' any > |
                         import_as_names< members=any*  >) >
                  zIimport_from< 'from' module_star=%r 'import' star='*' >
                  ztimport_name< 'import'
                                  dotted_as_name< module_as=%r 'as' any > >
                  zKpower< bare_with_attr=%r trailer< '.' member=%s > any* >
                  )�set�MAPPING�itemsr)ZbareZ
old_moduleZchanges�changeZ
new_module�members�r�0/usr/lib64/python3.6/lib2to3/fixes/fix_urllib.py�
build_pattern0s


rc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�	FixUrllibcCsdjt��S)N�|)�joinr)�selfrrrrIszFixUrllib.build_patterncCsz|jd�}|j}g}x6t|jdd�D] }|jt|d|d�t�g�q(W|jtt|jdd|d��|j|�dS)z�Transform for the basic import case. Replaces the old
           import name with a comma separated list of its
           replacements.
        �moduleNr
r)�prefix���r)	�getrr�value�extendrr�append�replace)r�node�resultsZ
import_mod�pref�names�namerrr�transform_importLs
  zFixUrllib.transform_importcCs>|jd�}|j}|jd�}|r�t|t�r0|d}d}x*t|jD]}|j|dkr@|d}Pq@W|rx|jt||d��n|j|d��n�g}i}	|d}
x�|
D]�}|j	t
jkr�|jd	j}|jdj}n
|j}d}|d
kr�xPt|jD]B}||dkr�|d|	k�r|j
|d�|	j|dg�j
|�q�Wq�Wg}
t|�}d}dd
�}x�|D]�}|	|}g}x2|dd�D]"}|j|||��|j
t���qlW|j||d|��t||�}|�s�|jjj|��r�||_|
j
|�d}�qNW|
�r.g}x&|
dd�D]}|j|t�g��q�W|j
|
d�|j|�n|j|d�dS)z�Transform for imports of specific module elements. Replaces
           the module to be imported from with the appropriate new
           module.
        �
mod_member�memberrNr
)rz!This is an invalid module elementr��,TcSsX|jtjkrHt|jdj|d�|jdj�|jdj�g}ttj|�gSt|j|d�gS)Nr)rr
r*)�typer
�import_as_namer�childrenrZcloner	)r&rZkidsrrr�handle_name�sz/FixUrllib.transform_member.<locals>.handle_nameFzAll module elements are invalidrrrr)rr�
isinstance�listrrr!r�cannot_convertr,r
r-r.r �
setdefaultrrrr�parent�endswithr)rr"r#r(r$r)�new_namer�modulesZmod_dictrZas_name�member_nameZ	new_nodesZindentation�firstr/rZeltsr%Zelt�newZnodesZnew_noderrr�transform_member\sh







zFixUrllib.transform_membercCs�|jd�}|jd�}d}t|t�r*|d}x*t|jD]}|j|dkr6|d}Pq6W|rp|jt||jd��n|j|d�dS)z.Transform for calls to module members in code.�bare_with_attrr)Nrr
)rz!This is an invalid module element)	rr0r1rrr!rrr2)rr"r#Z
module_dotr)r6rrrr�
transform_dot�s


zFixUrllib.transform_dotcCsz|jd�r|j||�n^|jd�r0|j||�nF|jd�rH|j||�n.|jd�r`|j|d�n|jd�rv|j|d�dS)Nrr(r<Zmodule_starzCannot handle star imports.Z	module_asz#This module is now multiple modules)rr'r;r=r2)rr"r#rrr�	transform�s




zFixUrllib.transformN)�__name__�
__module__�__qualname__rr'r;r=r>rrrrrGs
LrN)�__doc__Zlib2to3.fixes.fix_importsrrZlib2to3.fixer_utilrrrrrr	r
rr rrrrrr�<module>s@$
PK�E[�?�dd,__pycache__/fix_renames.cpython-36.opt-2.pycnu�[���3


 \��@sRddlmZddlmZmZdddiiZiZdd�Zdd	�ZGd
d�dej	�Z
dS)
�)�
fixer_base)�Name�
attr_chain�sysZmaxint�maxsizecCsddjtt|��dS)N�(�|�))�join�map�repr)�members�r�1/usr/lib64/python3.6/lib2to3/fixes/fix_renames.py�
alternatessrccsbx\ttj��D]L\}}xBt|j��D]2\}}|t||f<d|||fVd||fVq$WqWdS)Nz�
                  import_from< 'from' module_name=%r 'import'
                      ( attr_name=%r | import_as_name< attr_name=%r 'as' any >) >
                  z^
                  power< module_name=%r trailer< '.' attr_name=%r > any* >
                  )�list�MAPPING�items�LOOKUP)�module�replaceZold_attr�new_attrrrr�
build_patterns

rcs8eZdZdZdje��ZdZ�fdd�Zdd�Z	�Z
S)�
FixRenamesTrZprecs@tt|�j��|�}|r<t�fdd�t|d�D��r8dS|SdS)Nc3s|]}�|�VqdS)Nr)�.0�obj)�matchrr�	<genexpr>5sz#FixRenames.match.<locals>.<genexpr>�parentF)�superrr�anyr)�self�node�results)�	__class__)rrr1szFixRenames.matchcCsD|jd�}|jd�}|r@|r@t|j|jf}|jt||jd��dS)NZmodule_name�	attr_name)�prefix)�getr�valuerrr&)r!r"r#Zmod_namer%rrrr�	transform>s


zFixRenames.transform)�__name__�
__module__�__qualname__Z
BM_compatibler
rZPATTERN�orderrr)�
__classcell__rr)r$rr*s

rN)�rZ
fixer_utilrrrrrrZBaseFixrrrrr�<module>
sPK�E[��ȽHH)__pycache__/fix_xreadlines.cpython-36.pycnu�[���3


 \��@s2dZddlmZddlmZGdd�dej�ZdS)zpFix "for x in f.xreadlines()" -> "for x in f".

This fixer will also convert g(f.xreadlines) into g(f.__iter__).�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixXreadlinesTz�
    power< call=any+ trailer< '.' 'xreadlines' > trailer< '(' ')' > >
    |
    power< any+ trailer< '.' no_call='xreadlines' > >
    cCs@|jd�}|r$|jtd|jd��n|jdd�|dD��dS)N�no_call�__iter__)�prefixcSsg|]}|j��qS�)Zclone)�.0�xrr�4/usr/lib64/python3.6/lib2to3/fixes/fix_xreadlines.py�
<listcomp>sz+FixXreadlines.transform.<locals>.<listcomp>Zcall)�get�replacerr)�selfZnodeZresultsrrrr�	transforms
zFixXreadlines.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK�E[T�|���1__pycache__/fix_tuple_params.cpython-36.opt-1.pycnu�[���3


 \��@s�dZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZmZdd�Z
Gdd	�d	ej�Zd
d�Zdd
�Zgdfdd�Zdd�ZdS)a:Fixer for function definitions with tuple parameters.

def func(((a, b), c), d):
    ...

    ->

def func(x, d):
    ((a, b), c) = x
    ...

It will also support lambdas:

    lambda (x, y): x + y -> lambda t: t[0] + t[1]

    # The parens are a syntax error in Python 3
    lambda (x): x + y -> lambda x: x + y
�)�pytree)�token)�
fixer_base)�Assign�Name�Newline�Number�	Subscript�symscCst|tj�o|jdjtjkS)N�)�
isinstancer�Node�children�typer�STRING)�stmt�r�6/usr/lib64/python3.6/lib2to3/fixes/fix_tuple_params.py�is_docstringsrc@s(eZdZdZdZdZdd�Zdd�ZdS)	�FixTupleParams�Ta
              funcdef< 'def' any parameters< '(' args=any ')' >
                       ['->' any] ':' suite=any+ >
              |
              lambda=
              lambdef< 'lambda' args=vfpdef< '(' inner=any ')' >
                       ':' body=any
              >
              cs�d|kr�j||�Sg�|d}|d}|djdjtjkrZd}|djdj}t��nd}d}tjtjd��d���fd
d�	}|jt	j
kr�||�n@|jt	jkr�x2t|j�D]$\}}	|	jt	j
kr�||	|dkd�q�W�s�dSx�D]}
|d|
_
q�W|}|dk�rd
�d_n&t|dj|��r8|�d_|d}x�D]}
|d|
_
�q>W�|dj||�<x4t|d|t��d�D]}||dj|_�q�W|dj�dS)N�lambda�suite�argsr�rz; �Fcs\t�j��}|j�}d|_t||j��}|r2d|_|j|��jtjt	j
|�j�g��dS)Nr� )r�new_name�clone�prefixr�replace�appendrr
r
Zsimple_stmt)Z	tuple_arg�
add_prefix�n�argr)�end�	new_lines�selfrr�handle_tupleCs
z.FixTupleParams.transform.<locals>.handle_tuple)r"r)F)�transform_lambdarrr�INDENT�valuerrZLeafr
ZtfpdefZ
typedargslist�	enumerate�parentrr�range�lenZchanged)r'�node�resultsrr�start�indentr(�ir$�line�afterr)r%r&r'r�	transform.sF




 zFixTupleParams.transformc
Cs�|d}|d}t|d�}|jtjkrD|j�}d|_|j|�dSt|�}t|�}|j	t
|��}t|dd�}	|j|	j��xd|j�D]X}
|
jtjkr�|
j
|kr�dd�||
j
D�}tjtj|	j�g|�}|
j|_|
j|�q�WdS)Nr�body�innerr)rcSsg|]}|j��qSr)r)�.0�crrr�
<listcomp>�sz3FixTupleParams.transform_lambda.<locals>.<listcomp>)�
simplify_argsrr�NAMErrr �find_params�map_to_indexr�
tuple_namerZ
post_orderr+rr
r
Zpower)
r'r0r1rr8r9ZparamsZto_indexZtup_nameZ	new_paramr#Z
subscripts�newrrrr)ns(
zFixTupleParams.transform_lambdaN)�__name__�
__module__�__qualname__Z	run_orderZ
BM_compatibleZPATTERNr7r)rrrrrs

@rcCsR|jtjtjfkr|S|jtjkrBx|jtjkr<|jd}q$W|Std|��dS)NrzReceived unexpected node %s)rr
Zvfplistrr>�vfpdefr�RuntimeError)r0rrrr=�sr=cCs<|jtjkrt|jd�S|jtjkr,|jSdd�|jD�S)NrcSs g|]}|jtjkrt|��qSr)rr�COMMAr?)r:r;rrrr<�szfind_params.<locals>.<listcomp>)rr
rFr?rrr>r+)r0rrrr?�s
r?NcCs^|dkri}xLt|�D]@\}}ttt|���g}t|t�rJt|||d�q||||<qW|S)N)�d)r,r	r�strr�listr@)�
param_listrrIr4�objZtrailerrrrr@�s
r@cCs@g}x0|D](}t|t�r(|jt|��q
|j|�q
Wdj|�S)N�_)rrKr!rA�join)rL�lrMrrrrA�s

rA)�__doc__rrZpgen2rrZ
fixer_utilrrrrr	r
rZBaseFixrr=r?r@rArrrr�<module>s lPK�E[o>���+__pycache__/fix_idioms.cpython-36.opt-1.pycnu�[���3


 \�@sNdZddlmZddlmZmZmZmZmZm	Z	dZ
dZGdd�dej�Z
dS)	a�Adjust some old Python 2 idioms to their modern counterparts.

* Change some type comparisons to isinstance() calls:
    type(x) == T -> isinstance(x, T)
    type(x) is T -> isinstance(x, T)
    type(x) != T -> not isinstance(x, T)
    type(x) is not T -> not isinstance(x, T)

* Change "while 1:" into "while True:".

* Change both

    v = list(EXPR)
    v.sort()
    foo(v)

and the more general

    v = EXPR
    v.sort()
    foo(v)

into

    v = sorted(EXPR)
    foo(v)
�)�
fixer_base)�Call�Comma�Name�Node�	BlankLine�symsz0(n='!=' | '==' | 'is' | n=comp_op< 'is' 'not' >)z(power< 'type' trailer< '(' x=any ')' > >csPeZdZdZdeeeefZ�fdd�Zdd�Zdd�Z	d	d
�Z
dd�Z�ZS)
�	FixIdiomsTa�
        isinstance=comparison< %s %s T=any >
        |
        isinstance=comparison< T=any %s %s >
        |
        while_stmt< 'while' while='1' ':' any+ >
        |
        sorted=any<
            any*
            simple_stmt<
              expr_stmt< id1=any '='
                         power< list='list' trailer< '(' (not arglist<any+>) any ')' > >
              >
              '\n'
            >
            sort=
            simple_stmt<
              power< id2=any
                     trailer< '.' 'sort' > trailer< '(' ')' >
              >
              '\n'
            >
            next=any*
        >
        |
        sorted=any<
            any*
            simple_stmt< expr_stmt< id1=any '=' expr=any > '\n' >
            sort=
            simple_stmt<
              power< id2=any
                     trailer< '.' 'sort' > trailer< '(' ')' >
              >
              '\n'
            >
            next=any*
        >
    cs8tt|�j|�}|r4d|kr4|d|dkr0|SdS|S)N�sortedZid1Zid2)�superr	�match)�self�node�r)�	__class__��0/usr/lib64/python3.6/lib2to3/fixes/fix_idioms.pyrOszFixIdioms.matchcCsHd|kr|j||�Sd|kr(|j||�Sd|kr<|j||�Std��dS)N�
isinstance�whiler
z
Invalid match)�transform_isinstance�transform_while�transform_sort�RuntimeError)r
r�resultsrrr�	transformZszFixIdioms.transformcCsh|dj�}|dj�}d|_d|_ttd�|t�|g�}d|kr\d|_ttjtd�|g�}|j|_|S)N�x�T�� r�n�not)�clone�prefixrrrrrZnot_test)r
rrrrZtestrrrrdszFixIdioms.transform_isinstancecCs |d}|jtd|jd��dS)Nr�True)r")�replacerr")r
rrZonerrrrpszFixIdioms.transform_whilecCs�|d}|d}|jd�}|jd�}|r>|jtd|jd��n8|rn|j�}d|_|jttd�|g|jd��ntd��|j�|j}d	|kr�|r�|jd	�d
|d
jf}	d	j	|	�|d
_n"t
�}
|jj|
�|jd	�d
|
_dS)N�sort�next�list�exprr
)r"rzshould not have reached here�
�)
�getr$rr"r!rr�remove�
rpartition�joinr�parentZappend_child)r
rrZ	sort_stmtZ	next_stmtZ	list_callZsimple_expr�newZbtwnZprefix_linesZend_linerrrrts*

zFixIdioms.transform_sort)
�__name__�
__module__�__qualname__Zexplicit�TYPE�CMPZPATTERNrrrrr�
__classcell__rr)rrr	%s'
r	N)�__doc__rrZ
fixer_utilrrrrrrr5r4ZBaseFixr	rrrr�<module>s
 PK�E[T�|���+__pycache__/fix_tuple_params.cpython-36.pycnu�[���3


 \��@s�dZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZmZdd�Z
Gdd	�d	ej�Zd
d�Zdd
�Zgdfdd�Zdd�ZdS)a:Fixer for function definitions with tuple parameters.

def func(((a, b), c), d):
    ...

    ->

def func(x, d):
    ((a, b), c) = x
    ...

It will also support lambdas:

    lambda (x, y): x + y -> lambda t: t[0] + t[1]

    # The parens are a syntax error in Python 3
    lambda (x): x + y -> lambda x: x + y
�)�pytree)�token)�
fixer_base)�Assign�Name�Newline�Number�	Subscript�symscCst|tj�o|jdjtjkS)N�)�
isinstancer�Node�children�typer�STRING)�stmt�r�6/usr/lib64/python3.6/lib2to3/fixes/fix_tuple_params.py�is_docstringsrc@s(eZdZdZdZdZdd�Zdd�ZdS)	�FixTupleParams�Ta
              funcdef< 'def' any parameters< '(' args=any ')' >
                       ['->' any] ':' suite=any+ >
              |
              lambda=
              lambdef< 'lambda' args=vfpdef< '(' inner=any ')' >
                       ':' body=any
              >
              cs�d|kr�j||�Sg�|d}|d}|djdjtjkrZd}|djdj}t��nd}d}tjtjd��d���fd
d�	}|jt	j
kr�||�n@|jt	jkr�x2t|j�D]$\}}	|	jt	j
kr�||	|dkd�q�W�s�dSx�D]}
|d|
_
q�W|}|dk�rd
�d_n&t|dj|��r8|�d_|d}x�D]}
|d|
_
�q>W�|dj||�<x4t|d|t��d�D]}||dj|_�q�W|dj�dS)N�lambda�suite�argsr�rz; �Fcs\t�j��}|j�}d|_t||j��}|r2d|_|j|��jtjt	j
|�j�g��dS)Nr� )r�new_name�clone�prefixr�replace�appendrr
r
Zsimple_stmt)Z	tuple_arg�
add_prefix�n�argr)�end�	new_lines�selfrr�handle_tupleCs
z.FixTupleParams.transform.<locals>.handle_tuple)r"r)F)�transform_lambdarrr�INDENT�valuerrZLeafr
ZtfpdefZ
typedargslist�	enumerate�parentrr�range�lenZchanged)r'�node�resultsrr�start�indentr(�ir$�line�afterr)r%r&r'r�	transform.sF




 zFixTupleParams.transformc
Cs�|d}|d}t|d�}|jtjkrD|j�}d|_|j|�dSt|�}t|�}|j	t
|��}t|dd�}	|j|	j��xd|j�D]X}
|
jtjkr�|
j
|kr�dd�||
j
D�}tjtj|	j�g|�}|
j|_|
j|�q�WdS)Nr�body�innerr)rcSsg|]}|j��qSr)r)�.0�crrr�
<listcomp>�sz3FixTupleParams.transform_lambda.<locals>.<listcomp>)�
simplify_argsrr�NAMErrr �find_params�map_to_indexr�
tuple_namerZ
post_orderr+rr
r
Zpower)
r'r0r1rr8r9ZparamsZto_indexZtup_nameZ	new_paramr#Z
subscripts�newrrrr)ns(
zFixTupleParams.transform_lambdaN)�__name__�
__module__�__qualname__Z	run_orderZ
BM_compatibleZPATTERNr7r)rrrrrs

@rcCsR|jtjtjfkr|S|jtjkrBx|jtjkr<|jd}q$W|Std|��dS)NrzReceived unexpected node %s)rr
Zvfplistrr>�vfpdefr�RuntimeError)r0rrrr=�sr=cCs<|jtjkrt|jd�S|jtjkr,|jSdd�|jD�S)NrcSs g|]}|jtjkrt|��qSr)rr�COMMAr?)r:r;rrrr<�szfind_params.<locals>.<listcomp>)rr
rFr?rrr>r+)r0rrrr?�s
r?NcCs^|dkri}xLt|�D]@\}}ttt|���g}t|t�rJt|||d�q||||<qW|S)N)�d)r,r	r�strr�listr@)�
param_listrrIr4�objZtrailerrrrr@�s
r@cCs@g}x0|D](}t|t�r(|jt|��q
|j|�q
Wdj|�S)N�_)rrKr!rA�join)rL�lrMrrrrA�s

rA)�__doc__rrZpgen2rrZ
fixer_utilrrrrr	r
rZBaseFixrr=r?r@rArrrr�<module>s lPK�E[Z�ļ*__pycache__/fix_apply.cpython-36.opt-2.pycnu�[���3


 \~	�@sNddlmZddlmZddlmZddlmZmZmZGdd�dej	�Z
dS)�)�pytree)�token)�
fixer_base)�Call�Comma�parenthesizec@seZdZdZdZdd�ZdS)�FixApplyTa.
    power< 'apply'
        trailer<
            '('
            arglist<
                (not argument<NAME '=' any>) func=any ','
                (not argument<NAME '=' any>) args=any [','
                (not argument<NAME '=' any>) kwds=any] [',']
            >
            ')'
        >
    >
    c	Cs>|j}|d}|d}|jd�}|rX|j|jjkr6dS|j|jjkrX|jdjdkrXdS|r~|j|jjkr~|jdjdkr~dS|j}|j�}|jt	j
|jfkr�|j|jks�|jdjt	j
kr�t|�}d|_|j�}d|_|dk	r�|j�}d|_tjt	jd�|g}|dk	�r0|jt�tjt	j
d�|g�d	|d_t|||d
�S)
N�func�args�kwds�z**r��*� )�prefix���r)�syms�get�typeZ	star_exprZargumentZchildren�valuerZcloner�NAMEZatomZpower�
DOUBLESTARrrZLeaf�STAR�extendrr)	�selfZnodeZresultsrr	r
rrZ	l_newargs�r�//usr/lib64/python3.6/lib2to3/fixes/fix_apply.py�	transforms@


zFixApply.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)r
rZpgen2rrZ
fixer_utilrrrZBaseFixrrrrr�<module>	sPK�E[N���dd,__pycache__/fix_sys_exc.cpython-36.opt-1.pycnu�[���3


 \
�@sJdZddlmZddlmZmZmZmZmZm	Z	m
Z
Gdd�dej�ZdS)z�Fixer for sys.exc_{type, value, traceback}

sys.exc_type -> sys.exc_info()[0]
sys.exc_value -> sys.exc_info()[1]
sys.exc_traceback -> sys.exc_info()[2]
�)�
fixer_base)�Attr�Call�Name�Number�	Subscript�Node�symsc@s:eZdZdddgZdZddjdd�eD��Zd	d
�ZdS)�	FixSysExc�exc_type�	exc_value�
exc_tracebackTzN
              power< 'sys' trailer< dot='.' attribute=(%s) > >
              �|ccs|]}d|VqdS)z'%s'N�)�.0�err�1/usr/lib64/python3.6/lib2to3/fixes/fix_sys_exc.py�	<genexpr>szFixSysExc.<genexpr>cCst|dd}t|jj|j��}ttd�|jd�}ttd�|�}|dj|djd_|j	t
|��ttj
||jd�S)NZ	attribute��exc_info)�prefix�sys�dot�)rr�index�valuerrrrZchildren�appendrrr	Zpower)�selfZnodeZresultsZsys_attrrZcall�attrrrr�	transformszFixSysExc.transformN)�__name__�
__module__�__qualname__rZ
BM_compatible�joinZPATTERNrrrrrr
s
r
N)
�__doc__�rZ
fixer_utilrrrrrrr	ZBaseFixr
rrrr�<module>s$PK�E[��نuu+__pycache__/fix_intern.cpython-36.opt-1.pycnu�[���3


 \��@s6dZddlmZddlmZmZGdd�dej�ZdS)z/Fixer for intern().

intern(s) -> sys.intern(s)�)�
fixer_base)�
ImportAndCall�touch_importc@s eZdZdZdZdZdd�ZdS)�	FixInternTZprez�
    power< 'intern'
           trailer< lpar='('
                    ( not(arglist | argument<any '=' any>) obj=any
                      | obj=arglist<(not argument<any '=' any>) any ','> )
                    rpar=')' >
           after=any*
    >
    cCsd|rD|d}|rD|j|jjkr"dS|j|jjkrD|jdjdkrDdSd}t|||�}tdd|�|S)N�obj�z**�sys�intern)rr	)�typeZsymsZ	star_exprZargumentZchildren�valuerr)�selfZnodeZresultsr�names�new�r�0/usr/lib64/python3.6/lib2to3/fixes/fix_intern.py�	transformszFixIntern.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�orderZPATTERNrrrrrr
s
rN)�__doc__�rZ
fixer_utilrrZBaseFixrrrrr�<module>sPK�E[�rD���*__pycache__/fix_methodattrs.cpython-36.pycnu�[���3


 \^�@s>dZddlmZddlmZdddd�ZGdd	�d	ej�Zd
S)z;Fix bound method attributes (method.im_? -> method.__?__).
�)�
fixer_base)�Name�__func__�__self__z__self__.__class__)Zim_funcZim_selfZim_classc@seZdZdZdZdd�ZdS)�FixMethodattrsTzU
    power< any+ trailer< '.' attr=('im_func' | 'im_self' | 'im_class') > any* >
    cCs.|dd}t|j}|jt||jd��dS)N�attr�)�prefix)�MAP�value�replacerr	)�selfZnodeZresultsr�new�r�5/usr/lib64/python3.6/lib2to3/fixes/fix_methodattrs.py�	transforms
zFixMethodattrs.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)�__doc__�rZ
fixer_utilrr
ZBaseFixrrrrr�<module>sPK�E[g2����.__pycache__/fix_itertools.cpython-36.opt-2.pycnu�[���3


 \�@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Namec@s*eZdZdZdZde�ZdZdd�ZdS)�FixItertoolsTz7('imap'|'ifilter'|'izip'|'izip_longest'|'ifilterfalse')z�
              power< it='itertools'
                  trailer<
                     dot='.' func=%(it_funcs)s > trailer< '(' [any] ')' > >
              |
              power< func=%(it_funcs)s trailer< '(' [any] ')' > >
              �cCs�d}|dd}d|krV|jd	krV|d|d}}|j}|j�|j�|jj|�|p^|j}|jt|jdd�|d��dS)
N�func��it�ifilterfalse�izip_longest�dot�)�prefix)r	r
)�valuer
�remove�parent�replacer)�selfZnodeZresultsr
rrr�r�3/usr/lib64/python3.6/lib2to3/fixes/fix_itertools.py�	transforms

zFixItertools.transformN)	�__name__�
__module__�__qualname__Z
BM_compatibleZit_funcs�localsZPATTERNZ	run_orderrrrrrrs

rN)�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK�E[�K��(__pycache__/fix_itertools.cpython-36.pycnu�[���3


 \�@s2dZddlmZddlmZGdd�dej�ZdS)aT Fixer for itertools.(imap|ifilter|izip) --> (map|filter|zip) and
    itertools.ifilterfalse --> itertools.filterfalse (bugs 2360-2363)

    imports from itertools are fixed in fix_itertools_import.py

    If itertools is imported as something else (ie: import itertools as it;
    it.izip(spam, eggs)) method calls will not get fixed.
    �)�
fixer_base)�Namec@s*eZdZdZdZde�ZdZdd�ZdS)�FixItertoolsTz7('imap'|'ifilter'|'izip'|'izip_longest'|'ifilterfalse')z�
              power< it='itertools'
                  trailer<
                     dot='.' func=%(it_funcs)s > trailer< '(' [any] ')' > >
              |
              power< func=%(it_funcs)s trailer< '(' [any] ')' > >
              �cCs�d}|dd}d|krV|jd	krV|d|d}}|j}|j�|j�|jj|�|p^|j}|jt|jdd�|d��dS)
N�func��it�ifilterfalse�izip_longest�dot�)�prefix)r	r
)�valuer
�remove�parent�replacer)�selfZnodeZresultsr
rrr�r�3/usr/lib64/python3.6/lib2to3/fixes/fix_itertools.py�	transforms

zFixItertools.transformN)	�__name__�
__module__�__qualname__Z
BM_compatibleZit_funcs�localsZPATTERNZ	run_orderrrrrrrs

rN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK�E[���%__pycache__/fix_buffer.cpython-36.pycnu�[���3


 \N�@s2dZddlmZddlmZGdd�dej�ZdS)z4Fixer that changes buffer(...) into memoryview(...).�)�
fixer_base)�Namec@s eZdZdZdZdZdd�ZdS)�	FixBufferTzR
              power< name='buffer' trailer< '(' [any] ')' > any* >
              cCs |d}|jtd|jd��dS)N�name�
memoryview)�prefix)�replacerr)�selfZnodeZresultsr�r
�0/usr/lib64/python3.6/lib2to3/fixes/fix_buffer.py�	transformszFixBuffer.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZexplicitZPATTERNrr
r
r
rrsrN)�__doc__�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK�E[hRN���)__pycache__/fix_exec.cpython-36.opt-2.pycnu�[���3


 \��@s6ddlmZddlmZmZmZGdd�dej�ZdS)�)�
fixer_base)�Comma�Name�Callc@seZdZdZdZdd�ZdS)�FixExecTzx
    exec_stmt< 'exec' a=any 'in' b=any [',' c=any] >
    |
    exec_stmt< 'exec' (not atom<'(' [any] ')'>) a=any >
    cCs�|j}|d}|jd�}|jd�}|j�g}d|d_|dk	rR|jt�|j�g�|dk	rn|jt�|j�g�ttd�||jd�S)N�a�b�c���exec)�prefix)�syms�getZcloner
�extendrrr)�selfZnodeZresultsrrrr	�args�r�./usr/lib64/python3.6/lib2to3/fixes/fix_exec.py�	transforms



zFixExec.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)r
rZ
fixer_utilrrrZBaseFixrrrrr�<module>
sPK�E[�A	�uu%__pycache__/fix_reload.cpython-36.pycnu�[���3


 \��@s6dZddlmZddlmZmZGdd�dej�ZdS)z/Fixer for reload().

reload(s) -> imp.reload(s)�)�
fixer_base)�
ImportAndCall�touch_importc@s eZdZdZdZdZdd�ZdS)�	FixReloadTZprez�
    power< 'reload'
           trailer< lpar='('
                    ( not(arglist | argument<any '=' any>) obj=any
                      | obj=arglist<(not argument<any '=' any>) any ','> )
                    rpar=')' >
           after=any*
    >
    cCsd|rD|d}|rD|j|jjkr"dS|j|jjkrD|jdjdkrDdSd}t|||�}tdd|�|S)N�obj�z**�imp�reload)rr	)�typeZsymsZ	star_exprZargumentZchildren�valuerr)�selfZnodeZresultsr�names�new�r�0/usr/lib64/python3.6/lib2to3/fixes/fix_reload.py�	transformszFixReload.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�orderZPATTERNrrrrrr
s
rN)�__doc__�rZ
fixer_utilrrZBaseFixrrrrr�<module>sPK�E[�w�(__pycache__/fix_zip.cpython-36.opt-1.pycnu�[���3


 \	�@sRdZddlmZddlmZddlmZddlm	Z	m
Z
mZGdd�dej�Z
dS)	a7
Fixer that changes zip(seq0, seq1, ...) into list(zip(seq0, seq1, ...)
unless there exists a 'from future_builtins import zip' statement in the
top-level namespace.

We avoid the transformation if the zip() call is directly contained in
iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or for V in <>:.
�)�
fixer_base)�Node)�python_symbols)�Name�ArgList�in_special_contextc@s eZdZdZdZdZdd�ZdS)�FixZipTzN
    power< 'zip' args=trailer< '(' [any] ')' > [trailers=trailer*]
    >
    zfuture_builtins.zipcCs�|j|�rdSt|�rdS|dj�}d|_g}d|kr^dd�|dD�}x|D]
}d|_qPWttjtd�|gdd�}ttjtd�t|g�g|�}|j|_|S)	N�args��trailerscSsg|]}|j��qS�)�clone)�.0�nrr�-/usr/lib64/python3.6/lib2to3/fixes/fix_zip.py�
<listcomp>'sz$FixZip.transform.<locals>.<listcomp>�zip)�prefix�list)	Zshould_skiprr
rr�symsZpowerrr)�selfZnodeZresultsr	rr�newrrr�	transforms


zFixZip.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onrrrrrrsrN)�__doc__r
rZpytreerZpygramrrZ
fixer_utilrrrZConditionalFixrrrrr�<module>s
PK�E[��نuu%__pycache__/fix_intern.cpython-36.pycnu�[���3


 \��@s6dZddlmZddlmZmZGdd�dej�ZdS)z/Fixer for intern().

intern(s) -> sys.intern(s)�)�
fixer_base)�
ImportAndCall�touch_importc@s eZdZdZdZdZdd�ZdS)�	FixInternTZprez�
    power< 'intern'
           trailer< lpar='('
                    ( not(arglist | argument<any '=' any>) obj=any
                      | obj=arglist<(not argument<any '=' any>) any ','> )
                    rpar=')' >
           after=any*
    >
    cCsd|rD|d}|rD|j|jjkr"dS|j|jjkrD|jdjdkrDdSd}t|||�}tdd|�|S)N�obj�z**�sys�intern)rr	)�typeZsymsZ	star_exprZargumentZchildren�valuerr)�selfZnodeZresultsr�names�new�r�0/usr/lib64/python3.6/lib2to3/fixes/fix_intern.py�	transformszFixIntern.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�orderZPATTERNrrrrrr
s
rN)�__doc__�rZ
fixer_utilrrZBaseFixrrrrr�<module>sPK�E[�����,__pycache__/fix_has_key.cpython-36.opt-2.pycnu�[���3


 \|�@s>ddlmZddlmZddlmZmZGdd�dej�ZdS)�)�pytree)�
fixer_base)�Name�parenthesizec@seZdZdZdZdd�ZdS)�	FixHasKeyTa�
    anchor=power<
        before=any+
        trailer< '.' 'has_key' >
        trailer<
            '('
            ( not(arglist | argument<any '=' any>) arg=any
            | arglist<(not argument<any '=' any>) arg=any ','>
            )
            ')'
        >
        after=any*
    >
    |
    negation=not_test<
        'not'
        anchor=power<
            before=any+
            trailer< '.' 'has_key' >
            trailer<
                '('
                ( not(arglist | argument<any '=' any>) arg=any
                | arglist<(not argument<any '=' any>) arg=any ','>
                )
                ')'
            >
        >
    >
    c

Cs||j}|jj|jkr&|jj|j�r&dS|jd�}|d}|j}dd�|dD�}|dj�}|jd�}	|	rxdd�|	D�}	|j|j	|j|j
|j|j|j
|jfkr�t|�}t|�d	kr�|d
}ntj|j|�}d|_tddd
�}
|r�tddd
�}tj|j||
f�}
tj|j	||
|f�}|	�r8t|�}tj|j|ft|	��}|jj|j	|j|j|j|j|j|j|j|jf	k�rrt|�}||_|S)N�negation�anchorcSsg|]}|j��qS�)�clone)�.0�nr	r	�1/usr/lib64/python3.6/lib2to3/fixes/fix_has_key.py�
<listcomp>Rsz'FixHasKey.transform.<locals>.<listcomp>�before�arg�aftercSsg|]}|j��qSr	)r
)rrr	r	r
rVs��� �in)�prefix�not)�syms�parent�typeZnot_test�pattern�match�getrr
Z
comparisonZand_testZor_testZtestZlambdefZargumentr�lenrZNodeZpowerrZcomp_op�tuple�exprZxor_exprZand_exprZ
shift_exprZ
arith_exprZtermZfactor)
�selfZnodeZresultsrrrrrrrZn_opZn_not�newr	r	r
�	transformGsD


zFixHasKey.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr#r	r	r	r
r&srN)�rrZ
fixer_utilrrZBaseFixrr	r	r	r
�<module>!sPK�E['q����/__pycache__/fix_isinstance.cpython-36.opt-2.pycnu�[���3


 \H�@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�tokenc@s eZdZdZdZdZdd�ZdS)�
FixIsinstanceTz�
    power<
        'isinstance'
        trailer< '(' arglist< any ',' atom< '('
            args=testlist_gexp< any+ >
        ')' > > ')' >
    >
    �cCs�t�}|d}|j}g}t|�}xx|D]p\}}	|	jtjkrt|	j|krt|t|�dkr�||djtjkr�t	|�q&q&|j
|	�|	jtjkr&|j|	j�q&W|r�|djtjkr�|d=t|�dkr�|j}
|
j
|d_
|
j|d�n||dd�<|j�dS)N�args�����r	)�setZchildren�	enumerate�typer�NAME�value�len�COMMA�next�append�add�parent�prefix�replaceZchanged)�selfZnodeZresultsZnames_insertedZtestlistrZnew_args�iterator�idx�argZatom�r�4/usr/lib64/python3.6/lib2to3/fixes/fix_isinstance.py�	transforms*$
zFixIsinstance.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZ	run_orderrrrrrrsrN)�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK�E[aI䖪�-__pycache__/fix_imports2.cpython-36.opt-2.pycnu�[���3


 \!�@s,ddlmZddd�ZGdd�dej�ZdS)�)�fix_importsZdbm)ZwhichdbZanydbmc@seZdZdZeZdS)�FixImports2�N)�__name__�
__module__�__qualname__Z	run_order�MAPPING�mapping�r
r
�2/usr/lib64/python3.6/lib2to3/fixes/fix_imports2.pyrsrN)�rrZ
FixImportsrr
r
r
r�<module>sPK�E[U���-__pycache__/fix_exitfunc.cpython-36.opt-2.pycnu�[���3


 \�	�@sFddlmZmZddlmZmZmZmZmZm	Z	Gdd�dej
�ZdS)�)�pytree�
fixer_base)�Name�Attr�Call�Comma�Newline�symscs<eZdZdZdZdZ�fdd�Z�fdd�Zdd�Z�Z	S)	�FixExitfuncTa�
              (
                  sys_import=import_name<'import'
                      ('sys'
                      |
                      dotted_as_names< (any ',')* 'sys' (',' any)* >
                      )
                  >
              |
                  expr_stmt<
                      power< 'sys' trailer< '.' 'exitfunc' > >
                  '=' func=any >
              )
              cstt|�j|�dS)N)�superr
�__init__)�self�args)�	__class__��2/usr/lib64/python3.6/lib2to3/fixes/fix_exitfunc.pyrszFixExitfunc.__init__cstt|�j||�d|_dS)N)rr
�
start_tree�
sys_import)r
Ztree�filename)rrrr!szFixExitfunc.start_treecCs&d|kr |jdkr|d|_dS|dj�}d|_tjtjttd�td���}t	||g|j�}|j
|�|jdkr�|j|d�dS|jjd}|j
tjkr�|jt��|jtdd��nj|jj}|jj|j�}|j}	tjtjtd	�tdd�g�}
tjtj|
g�}|j|dt��|j|d
|�dS)Nr�func��atexit�registerzKCan't find sys import; Please add an atexit import at the top of your file.�� �import�)rZclone�prefixrZNoder	Zpowerrrr�replaceZwarningZchildren�typeZdotted_as_namesZappend_childr�parent�indexZimport_nameZsimple_stmtZinsert_childr)r
ZnodeZresultsrrZcall�namesZcontaining_stmtZpositionZstmt_containerZ
new_import�newrrr�	transform%s2



zFixExitfunc.transform)
�__name__�
__module__�__qualname__Zkeep_line_orderZ
BM_compatibleZPATTERNrrr$�
__classcell__rr)rrr
sr
N)Zlib2to3rrZlib2to3.fixer_utilrrrrrr	ZBaseFixr
rrrr�<module>s PK�E[��l�55,__pycache__/fix_has_key.cpython-36.opt-1.pycnu�[���3


 \|�@sBdZddlmZddlmZddlmZmZGdd�dej�ZdS)a&Fixer for has_key().

Calls to .has_key() methods are expressed in terms of the 'in'
operator:

    d.has_key(k) -> k in d

CAVEATS:
1) While the primary target of this fixer is dict.has_key(), the
   fixer will change any has_key() method call, regardless of its
   class.

2) Cases like this will not be converted:

    m = d.has_key
    if m(k):
        ...

   Only *calls* to has_key() are converted. While it is possible to
   convert the above to something like

    m = d.__contains__
    if m(k):
        ...

   this is currently not done.
�)�pytree)�
fixer_base)�Name�parenthesizec@seZdZdZdZdd�ZdS)�	FixHasKeyTa�
    anchor=power<
        before=any+
        trailer< '.' 'has_key' >
        trailer<
            '('
            ( not(arglist | argument<any '=' any>) arg=any
            | arglist<(not argument<any '=' any>) arg=any ','>
            )
            ')'
        >
        after=any*
    >
    |
    negation=not_test<
        'not'
        anchor=power<
            before=any+
            trailer< '.' 'has_key' >
            trailer<
                '('
                ( not(arglist | argument<any '=' any>) arg=any
                | arglist<(not argument<any '=' any>) arg=any ','>
                )
                ')'
            >
        >
    >
    c

Cs||j}|jj|jkr&|jj|j�r&dS|jd�}|d}|j}dd�|dD�}|dj�}|jd�}	|	rxdd�|	D�}	|j|j	|j|j
|j|j|j
|jfkr�t|�}t|�d	kr�|d
}ntj|j|�}d|_tddd
�}
|r�tddd
�}tj|j||
f�}
tj|j	||
|f�}|	�r8t|�}tj|j|ft|	��}|jj|j	|j|j|j|j|j|j|j|jf	k�rrt|�}||_|S)N�negation�anchorcSsg|]}|j��qS�)�clone)�.0�nr	r	�1/usr/lib64/python3.6/lib2to3/fixes/fix_has_key.py�
<listcomp>Rsz'FixHasKey.transform.<locals>.<listcomp>�before�arg�aftercSsg|]}|j��qSr	)r
)rrr	r	r
rVs��� �in)�prefix�not)�syms�parent�typeZnot_test�pattern�match�getrr
Z
comparisonZand_testZor_testZtestZlambdefZargumentr�lenrZNodeZpowerrZcomp_op�tuple�exprZxor_exprZand_exprZ
shift_exprZ
arith_exprZtermZfactor)
�selfZnodeZresultsrrrrrrrZn_opZn_not�newr	r	r
�	transformGsD


zFixHasKey.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr#r	r	r	r
r&srN)	�__doc__�rrZ
fixer_utilrrZBaseFixrr	r	r	r
�<module>sPK�E[�:�~��(__pycache__/fix_zip.cpython-36.opt-2.pycnu�[���3


 \	�@sNddlmZddlmZddlmZddlmZm	Z	m
Z
Gdd�dej�ZdS)�)�
fixer_base)�Node)�python_symbols)�Name�ArgList�in_special_contextc@s eZdZdZdZdZdd�ZdS)�FixZipTzN
    power< 'zip' args=trailer< '(' [any] ')' > [trailers=trailer*]
    >
    zfuture_builtins.zipcCs�|j|�rdSt|�rdS|dj�}d|_g}d|kr^dd�|dD�}x|D]
}d|_qPWttjtd�|gdd�}ttjtd�t|g�g|�}|j|_|S)	N�args��trailerscSsg|]}|j��qS�)�clone)�.0�nrr�-/usr/lib64/python3.6/lib2to3/fixes/fix_zip.py�
<listcomp>'sz$FixZip.transform.<locals>.<listcomp>�zip)�prefix�list)	Zshould_skiprr
rr�symsZpowerrr)�selfZnodeZresultsr	rr�newrrr�	transforms


zFixZip.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onrrrrrrsrN)
r
rZpytreerZpygramrrZ
fixer_utilrrrZConditionalFixrrrrr�<module>sPK�E[���YY*__pycache__/fix_paren.cpython-36.opt-1.pycnu�[���3


 \��@s6dZddlmZddlmZmZGdd�dej�ZdS)zuFixer that addes parentheses where they are required

This converts ``[x for x in 1, 2]`` to ``[x for x in (1, 2)]``.�)�
fixer_base)�LParen�RParenc@seZdZdZdZdd�ZdS)�FixParenTa
        atom< ('[' | '(')
            (listmaker< any
                comp_for<
                    'for' NAME 'in'
                    target=testlist_safe< any (',' any)+ [',']
                     >
                    [any]
                >
            >
            |
            testlist_gexp< any
                comp_for<
                    'for' NAME 'in'
                    target=testlist_safe< any (',' any)+ [',']
                     >
                    [any]
                >
            >)
        (']' | ')') >
    cCs8|d}t�}|j|_d|_|jd|�|jt��dS)N�target��)r�prefixZinsert_childZappend_childr)�selfZnodeZresultsrZlparen�r�//usr/lib64/python3.6/lib2to3/fixes/fix_paren.py�	transform%szFixParen.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrrrsrN)�__doc__rrZ
fixer_utilrrZBaseFixrrrrr�<module>sPK�E[��.]55+__pycache__/fix_intern.cpython-36.opt-2.pycnu�[���3


 \��@s2ddlmZddlmZmZGdd�dej�ZdS)�)�
fixer_base)�
ImportAndCall�touch_importc@s eZdZdZdZdZdd�ZdS)�	FixInternTZprez�
    power< 'intern'
           trailer< lpar='('
                    ( not(arglist | argument<any '=' any>) obj=any
                      | obj=arglist<(not argument<any '=' any>) any ','> )
                    rpar=')' >
           after=any*
    >
    cCsd|rD|d}|rD|j|jjkr"dS|j|jjkrD|jdjdkrDdSd}t|||�}tdd|�|S)N�obj�z**�sys�intern)rr	)�typeZsymsZ	star_exprZargumentZchildren�valuerr)�selfZnodeZresultsr�names�new�r�0/usr/lib64/python3.6/lib2to3/fixes/fix_intern.py�	transformszFixIntern.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�orderZPATTERNrrrrrr
s
rN)�rZ
fixer_utilrrZBaseFixrrrrr�<module>	sPK�E[�>�fhh#__pycache__/fix_exec.cpython-36.pycnu�[���3


 \��@s:dZddlmZddlmZmZmZGdd�dej�ZdS)z�Fixer for exec.

This converts usages of the exec statement into calls to a built-in
exec() function.

exec code in ns1, ns2 -> exec(code, ns1, ns2)
�)�
fixer_base)�Comma�Name�Callc@seZdZdZdZdd�ZdS)�FixExecTzx
    exec_stmt< 'exec' a=any 'in' b=any [',' c=any] >
    |
    exec_stmt< 'exec' (not atom<'(' [any] ')'>) a=any >
    cCs�|st�|j}|d}|jd�}|jd�}|j�g}d|d_|dk	rZ|jt�|j�g�|dk	rv|jt�|j�g�ttd�||jd�S)N�a�b�c���exec)�prefix)	�AssertionError�syms�getZcloner
�extendrrr)�selfZnodeZresultsrrrr	�args�r�./usr/lib64/python3.6/lib2to3/fixes/fix_exec.py�	transforms



zFixExec.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)	�__doc__r
rZ
fixer_utilrrrZBaseFixrrrrr�<module>
sPK�E[&�"��6__pycache__/fix_itertools_imports.cpython-36.opt-2.pycnu�[���3


 \&�@s6ddlmZddlmZmZmZGdd�dej�ZdS)�)�
fixer_base)�	BlankLine�syms�tokenc@s"eZdZdZde�Zdd�ZdS)�FixItertoolsImportsTzT
              import_from< 'from' 'itertools' 'import' imports=any >
              cCsl|d}|jtjks|jr$|g}n|j}x�|ddd�D]z}|jtjkrV|j}|}n|jtjkrfdS|jd}|j}|dkr�d|_|j�q:|dkr:|j	�|d	d
kr�dnd|_q:W|jdd�p�|g}d
}	x0|D](}|	o�|jtj
k�r�|j�q�|	d
N}	q�Wx*|�r,|djtj
k�r,|j�j��qW|j�p@t|dd��sR|j
dk�rh|j}
t�}|
|_|SdS)N�imports�r�imap�izip�ifilter�ifilterfalse�izip_longest��f�filterfalse�zip_longestT�value)r	r
r)rr
���)�typerZimport_as_name�childrenr�NAMEr�STAR�removeZchanged�COMMA�pop�getattr�parent�prefixr)�selfZnodeZresultsrrZchild�memberZ	name_node�member_nameZremove_comma�p�r"�;/usr/lib64/python3.6/lib2to3/fixes/fix_itertools_imports.py�	transformsB




zFixItertoolsImports.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�localsZPATTERNr$r"r"r"r#rs
rN)Zlib2to3rZlib2to3.fixer_utilrrrZBaseFixrr"r"r"r#�<module>sPK�E[��G$	$	%__pycache__/fix_filter.cpython-36.pycnu�[���3


 \[
�@sVdZddlmZddlmZddlmZddlm	Z	m
Z
mZmZGdd�dej
�ZdS)	a�Fixer that changes filter(F, X) into list(filter(F, X)).

We avoid the transformation if the filter() call is directly contained
in iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or
for V in <>:.

NOTE: This is still not correct if the original code was depending on
filter(F, X) to return a string if X is a string and a tuple if X is a
tuple.  That would require type inference, which we don't do.  Let
Python 2.6 figure it out.
�)�
fixer_base)�Node)�python_symbols)�Name�ArgList�ListComp�in_special_contextc@s eZdZdZdZdZdd�ZdS)�	FixFilterTaV
    filter_lambda=power<
        'filter'
        trailer<
            '('
            arglist<
                lambdef< 'lambda'
                         (fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any
                >
                ','
                it=any
            >
            ')'
        >
        [extra_trailers=trailer*]
    >
    |
    power<
        'filter'
        trailer< '(' arglist< none='None' ',' seq=any > ')' >
        [extra_trailers=trailer*]
    >
    |
    power<
        'filter'
        args=trailer< '(' [any] ')' >
        [extra_trailers=trailer*]
    >
    zfuture_builtins.filtercCs2|j|�rdSg}d|kr:x|dD]}|j|j��q$Wd|kr�t|jd�j�|jd�j�|jd�j�|jd�j��}ttj|g|dd�}n�d|kr�ttd	�td	�|d
j�td	��}ttj|g|dd�}nTt	|�r�dS|dj�}ttjtd�|gdd�}ttjtd
�t
|g�g|�}d|_|j|_|S)NZextra_trailersZ
filter_lambda�fp�itZxp�)�prefixZnoneZ_f�seq�args�filter�list)Zshould_skip�appendZcloner�getr�symsZpowerrrrr
)�selfZnodeZresultsZtrailers�t�newr�r�0/usr/lib64/python3.6/lib2to3/fixes/fix_filter.py�	transform:s4


zFixFilter.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onrrrrrr	sr	N)�__doc__rrZpytreerZpygramrrZ
fixer_utilrrrrZConditionalFixr	rrrr�<module>s
PK�E[�"*��#__pycache__/fix_long.cpython-36.pycnu�[���3


 \��@s2dZddlmZddlmZGdd�dej�ZdS)z/Fixer that turns 'long' into 'int' everywhere.
�)�
fixer_base)�is_probably_builtinc@seZdZdZdZdd�ZdS)�FixLongTz'long'cCst|�rd|_|j�dS)N�int)r�valueZchanged)�selfZnodeZresults�r�./usr/lib64/python3.6/lib2to3/fixes/fix_long.py�	transformszFixLong.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrr	rsrN)�__doc__Zlib2to3rZlib2to3.fixer_utilrZBaseFixrrrrr	�<module>sPK�E[�̻���$__pycache__/fix_apply.cpython-36.pycnu�[���3


 \~	�@sRdZddlmZddlmZddlmZddlmZmZm	Z	Gdd�dej
�ZdS)	zIFixer for apply().

This converts apply(func, v, k) into (func)(*v, **k).�)�pytree)�token)�
fixer_base)�Call�Comma�parenthesizec@seZdZdZdZdd�ZdS)�FixApplyTa.
    power< 'apply'
        trailer<
            '('
            arglist<
                (not argument<NAME '=' any>) func=any ','
                (not argument<NAME '=' any>) args=any [','
                (not argument<NAME '=' any>) kwds=any] [',']
            >
            ')'
        >
    >
    c	CsF|j}|st�|d}|d}|jd�}|r`|j|jjkr>dS|j|jjkr`|jdjdkr`dS|r�|j|jjkr�|jdjdkr�dS|j}|j	�}|jt
j|jfkr�|j|j
ks�|jdjt
jkr�t|�}d|_|j	�}d|_|dk	r�|j	�}d|_tjt
jd�|g}|dk	�r8|jt�tjt
jd�|g�d	|d_t|||d
�S)
N�func�args�kwds�z**r��*� )�prefix���r)�syms�AssertionError�get�typeZ	star_exprZargumentZchildren�valuerZcloner�NAMEZatomZpower�
DOUBLESTARrrZLeaf�STAR�extendrr)	�selfZnodeZresultsrr	r
rrZ	l_newargs�r�//usr/lib64/python3.6/lib2to3/fixes/fix_apply.py�	transformsB


zFixApply.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)�__doc__r
rZpgen2rrZ
fixer_utilrrrZBaseFixrrrrr�<module>s
PK�E[�#���0__pycache__/fix_numliterals.cpython-36.opt-1.pycnu�[���3


 \�@s>dZddlmZddlmZddlmZGdd�dej�ZdS)z-Fixer that turns 1L into 1, 0755 into 0o755.
�)�token)�
fixer_base)�Numberc@s"eZdZejZdd�Zdd�ZdS)�FixNumliteralscCs|jjd�p|jddkS)N�0��Ll���)�value�
startswith)�self�node�r�5/usr/lib64/python3.6/lib2to3/fixes/fix_numliterals.py�matchszFixNumliterals.matchcCs`|j}|ddkr |dd�}n2|jd�rR|j�rRtt|��dkrRd|dd�}t||jd�S)NrrrZ0o)�prefixr	r	)r
r�isdigit�len�setrr)rr
Zresults�valrrr�	transforms"zFixNumliterals.transformN)�__name__�
__module__�__qualname__r�NUMBERZ_accept_typerrrrrrrsrN)	�__doc__Zpgen2r�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK�E[�y��#__pycache__/fix_next.cpython-36.pycnu�[���3


 \f�@sndZddlmZddlmZddlmZddlm	Z	m
Z
mZdZGdd�dej
�Zd	d
�Zdd�Zd
d�ZdS)z.Fixer for it.next() -> next(it), per PEP 3114.�)�token)�python_symbols)�
fixer_base)�Name�Call�find_bindingz;Calls to builtin next() possibly shadowed by global bindingcs0eZdZdZdZdZ�fdd�Zdd�Z�ZS)�FixNextTa�
    power< base=any+ trailer< '.' attr='next' > trailer< '(' ')' > >
    |
    power< head=any+ trailer< '.' attr='next' > not trailer< '(' ')' > >
    |
    classdef< 'class' any+ ':'
              suite< any*
                     funcdef< 'def'
                              name='next'
                              parameters< '(' NAME ')' > any+ >
                     any* > >
    |
    global=global_stmt< 'global' any* 'next' any* >
    Zprecs>tt|�j||�td|�}|r4|j|t�d|_nd|_dS)N�nextTF)�superr�
start_treer�warning�bind_warning�
shadowed_next)�selfZtree�filename�n)�	__class__��./usr/lib64/python3.6/lib2to3/fixes/fix_next.pyr$s
zFixNext.start_treecCs|st�|jd�}|jd�}|jd�}|rz|jrF|jtd|jd��n2dd�|D�}d|d	_|jttd
|jd�|��n�|r�td|jd�}|j|�nl|r�t|�r�|d}djdd�|D��j	�d
kr�|j
|t�dS|jtd��nd|k�r|j
|t�d|_dS)N�base�attr�name�__next__)�prefixcSsg|]}|j��qSr)Zclone)�.0rrrr�
<listcomp>9sz%FixNext.transform.<locals>.<listcomp>��r	�headcSsg|]}t|��qSr)�str)rrrrrrEsZ__builtin__�globalT)�AssertionError�getr�replacerrr�is_assign_target�join�striprr
)r�nodeZresultsrrrrrrrr�	transform.s.




zFixNext.transform)	�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERN�orderrr(�
__classcell__rr)rrrs

rcCsFt|�}|dkrdSx,|jD]"}|jtjkr0dSt||�rdSqWdS)NFT)�find_assign�children�typer�EQUAL�
is_subtree)r'ZassignZchildrrrr$Qs
r$cCs4|jtjkr|S|jtjks&|jdkr*dSt|j�S)N)r0�symsZ	expr_stmtZsimple_stmt�parentr.)r'rrrr.]s
r.cs$|�krdSt�fdd�|jD��S)NTc3s|]}t|��VqdS)N)r2)r�c)r'rr�	<genexpr>gszis_subtree.<locals>.<genexpr>)�anyr/)�rootr'r)r'rr2dsr2N)�__doc__Zpgen2rZpygramrr3rrZ
fixer_utilrrrr
ZBaseFixrr$r.r2rrrr�<module>s@PK�E[*wGV��*__pycache__/fix_print.cpython-36.opt-2.pycnu�[���3


 \�@shddlmZddlmZddlmZddlmZddlmZmZm	Z	m
Z
ejd�ZGdd�dej
�Zd	S)
�)�patcomp)�pytree)�token)�
fixer_base)�Name�Call�Comma�Stringz"atom< '(' [atom|STRING|NAME] ')' >c@s$eZdZdZdZdd�Zdd�ZdS)�FixPrintTzP
              simple_stmt< any* bare='print' any* > | print_stmt
              c
Cs`|jd�}|r,|jttd�g|jd��dS|jdd�}t|�dkrXtj|d�rXdSd}}}|r�|dt	�kr�|dd�}d}|r�|dt
jtj
d�kr�|dj�}|dd�}d	d
�|D�}|r�d|d_|dk	s�|dk	s�|dk	�rF|dk	�r|j|dtt|���|dk	�r.|j|d
tt|���|dk	�rF|j|d|�ttd�|�}	|j|	_|	S)NZbare�print)�prefix��� z>>�cSsg|]}|j��qS�)�clone)�.0�argrr�//usr/lib64/python3.6/lib2to3/fixes/fix_print.py�
<listcomp>?sz&FixPrint.transform.<locals>.<listcomp>��sep�end�file���r)�get�replacerrrZchildren�len�parend_expr�matchrr�Leafr�
RIGHTSHIFTr�	add_kwargr	�repr)
�selfZnodeZresultsZ
bare_print�argsrrrZl_argsZn_stmtrrr�	transform%s8




zFixPrint.transformcCsNd|_tj|jjt|�tjtjd�|f�}|r@|j	t
��d|_|j	|�dS)Nr�=r)rrZNodeZsymsZargumentrr!r�EQUAL�appendr)r%Zl_nodesZs_kwdZn_exprZ
n_argumentrrrr#Ms
zFixPrint.add_kwargN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr'r#rrrrr
s(r
N)rrrZpgen2rrZ
fixer_utilrrrr	Zcompile_patternrZBaseFixr
rrrr�<module>sPK�E[6#3�ll)__pycache__/fix_long.cpython-36.opt-2.pycnu�[���3


 \��@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�is_probably_builtinc@seZdZdZdZdd�ZdS)�FixLongTz'long'cCst|�rd|_|j�dS)N�int)r�valueZchanged)�selfZnodeZresults�r�./usr/lib64/python3.6/lib2to3/fixes/fix_long.py�	transformszFixLong.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrr	rsrN)Zlib2to3rZlib2to3.fixer_utilrZBaseFixrrrrr	�<module>sPK�E[D�.?440__pycache__/fix_itertools_imports.cpython-36.pycnu�[���3


 \&�@s:dZddlmZddlmZmZmZGdd�dej�ZdS)zA Fixer for imports of itertools.(imap|ifilter|izip|ifilterfalse) �)�
fixer_base)�	BlankLine�syms�tokenc@s"eZdZdZde�Zdd�ZdS)�FixItertoolsImportsTzT
              import_from< 'from' 'itertools' 'import' imports=any >
              cCs~|d}|jtjks|jr$|g}n|j}x�|ddd�D]�}|jtjkrV|j}|}n*|jtjkrfdS|jtjksvt�|jd}|j}|dkr�d|_|j	�q:|dkr:|j
�|d	d
kr�dnd|_q:W|jdd�p�|g}d
}	x2|D]*}|	�r|jtjk�r|j	�q�|	d
N}	q�Wx*|�r>|djtjk�r>|j�j	��qW|j�pRt
|dd��sd|jdk�rz|j}
t�}|
|_|SdS)N�imports�r�imap�izip�ifilter�ifilterfalse�izip_longest��f�filterfalse�zip_longestT�value)r	r
r)rr
���)�typerZimport_as_name�childrenr�NAMEr�STAR�AssertionError�removeZchanged�COMMA�pop�getattr�parent�prefixr)�selfZnodeZresultsrrZchild�memberZ	name_node�member_nameZremove_comma�p�r#�;/usr/lib64/python3.6/lib2to3/fixes/fix_itertools_imports.py�	transformsD




zFixItertoolsImports.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�localsZPATTERNr%r#r#r#r$rs
rN)	�__doc__Zlib2to3rZlib2to3.fixer_utilrrrZBaseFixrr#r#r#r$�<module>sPK�E[a�)__pycache__/fix_isinstance.cpython-36.pycnu�[���3


 \H�@s2dZddlmZddlmZGdd�dej�ZdS)a,Fixer that cleans up a tuple argument to isinstance after the tokens
in it were fixed.  This is mainly used to remove double occurrences of
tokens as a leftover of the long -> int / unicode -> str conversion.

eg.  isinstance(x, (int, long)) -> isinstance(x, (int, int))
       -> isinstance(x, int)
�)�
fixer_base)�tokenc@s eZdZdZdZdZdd�ZdS)�
FixIsinstanceTz�
    power<
        'isinstance'
        trailer< '(' arglist< any ',' atom< '('
            args=testlist_gexp< any+ >
        ')' > > ')' >
    >
    �cCs�t�}|d}|j}g}t|�}xx|D]p\}}	|	jtjkrt|	j|krt|t|�dkr�||djtjkr�t	|�q&q&|j
|	�|	jtjkr&|j|	j�q&W|r�|djtjkr�|d=t|�dkr�|j}
|
j
|d_
|
j|d�n||dd�<|j�dS)N�args�����r	)�setZchildren�	enumerate�typer�NAME�value�len�COMMA�next�append�add�parent�prefix�replaceZchanged)�selfZnodeZresultsZnames_insertedZtestlistrZnew_args�iterator�idx�argZatom�r�4/usr/lib64/python3.6/lib2to3/fixes/fix_isinstance.py�	transforms*$
zFixIsinstance.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZ	run_orderrrrrrrsrN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr�<module>
sPK�E[���a��-__pycache__/fix_ws_comma.cpython-36.opt-2.pycnu�[���3


 \B�@s:ddlmZddlmZddlmZGdd�dej�ZdS)�)�pytree)�token)�
fixer_basec@s@eZdZdZdZejejd�Zejej	d�Z	ee	fZ
dd�ZdS)�
FixWsCommaTzH
    any<(not(',') any)+ ',' ((not(',') any)+ ',')* [not(',') any]>
    �,�:cCsd|j�}d}xR|jD]H}||jkrD|j}|j�r>d|kr>d|_d}q|rX|j}|sXd|_d}qW|S)NF�
�T� )ZcloneZchildren�SEPS�prefix�isspace)�selfZnodeZresults�newZcommaZchildr�r�2/usr/lib64/python3.6/lib2to3/fixes/fix_ws_comma.py�	transforms
zFixWsComma.transformN)�__name__�
__module__�__qualname__ZexplicitZPATTERNrZLeafr�COMMA�COLONrrrrrrrsrN)r	rZpgen2rrZBaseFixrrrrr�<module>sPK�E[8ڒ�!__pycache__/fix_ne.cpython-36.pycnu�[���3


 \;�@s>dZddlmZddlmZddlmZGdd�dej�ZdS)zFixer that turns <> into !=.�)�pytree)�token)�
fixer_basec@s"eZdZejZdd�Zdd�ZdS)�FixNecCs
|jdkS)Nz<>)�value)�self�node�r	�,/usr/lib64/python3.6/lib2to3/fixes/fix_ne.py�matchszFixNe.matchcCstjtjd|jd�}|S)Nz!=)�prefix)rZLeafr�NOTEQUALr)rrZresults�newr	r	r
�	transformszFixNe.transformN)�__name__�
__module__�__qualname__rr
Z_accept_typerrr	r	r	r
rsrN)�__doc__�rZpgen2rrZBaseFixrr	r	r	r
�<module>sPK�E[��k/$__pycache__/fix_types.cpython-36.pycnu�[���3


 \��@spdZddlmZddlmZddddddd	d
dddd
dddddddddd�Zdd�eD�ZGdd�dej�ZdS)a�Fixer for removing uses of the types module.

These work for only the known names in the types module.  The forms above
can include types. or not.  ie, It is assumed the module is imported either as:

    import types
    from types import ... # either * or specific types

The import statements are not modified.

There should be another fixer that handles at least the following constants:

   type([]) -> list
   type(()) -> tuple
   type('') -> str

�)�
fixer_base)�Name�bool�
memoryview�type�complex�dictztype(Ellipsis)�float�int�list�objectz
type(None)ztype(NotImplemented)�slice�bytesz(str,)�tuple�str�range)ZBooleanTypeZ
BufferTypeZ	ClassTypeZComplexTypeZDictTypeZDictionaryTypeZEllipsisTypeZ	FloatTypeZIntTypeZListTypeZLongTypeZ
ObjectTypeZNoneTypeZNotImplementedTypeZ	SliceTypeZ
StringTypeZStringTypesZ	TupleTypeZTypeTypeZUnicodeTypeZ
XRangeTypecCsg|]}d|�qS)z)power< 'types' trailer< '.' name='%s' > >�)�.0�trr�//usr/lib64/python3.6/lib2to3/fixes/fix_types.py�
<listcomp>3src@s"eZdZdZdje�Zdd�ZdS)�FixTypesT�|cCs&tj|dj�}|r"t||jd�SdS)N�name)�prefix)�
_TYPE_MAPPING�get�valuerr)�selfZnodeZresultsZ	new_valuerrr�	transform9szFixTypes.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�join�_patsZPATTERNrrrrrr5s
rN)	�__doc__�rZ
fixer_utilrrr$ZBaseFixrrrrr�<module>s2PK�E[��{4��&__pycache__/fix_nonzero.cpython-36.pycnu�[���3


 \O�@s2dZddlmZddlmZGdd�dej�ZdS)z*Fixer for __nonzero__ -> __bool__ methods.�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixNonzeroTz�
    classdef< 'class' any+ ':'
              suite< any*
                     funcdef< 'def' name='__nonzero__'
                              parameters< '(' NAME ')' > any+ >
                     any* > >
    cCs$|d}td|jd�}|j|�dS)N�name�__bool__)�prefix)rr�replace)�selfZnodeZresultsr�new�r�1/usr/lib64/python3.6/lib2to3/fixes/fix_nonzero.py�	transformszFixNonzero.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrrrsrN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK�E[t�u55+__pycache__/fix_reload.cpython-36.opt-2.pycnu�[���3


 \��@s2ddlmZddlmZmZGdd�dej�ZdS)�)�
fixer_base)�
ImportAndCall�touch_importc@s eZdZdZdZdZdd�ZdS)�	FixReloadTZprez�
    power< 'reload'
           trailer< lpar='('
                    ( not(arglist | argument<any '=' any>) obj=any
                      | obj=arglist<(not argument<any '=' any>) any ','> )
                    rpar=')' >
           after=any*
    >
    cCsd|rD|d}|rD|j|jjkr"dS|j|jjkrD|jdjdkrDdSd}t|||�}tdd|�|S)N�obj�z**�imp�reload)rr	)�typeZsymsZ	star_exprZargumentZchildren�valuerr)�selfZnodeZresultsr�names�new�r�0/usr/lib64/python3.6/lib2to3/fixes/fix_reload.py�	transformszFixReload.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�orderZPATTERNrrrrrr
s
rN)�rZ
fixer_utilrrZBaseFixrrrrr�<module>sPK�E[^�D:6__pycache__/fix_itertools_imports.cpython-36.opt-1.pycnu�[���3


 \&�@s:dZddlmZddlmZmZmZGdd�dej�ZdS)zA Fixer for imports of itertools.(imap|ifilter|izip|ifilterfalse) �)�
fixer_base)�	BlankLine�syms�tokenc@s"eZdZdZde�Zdd�ZdS)�FixItertoolsImportsTzT
              import_from< 'from' 'itertools' 'import' imports=any >
              cCsl|d}|jtjks|jr$|g}n|j}x�|ddd�D]z}|jtjkrV|j}|}n|jtjkrfdS|jd}|j}|dkr�d|_|j�q:|dkr:|j	�|d	d
kr�dnd|_q:W|jdd�p�|g}d
}	x0|D](}|	o�|jtj
k�r�|j�q�|	d
N}	q�Wx*|�r,|djtj
k�r,|j�j��qW|j�p@t|dd��sR|j
dk�rh|j}
t�}|
|_|SdS)N�imports�r�imap�izip�ifilter�ifilterfalse�izip_longest��f�filterfalse�zip_longestT�value)r	r
r)rr
���)�typerZimport_as_name�childrenr�NAMEr�STAR�removeZchanged�COMMA�pop�getattr�parent�prefixr)�selfZnodeZresultsrrZchild�memberZ	name_node�member_nameZremove_comma�p�r"�;/usr/lib64/python3.6/lib2to3/fixes/fix_itertools_imports.py�	transformsB




zFixItertoolsImports.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�localsZPATTERNr$r"r"r"r#rs
rN)	�__doc__Zlib2to3rZlib2to3.fixer_utilrrrZBaseFixrr"r"r"r#�<module>sPK�E[�9z��*__pycache__/fix_input.cpython-36.opt-1.pycnu�[���3


 \��@sLdZddlmZddlmZmZddlmZejd�ZGdd�dej	�Z
dS)	z4Fixer that changes input(...) into eval(input(...)).�)�
fixer_base)�Call�Name)�patcompz&power< 'eval' trailer< '(' any ')' > >c@seZdZdZdZdd�ZdS)�FixInputTzL
              power< 'input' args=trailer< '(' [any] ')' > >
              cCs6tj|jj�rdS|j�}d|_ttd�|g|jd�S)N��eval)�prefix)�context�match�parentZcloner	rr)�selfZnodeZresults�new�r�//usr/lib64/python3.6/lib2to3/fixes/fix_input.py�	transforms
zFixInput.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrr
srN)�__doc__rrZ
fixer_utilrrrZcompile_patternr
ZBaseFixrrrrr�<module>s

PK�E[�Zq���)__pycache__/fix_dict.cpython-36.opt-1.pycnu�[���3


 \��@sjdZddlmZddlmZddlmZddlmZmZmZddlmZej	dhBZ
Gdd	�d	ej�Zd
S)ajFixer for dict methods.

d.keys() -> list(d.keys())
d.items() -> list(d.items())
d.values() -> list(d.values())

d.iterkeys() -> iter(d.keys())
d.iteritems() -> iter(d.items())
d.itervalues() -> iter(d.values())

d.viewkeys() -> d.keys()
d.viewitems() -> d.items()
d.viewvalues() -> d.values()

Except in certain very specific contexts: the iter() can be dropped
when the context is list(), sorted(), iter() or for...in; the list()
can be dropped when the context is list() or sorted() (but not iter()
or for...in!). Special contexts that apply to both: list(), sorted(), tuple()
set(), any(), all(), sum().

Note: iter(d.keys()) could be written as iter(d) but since the
original d.iterkeys() was also redundant we don't fix this.  And there
are (rare) contexts where it makes a difference (e.g. when passing it
as an argument to a function that introspects the argument).
�)�pytree)�patcomp)�
fixer_base)�Name�Call�Dot)�
fixer_util�iterc@s@eZdZdZdZdd�ZdZeje�Z	dZ
eje
�Zdd�Zd	S)
�FixDictTa
    power< head=any+
         trailer< '.' method=('keys'|'items'|'values'|
                              'iterkeys'|'iteritems'|'itervalues'|
                              'viewkeys'|'viewitems'|'viewvalues') >
         parens=trailer< '(' ')' >
         tail=any*
    >
    c
Cs|d}|dd}|d}|j}|j}|jd�}|jd�}	|sD|	rP|dd�}dd	�|D�}d
d	�|D�}|o||j||�}
|tj|jt�t||j	d�g�|dj
�g}tj|j|�}|
p�|	s�d
|_	tt|r�dnd�|g�}|r�tj|j|g|�}|j	|_	|S)N�head�method��tailr	Zview�cSsg|]}|j��qS�)�clone)�.0�nrr�./usr/lib64/python3.6/lib2to3/fixes/fix_dict.py�
<listcomp>Asz%FixDict.transform.<locals>.<listcomp>cSsg|]}|j��qSr)r)rrrrrrBs)�prefixZparens��list)
�syms�value�
startswith�in_special_contextrZNodeZtrailerrrrrZpowerr)
�self�node�resultsrrrrZmethod_name�isiterZisviewZspecial�args�newrrr�	transform6s2


zFixDict.transformz3power< func=NAME trailer< '(' node=any ')' > any* >zmfor_stmt< 'for' any 'in' node=any ':' any* >
            | comp_for< 'for' any 'in' node=any any* >
         cCs�|jdkrdSi}|jjdk	r^|jj|jj|�r^|d|kr^|rN|djtkS|djtjkS|sfdS|jj|j|�o�|d|kS)NFr�func)�parent�p1�matchr�iter_exemptr�consuming_calls�p2)rrr rrrrrZs
zFixDict.in_special_contextN)
�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr#ZP1rZcompile_patternr&ZP2r*rrrrrr
)s


r
N)
�__doc__rrrrrrrrr)r(ZBaseFixr
rrrr�<module>sPK�E[5ڍ_"__pycache__/fix_map.cpython-36.pycnu�[���3


 \8�@sfdZddlmZddlmZddlmZmZmZm	Z	m
Z
ddlmZ
ddlmZGdd�dej�Zd	S)
aFixer that changes map(F, ...) into list(map(F, ...)) unless there
exists a 'from future_builtins import map' statement in the top-level
namespace.

As a special case, map(None, X) is changed into list(X).  (This is
necessary because the semantics are changed in this case -- the new
map(None, X) is equivalent to [(x,) for x in X].)

We avoid the transformation (except for the special case mentioned
above) if the map() call is directly contained in iter(<>), list(<>),
tuple(<>), sorted(<>), ...join(<>), or for V in <>:.

NOTE: This is still not correct if the original code was depending on
map(F, X, Y, ...) to go on until the longest argument is exhausted,
substituting None for missing values -- like zip(), it now stops as
soon as the shortest argument is exhausted.
�)�token)�
fixer_base)�Name�ArgList�Call�ListComp�in_special_context)�python_symbols)�Nodec@s eZdZdZdZdZdd�ZdS)�FixMapTaL
    map_none=power<
        'map'
        trailer< '(' arglist< 'None' ',' arg=any [','] > ')' >
        [extra_trailers=trailer*]
    >
    |
    map_lambda=power<
        'map'
        trailer<
            '('
            arglist<
                lambdef< 'lambda'
                         (fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any
                >
                ','
                it=any
            >
            ')'
        >
        [extra_trailers=trailer*]
    >
    |
    power<
        'map' args=trailer< '(' [any] ')' >
        [extra_trailers=trailer*]
    >
    zfuture_builtins.mapcCs�|j|�rdSg}d|kr:x|dD]}|j|j��q$W|jjtjkrv|j|d�|j�}d|_t	t
d�|g�}�n&d|kr�t|dj�|dj�|dj��}ttj
|g|dd	�}n�d
|kr�|dj�}d|_n�d|k�rj|d}|jtjk�rL|jd
jtjk�rL|jd
jdjtjk�rL|jd
jdjdk�rL|j|d�dSttj
t
d�|j�g�}d|_t|��rxdSttj
t
d�t|g�g|�}d|_|j|_|S)NZextra_trailerszYou should use a for loop here��listZ
map_lambdaZxp�fp�it)�prefixZmap_none�arg�args���Nonezjcannot convert map(None, ...) with multiple arguments because map() now truncates to the shortest sequence�map)Zshould_skip�appendZclone�parent�type�symsZsimple_stmtZwarningrrrrr
ZpowerZtrailerZchildrenZarglistr�NAME�valuerr)�selfZnodeZresultsZtrailers�t�newr�r �-/usr/lib64/python3.6/lib2to3/fixes/fix_map.py�	transform@sF



zFixMap.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onr"r r r r!rsrN)�__doc__Zpgen2rrrZ
fixer_utilrrrrrZpygramr	rZpytreer
ZConditionalFixrr r r r!�<module>sPK�E[���+__pycache__/fix_buffer.cpython-36.opt-1.pycnu�[���3


 \N�@s2dZddlmZddlmZGdd�dej�ZdS)z4Fixer that changes buffer(...) into memoryview(...).�)�
fixer_base)�Namec@s eZdZdZdZdZdd�ZdS)�	FixBufferTzR
              power< name='buffer' trailer< '(' [any] ')' > any* >
              cCs |d}|jtd|jd��dS)N�name�
memoryview)�prefix)�replacerr)�selfZnodeZresultsr�r
�0/usr/lib64/python3.6/lib2to3/fixes/fix_buffer.py�	transformszFixBuffer.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZexplicitZPATTERNrr
r
r
rrsrN)�__doc__�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK�E[a�/__pycache__/fix_isinstance.cpython-36.opt-1.pycnu�[���3


 \H�@s2dZddlmZddlmZGdd�dej�ZdS)a,Fixer that cleans up a tuple argument to isinstance after the tokens
in it were fixed.  This is mainly used to remove double occurrences of
tokens as a leftover of the long -> int / unicode -> str conversion.

eg.  isinstance(x, (int, long)) -> isinstance(x, (int, int))
       -> isinstance(x, int)
�)�
fixer_base)�tokenc@s eZdZdZdZdZdd�ZdS)�
FixIsinstanceTz�
    power<
        'isinstance'
        trailer< '(' arglist< any ',' atom< '('
            args=testlist_gexp< any+ >
        ')' > > ')' >
    >
    �cCs�t�}|d}|j}g}t|�}xx|D]p\}}	|	jtjkrt|	j|krt|t|�dkr�||djtjkr�t	|�q&q&|j
|	�|	jtjkr&|j|	j�q&W|r�|djtjkr�|d=t|�dkr�|j}
|
j
|d_
|
j|d�n||dd�<|j�dS)N�args�����r	)�setZchildren�	enumerate�typer�NAME�value�len�COMMA�next�append�add�parent�prefix�replaceZchanged)�selfZnodeZresultsZnames_insertedZtestlistrZnew_args�iterator�idx�argZatom�r�4/usr/lib64/python3.6/lib2to3/fixes/fix_isinstance.py�	transforms*$
zFixIsinstance.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZ	run_orderrrrrrrsrN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr�<module>
sPK�E[I��4��'__pycache__/fix_exitfunc.cpython-36.pycnu�[���3


 \�	�@sJdZddlmZmZddlmZmZmZmZm	Z	m
Z
Gdd�dej�ZdS)z7
Convert use of sys.exitfunc to use the atexit module.
�)�pytree�
fixer_base)�Name�Attr�Call�Comma�Newline�symscs<eZdZdZdZdZ�fdd�Z�fdd�Zdd�Z�Z	S)	�FixExitfuncTa�
              (
                  sys_import=import_name<'import'
                      ('sys'
                      |
                      dotted_as_names< (any ',')* 'sys' (',' any)* >
                      )
                  >
              |
                  expr_stmt<
                      power< 'sys' trailer< '.' 'exitfunc' > >
                  '=' func=any >
              )
              cstt|�j|�dS)N)�superr
�__init__)�self�args)�	__class__��2/usr/lib64/python3.6/lib2to3/fixes/fix_exitfunc.pyrszFixExitfunc.__init__cstt|�j||�d|_dS)N)rr
�
start_tree�
sys_import)r
Ztree�filename)rrrr!szFixExitfunc.start_treecCs&d|kr |jdkr|d|_dS|dj�}d|_tjtjttd�td���}t	||g|j�}|j
|�|jdkr�|j|d�dS|jjd}|j
tjkr�|jt��|jtdd��nj|jj}|jj|j�}|j}	tjtjtd	�tdd�g�}
tjtj|
g�}|j|dt��|j|d
|�dS)Nr�func��atexit�registerzKCan't find sys import; Please add an atexit import at the top of your file.�� �import�)rZclone�prefixrZNoder	Zpowerrrr�replaceZwarningZchildren�typeZdotted_as_namesZappend_childr�parent�indexZimport_nameZsimple_stmtZinsert_childr)r
ZnodeZresultsrrZcall�namesZcontaining_stmtZpositionZstmt_containerZ
new_import�newrrr�	transform%s2



zFixExitfunc.transform)
�__name__�
__module__�__qualname__Zkeep_line_orderZ
BM_compatibleZPATTERNrrr$�
__classcell__rr)rrr
sr
N)
�__doc__Zlib2to3rrZlib2to3.fixer_utilrrrrrr	ZBaseFixr
rrrr�<module>s PK�E["^%���$__pycache__/fix_throw.cpython-36.pycnu�[���3


 \.�@sZdZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZGdd�dej�Z
dS)	z�Fixer for generator.throw(E, V, T).

g.throw(E)       -> g.throw(E)
g.throw(E, V)    -> g.throw(E(V))
g.throw(E, V, T) -> g.throw(E(V).with_traceback(T))

g.throw("foo"[, V[, T]]) will warn about string exceptions.�)�pytree)�token)�
fixer_base)�Name�Call�ArgList�Attr�is_tuplec@seZdZdZdZdd�ZdS)�FixThrowTz�
    power< any trailer< '.' 'throw' >
           trailer< '(' args=arglist< exc=any ',' val=any [',' tb=any] > ')' >
    >
    |
    power< any trailer< '.' 'throw' > trailer< '(' exc=any ')' > >
    cCs�|j}|dj�}|jtjkr.|j|d�dS|jd�}|dkrDdS|j�}t|�rndd�|jdd�D�}nd|_	|g}|d}d	|kr�|d	j�}d|_	t
||�}	t|	td
��t
|g�g}
|jtj|j|
��n|jt
||��dS)N�excz+Python 3 does not support string exceptions�valcSsg|]}|j��qS�)�clone)�.0�cr
r
�//usr/lib64/python3.6/lib2to3/fixes/fix_throw.py�
<listcomp>)sz&FixThrow.transform.<locals>.<listcomp>���args�tb�with_traceback���)�symsr�typer�STRINGZcannot_convert�getr	Zchildren�prefixrrrr�replacerZNodeZpower)�selfZnodeZresultsrrrrZ
throw_argsr�eZwith_tbr
r
r�	transforms*

zFixThrow.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr!r
r
r
rr
sr
N)�__doc__rrZpgen2rrZ
fixer_utilrrrrr	ZBaseFixr
r
r
r
r�<module>s
PK�E[+8nL�	�	+__pycache__/fix_import.cpython-36.opt-2.pycnu�[���3


 \��@sVddlmZddlmZmZmZmZddlmZm	Z	m
Z
dd�ZGdd�dej�Z
d	S)
�)�
fixer_base�)�dirname�join�exists�sep)�
FromImport�syms�tokenccs�|g}x�|r�|j�}|jtjkr*|jVq|jtjkrPdjdd�|jD��Vq|jtj	krn|j
|jd�q|jtjkr�|j|jddd��qt
d��qWdS)N�cSsg|]
}|j�qS�)�value)�.0Zchrr�0/usr/lib64/python3.6/lib2to3/fixes/fix_import.py�
<listcomp>sz$traverse_imports.<locals>.<listcomp>rrzunknown node type���)�pop�typer
�NAMEr
r	Zdotted_namer�childrenZdotted_as_name�appendZdotted_as_names�extend�AssertionError)�names�pending�noderrr�traverse_importss
rcs4eZdZdZdZ�fdd�Zdd�Zdd�Z�ZS)	�	FixImportTzj
    import_from< 'from' imp=any 'import' ['('] any [')'] >
    |
    import_name< 'import' imp=any >
    cs"tt|�j||�d|jk|_dS)NZabsolute_import)�superr�
start_treeZfuture_features�skip)�selfZtree�name)�	__class__rrr/szFixImport.start_treecCs�|jr
dS|d}|jtjkrZxt|d�s6|jd}q W|j|j�r�d|j|_|j�n^d}d}x$t	|�D]}|j|�r�d}qld}qlW|r�|r�|j
|d�dStd|g�}|j|_|SdS)N�impr
r�.FTz#absolute and local imports together)
r rr	Zimport_from�hasattrr�probably_a_local_importr
ZchangedrZwarningr�prefix)r!rZresultsr$Z
have_localZ
have_absoluteZmod_name�newrrr�	transform3s,

zFixImport.transformcCsv|jd�rdS|jdd�d}t|j�}t||�}ttt|�d��sHdSx(dtddd	d
gD]}t||�rZdSqZWdS)Nr%F�rz__init__.pyz.pyz.pycz.soz.slz.pydT)�
startswith�splitr�filenamerrr)r!Zimp_name�	base_pathZextrrrr'Us


z!FixImport.probably_a_local_import)	�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrr*r'�
__classcell__rr)r#rr&s
"rN)rrZos.pathrrrrZ
fixer_utilrr	r
rZBaseFixrrrrr�<module>sPK�E[C�pb��*__pycache__/fix_raise.cpython-36.opt-1.pycnu�[���3


 \n�@sZdZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZGdd�dej�Z
dS)	a[Fixer for 'raise E, V, T'

raise         -> raise
raise E       -> raise E
raise E, V    -> raise E(V)
raise E, V, T -> raise E(V).with_traceback(T)
raise E, None, T -> raise E.with_traceback(T)

raise (((E, E'), E''), E'''), V -> raise E(V)
raise "foo", V, T               -> warns about string exceptions


CAVEATS:
1) "raise E, V" will be incorrectly translated if V is an exception
   instance. The correct Python 3 idiom is

        raise E from V

   but since we can't detect instance-hood by syntax alone and since
   any client code would have to be changed as well, we don't automate
   this.
�)�pytree)�token)�
fixer_base)�Name�Call�Attr�ArgList�is_tuplec@seZdZdZdZdd�ZdS)�FixRaiseTzB
    raise_stmt< 'raise' exc=any [',' val=any [',' tb=any]] >
    cCsl|j}|dj�}|jtjkr2d}|j||�dSt|�rbx t|�rZ|jdjdj�}q<Wd|_d|kr�t	j
|jtd�|g�}|j|_|S|dj�}t|�r�dd	�|jdd�D�}nd
|_|g}d|k�rF|dj�}	d
|	_|}
|jtj
kp�|jdk�rt||�}
t|
td
��t|	g�g}t	j
|jtd�g|�}|j|_|St	j
|jtd�t||�g|jd�SdS)N�excz+Python 3 does not support string exceptions��� �val�raisecSsg|]}|j��qS�)�clone)�.0�crr�//usr/lib64/python3.6/lib2to3/fixes/fix_raise.py�
<listcomp>Dsz&FixRaise.transform.<locals>.<listcomp>��tb�None�with_traceback)�prefix���)�symsr�typer�STRINGZcannot_convertr	ZchildrenrrZNodeZ
raise_stmtr�NAME�valuerrrZsimple_stmt)�selfZnodeZresultsrr�msg�newr�argsr�eZwith_tbrrr�	transform&s@


zFixRaise.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr'rrrrr
sr
N)�__doc__rrZpgen2rrZ
fixer_utilrrrrr	ZBaseFixr
rrrr�<module>s
PK�E[��k/*__pycache__/fix_types.cpython-36.opt-1.pycnu�[���3


 \��@spdZddlmZddlmZddddddd	d
dddd
dddddddddd�Zdd�eD�ZGdd�dej�ZdS)a�Fixer for removing uses of the types module.

These work for only the known names in the types module.  The forms above
can include types. or not.  ie, It is assumed the module is imported either as:

    import types
    from types import ... # either * or specific types

The import statements are not modified.

There should be another fixer that handles at least the following constants:

   type([]) -> list
   type(()) -> tuple
   type('') -> str

�)�
fixer_base)�Name�bool�
memoryview�type�complex�dictztype(Ellipsis)�float�int�list�objectz
type(None)ztype(NotImplemented)�slice�bytesz(str,)�tuple�str�range)ZBooleanTypeZ
BufferTypeZ	ClassTypeZComplexTypeZDictTypeZDictionaryTypeZEllipsisTypeZ	FloatTypeZIntTypeZListTypeZLongTypeZ
ObjectTypeZNoneTypeZNotImplementedTypeZ	SliceTypeZ
StringTypeZStringTypesZ	TupleTypeZTypeTypeZUnicodeTypeZ
XRangeTypecCsg|]}d|�qS)z)power< 'types' trailer< '.' name='%s' > >�)�.0�trr�//usr/lib64/python3.6/lib2to3/fixes/fix_types.py�
<listcomp>3src@s"eZdZdZdje�Zdd�ZdS)�FixTypesT�|cCs&tj|dj�}|r"t||jd�SdS)N�name)�prefix)�
_TYPE_MAPPING�get�valuerr)�selfZnodeZresultsZ	new_valuerrr�	transform9szFixTypes.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�join�_patsZPATTERNrrrrrr5s
rN)	�__doc__�rZ
fixer_utilrrr$ZBaseFixrrrrr�<module>s2PK�E[�w�"__pycache__/fix_zip.cpython-36.pycnu�[���3


 \	�@sRdZddlmZddlmZddlmZddlm	Z	m
Z
mZGdd�dej�Z
dS)	a7
Fixer that changes zip(seq0, seq1, ...) into list(zip(seq0, seq1, ...)
unless there exists a 'from future_builtins import zip' statement in the
top-level namespace.

We avoid the transformation if the zip() call is directly contained in
iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or for V in <>:.
�)�
fixer_base)�Node)�python_symbols)�Name�ArgList�in_special_contextc@s eZdZdZdZdZdd�ZdS)�FixZipTzN
    power< 'zip' args=trailer< '(' [any] ')' > [trailers=trailer*]
    >
    zfuture_builtins.zipcCs�|j|�rdSt|�rdS|dj�}d|_g}d|kr^dd�|dD�}x|D]
}d|_qPWttjtd�|gdd�}ttjtd�t|g�g|�}|j|_|S)	N�args��trailerscSsg|]}|j��qS�)�clone)�.0�nrr�-/usr/lib64/python3.6/lib2to3/fixes/fix_zip.py�
<listcomp>'sz$FixZip.transform.<locals>.<listcomp>�zip)�prefix�list)	Zshould_skiprr
rr�symsZpowerrr)�selfZnodeZresultsr	rr�newrrr�	transforms


zFixZip.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onrrrrrrsrN)�__doc__r
rZpytreerZpygramrrZ
fixer_utilrrrZConditionalFixrrrrr�<module>s
PK�E[�j���,__pycache__/fix_unicode.cpython-36.opt-1.pycnu�[���3


 \��@s<dZddlmZddlmZddd�ZGdd�dej�Zd	S)
z�Fixer for unicode.

* Changes unicode to str and unichr to chr.

* If "...\u..." is not unicode literal change it into "...\\u...".

* Change u"..." into "...".

�)�token)�
fixer_base�chr�str)ZunichrZunicodecs,eZdZdZdZ�fdd�Zdd�Z�ZS)�
FixUnicodeTzSTRING | 'unicode' | 'unichr'cs"tt|�j||�d|jk|_dS)N�unicode_literals)�superr�
start_treeZfuture_featuresr)�selfZtree�filename)�	__class__��1/usr/lib64/python3.6/lib2to3/fixes/fix_unicode.pyr	szFixUnicode.start_treecCs�|jtjkr$|j�}t|j|_|S|jtjkr�|j}|jrl|ddkrld|krldjdd�|j	d�D��}|ddkr�|dd�}||jkr�|S|j�}||_|SdS)	N�z'"�\z\\cSs g|]}|jdd�jdd��qS)z\uz\\uz\Uz\\U)�replace)�.0�vr
r
r�
<listcomp>!sz(FixUnicode.transform.<locals>.<listcomp>ZuU�)
�typer�NAMEZclone�_mapping�value�STRINGr�join�split)r
ZnodeZresults�new�valr
r
r�	transforms"
zFixUnicode.transform)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr	r�
__classcell__r
r
)rrrsrN)�__doc__Zpgen2r�rrZBaseFixrr
r
r
r�<module>	s
PK�E[��
�OO%__pycache__/fix_urllib.cpython-36.pycnu�[���3


 \� �@s�dZddlmZmZddlmZmZmZmZm	Z	m
Z
mZdddddd	d
ddgfd
dddddddddddddddgfddgfgdd	dd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5gfdd6d7gfgd8�Zed9j
ed:d;�d<d=�ZGd>d?�d?e�Zd@S)Az�Fix changes imports of urllib which are now incompatible.
   This is rather similar to fix_imports, but because of the more
   complex nature of the fixing for urllib, it has its own fixer.
�)�
alternates�
FixImports)�Name�Comma�
FromImport�Newline�find_indentation�Node�symszurllib.requestZ	URLopenerZFancyURLopenerZurlretrieveZ
_urlopenerZurlopenZ
urlcleanupZpathname2urlZurl2pathnamezurllib.parseZquoteZ
quote_plusZunquoteZunquote_plusZ	urlencodeZ	splitattrZ	splithostZ
splitnportZsplitpasswdZ	splitportZ
splitqueryZsplittagZ	splittypeZ	splituserZ
splitvaluezurllib.errorZContentTooShortErrorZinstall_openerZbuild_openerZRequestZOpenerDirectorZBaseHandlerZHTTPDefaultErrorHandlerZHTTPRedirectHandlerZHTTPCookieProcessorZProxyHandlerZHTTPPasswordMgrZHTTPPasswordMgrWithDefaultRealmZAbstractBasicAuthHandlerZHTTPBasicAuthHandlerZProxyBasicAuthHandlerZAbstractDigestAuthHandlerZHTTPDigestAuthHandlerZProxyDigestAuthHandlerZHTTPHandlerZHTTPSHandlerZFileHandlerZ
FTPHandlerZCacheFTPHandlerZUnknownHandlerZURLErrorZ	HTTPError)�urllib�urllib2rr�ccs~t�}xrtj�D]f\}}x\|D]T}|\}}t|�}d||fVd|||fVd|Vd|Vd||fVqWqWdS)Nz�import_name< 'import' (module=%r
                                  | dotted_as_names< any* module=%r any* >) >
                  z�import_from< 'from' mod_member=%r 'import'
                       ( member=%s | import_as_name< member=%s 'as' any > |
                         import_as_names< members=any*  >) >
                  zIimport_from< 'from' module_star=%r 'import' star='*' >
                  ztimport_name< 'import'
                                  dotted_as_name< module_as=%r 'as' any > >
                  zKpower< bare_with_attr=%r trailer< '.' member=%s > any* >
                  )�set�MAPPING�itemsr)ZbareZ
old_moduleZchanges�changeZ
new_module�members�r�0/usr/lib64/python3.6/lib2to3/fixes/fix_urllib.py�
build_pattern0s


rc@s4eZdZdd�Zdd�Zdd�Zdd�Zd	d
�ZdS)�	FixUrllibcCsdjt��S)N�|)�joinr)�selfrrrrIszFixUrllib.build_patterncCsz|jd�}|j}g}x6t|jdd�D] }|jt|d|d�t�g�q(W|jtt|jdd|d��|j|�dS)z�Transform for the basic import case. Replaces the old
           import name with a comma separated list of its
           replacements.
        �moduleNr
r)�prefix���r)	�getrr�value�extendrr�append�replace)r�node�resultsZ
import_mod�pref�names�namerrr�transform_importLs
  zFixUrllib.transform_importcCs>|jd�}|j}|jd�}|r�t|t�r0|d}d}x*t|jD]}|j|dkr@|d}Pq@W|rx|jt||d��n|j|d��n�g}i}	|d}
x�|
D]�}|j	t
jkr�|jd	j}|jdj}n
|j}d}|d
kr�xPt|jD]B}||dkr�|d|	k�r|j
|d�|	j|dg�j
|�q�Wq�Wg}
t|�}d}dd
�}x�|D]�}|	|}g}x2|dd�D]"}|j|||��|j
t���qlW|j||d|��t||�}|�s�|jjj|��r�||_|
j
|�d}�qNW|
�r.g}x&|
dd�D]}|j|t�g��q�W|j
|
d�|j|�n|j|d�dS)z�Transform for imports of specific module elements. Replaces
           the module to be imported from with the appropriate new
           module.
        �
mod_member�memberrNr
)rz!This is an invalid module elementr��,TcSsX|jtjkrHt|jdj|d�|jdj�|jdj�g}ttj|�gSt|j|d�gS)Nr)rr
r*)�typer
�import_as_namer�childrenrZcloner	)r&rZkidsrrr�handle_name�sz/FixUrllib.transform_member.<locals>.handle_nameFzAll module elements are invalidrrrr)rr�
isinstance�listrrr!r�cannot_convertr,r
r-r.r �
setdefaultrrrr�parent�endswithr)rr"r#r(r$r)�new_namer�modulesZmod_dictrZas_name�member_nameZ	new_nodesZindentation�firstr/rZeltsr%Zelt�newZnodesZnew_noderrr�transform_member\sh







zFixUrllib.transform_membercCs�|jd�}|jd�}d}t|t�r*|d}x*t|jD]}|j|dkr6|d}Pq6W|rp|jt||jd��n|j|d�dS)z.Transform for calls to module members in code.�bare_with_attrr)Nrr
)rz!This is an invalid module element)	rr0r1rrr!rrr2)rr"r#Z
module_dotr)r6rrrr�
transform_dot�s


zFixUrllib.transform_dotcCsz|jd�r|j||�n^|jd�r0|j||�nF|jd�rH|j||�n.|jd�r`|j|d�n|jd�rv|j|d�dS)Nrr(r<Zmodule_starzCannot handle star imports.Z	module_asz#This module is now multiple modules)rr'r;r=r2)rr"r#rrr�	transform�s




zFixUrllib.transformN)�__name__�
__module__�__qualname__rr'r;r=r>rrrrrGs
LrN)�__doc__Zlib2to3.fixes.fix_importsrrZlib2to3.fixer_utilrrrrrr	r
rr rrrrrr�<module>s@$
PK�E[O���	�	%__pycache__/fix_xrange.cpython-36.pycnu�[���3


 \�
�@sFdZddlmZddlmZmZmZddlmZGdd�dej�Z	dS)z/Fixer that changes xrange(...) into range(...).�)�
fixer_base)�Name�Call�consuming_calls)�patcompcsheZdZdZdZ�fdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
Z
eje
�Z
dZeje�Zdd�Z�ZS)�	FixXrangeTz�
              power<
                 (name='range'|name='xrange') trailer< '(' args=any ')' >
              rest=any* >
              cstt|�j||�t�|_dS)N)�superr�
start_tree�set�transformed_xranges)�self�tree�filename)�	__class__��0/usr/lib64/python3.6/lib2to3/fixes/fix_xrange.pyr	szFixXrange.start_treecCs
d|_dS)N)r)rr
rrrr�finish_treeszFixXrange.finish_treecCsD|d}|jdkr|j||�S|jdkr4|j||�Stt|���dS)N�nameZxrange�range)�value�transform_xrange�transform_range�
ValueError�repr)r�node�resultsrrrr�	transforms

zFixXrange.transformcCs0|d}|jtd|jd��|jjt|��dS)Nrr)�prefix)�replacerrr�add�id)rrrrrrrr$szFixXrange.transform_xrangecCslt|�|jkrh|j|�rhttd�|dj�g�}ttd�|g|jd�}x|dD]}|j|�qRW|SdS)Nr�args�list)r�rest)r r�in_special_contextrrZclonerZappend_child)rrrZ
range_callZ	list_call�nrrrr*s
zFixXrange.transform_rangez3power< func=NAME trailer< '(' node=any ')' > any* >z�for_stmt< 'for' any 'in' node=any ':' any* >
            | comp_for< 'for' any 'in' node=any any* >
            | comparison< any 'in' node=any any*>
         cCsf|jdkrdSi}|jjdk	rJ|jj|jj|�rJ|d|krJ|djtkS|jj|j|�od|d|kS)NFr�func)�parent�p1�matchrr�p2)rrrrrrr$?s
zFixXrange.in_special_context)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr	rrrrZP1rZcompile_patternr(ZP2r*r$�
__classcell__rr)rrrs	

rN)
�__doc__�rZ
fixer_utilrrrrZBaseFixrrrrr�<module>sPK�E[q�XF��,__pycache__/fix_renames.cpython-36.opt-1.pycnu�[���3


 \��@sVdZddlmZddlmZmZdddiiZiZdd�Zd	d
�Z	Gdd�dej
�Zd
S)z?Fix incompatible renames

Fixes:
  * sys.maxint -> sys.maxsize
�)�
fixer_base)�Name�
attr_chain�sysZmaxint�maxsizecCsddjtt|��dS)N�(�|�))�join�map�repr)�members�r�1/usr/lib64/python3.6/lib2to3/fixes/fix_renames.py�
alternatessrccsbx\ttj��D]L\}}xBt|j��D]2\}}|t||f<d|||fVd||fVq$WqWdS)Nz�
                  import_from< 'from' module_name=%r 'import'
                      ( attr_name=%r | import_as_name< attr_name=%r 'as' any >) >
                  z^
                  power< module_name=%r trailer< '.' attr_name=%r > any* >
                  )�list�MAPPING�items�LOOKUP)�module�replaceZold_attr�new_attrrrr�
build_patterns

rcs8eZdZdZdje��ZdZ�fdd�Zdd�Z	�Z
S)�
FixRenamesTrZprecs@tt|�j��|�}|r<t�fdd�t|d�D��r8dS|SdS)Nc3s|]}�|�VqdS)Nr)�.0�obj)�matchrr�	<genexpr>5sz#FixRenames.match.<locals>.<genexpr>�parentF)�superrr�anyr)�self�node�results)�	__class__)rrr1szFixRenames.matchcCsD|jd�}|jd�}|r@|r@t|j|jf}|jt||jd��dS)NZmodule_name�	attr_name)�prefix)�getr�valuerrr&)r!r"r#Zmod_namer%rrrr�	transform>s


zFixRenames.transform)�__name__�
__module__�__qualname__Z
BM_compatibler
rZPATTERN�orderrr)�
__classcell__rr)r$rr*s

rN)�__doc__�rZ
fixer_utilrrrrrrZBaseFixrrrrr�<module>sPK�E[�����2__pycache__/fix_standarderror.cpython-36.opt-2.pycnu�[���3


 \��@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�FixStandarderrorTz-
              'StandardError'
              cCstd|jd�S)N�	Exception)�prefix)rr)�selfZnodeZresults�r�7/usr/lib64/python3.6/lib2to3/fixes/fix_standarderror.py�	transformszFixStandarderror.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrr	rsrN)�rZ
fixer_utilrZBaseFixrrrrr	�<module>sPK�E[�����-__pycache__/fix_operator.cpython-36.opt-2.pycnu�[���3


 \�
�@sJddlZddlmZddlmZmZmZmZdd�ZGdd�dej	�Z
dS)�N)�
fixer_base)�Call�Name�String�touch_importcs�fdd�}|S)Ncs
�|_|S)N)�
invocation)�f)�s��2/usr/lib64/python3.6/lib2to3/fixes/fix_operator.py�decszinvocation.<locals>.decr
)r	rr
)r	rrsrc@s�eZdZdZdZdZdZdeeed�Zdd�Z	e
d	�d
d��Ze
d�d
d��Ze
d�dd��Z
e
d�dd��Ze
d�dd��Ze
d�dd��Ze
d�dd��Zdd�Zd d!�Zd"d#�Zd$S)%�FixOperatorTZprez�
              method=('isCallable'|'sequenceIncludes'
                     |'isSequenceType'|'isMappingType'|'isNumberType'
                     |'repeat'|'irepeat')
              z'(' obj=any ')'z�
              power< module='operator'
                trailer< '.' %(methods)s > trailer< %(obj)s > >
              |
              power< %(methods)s trailer< %(obj)s > >
              )�methods�objcCs"|j||�}|dk	r|||�SdS)N)�
_check_method)�self�node�results�methodr
r
r�	transform+szFixOperator.transformzoperator.contains(%s)cCs|j||d�S)N�contains)�_handle_rename)rrrr
r
r�_sequenceIncludes0szFixOperator._sequenceIncludeszhasattr(%s, '__call__')cCs2|d}|j�td�td�g}ttd�||jd�S)Nrz, z
'__call__'�hasattr)�prefix)�clonerrrr)rrrr�argsr
r
r�_isCallable4szFixOperator._isCallablezoperator.mul(%s)cCs|j||d�S)N�mul)r)rrrr
r
r�_repeat:szFixOperator._repeatzoperator.imul(%s)cCs|j||d�S)N�imul)r)rrrr
r
r�_irepeat>szFixOperator._irepeatz$isinstance(%s, collections.Sequence)cCs|j||dd�S)N�collections�Sequence)�_handle_type2abc)rrrr
r
r�_isSequenceTypeBszFixOperator._isSequenceTypez#isinstance(%s, collections.Mapping)cCs|j||dd�S)Nr"�Mapping)r$)rrrr
r
r�_isMappingTypeFszFixOperator._isMappingTypezisinstance(%s, numbers.Number)cCs|j||dd�S)NZnumbers�Number)r$)rrrr
r
r�
_isNumberTypeJszFixOperator._isNumberTypecCs|dd}||_|j�dS)Nrr)�valueZchanged)rrr�namerr
r
rrNszFixOperator._handle_renamecCsFtd||�|d}|j�tddj||g��g}ttd�||jd�S)Nrz, �.�
isinstance)r)rrr�joinrrr)rrr�module�abcrrr
r
rr$SszFixOperator._handle_type2abccCs\t|d|ddj�}t|tj�rXd|kr0|St|d�f}|j|}|j|d|�dS)N�_rrr/rzYou should use '%s' here.)�getattrr*r-r"�Callable�strrZwarning)rrrr�subZinvocation_strr
r
rrYs
zFixOperator._check_methodN)�__name__�
__module__�__qualname__Z
BM_compatible�orderrr�dictZPATTERNrrrrrr!r%r'r)rr$rr
r
r
rr
s r
)r"Zlib2to3rZlib2to3.fixer_utilrrrrrZBaseFixr
r
r
r
r�<module>sPK�E[ZO#/KK,__pycache__/fix_nonzero.cpython-36.opt-2.pycnu�[���3


 \O�@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixNonzeroTz�
    classdef< 'class' any+ ':'
              suite< any*
                     funcdef< 'def' name='__nonzero__'
                              parameters< '(' NAME ')' > any+ >
                     any* > >
    cCs$|d}td|jd�}|j|�dS)N�name�__bool__)�prefix)rr�replace)�selfZnodeZresultsr�new�r�1/usr/lib64/python3.6/lib2to3/fixes/fix_nonzero.py�	transformszFixNonzero.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrrrsrN)�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK�E[�"*��)__pycache__/fix_long.cpython-36.opt-1.pycnu�[���3


 \��@s2dZddlmZddlmZGdd�dej�ZdS)z/Fixer that turns 'long' into 'int' everywhere.
�)�
fixer_base)�is_probably_builtinc@seZdZdZdZdd�ZdS)�FixLongTz'long'cCst|�rd|_|j�dS)N�int)r�valueZchanged)�selfZnodeZresults�r�./usr/lib64/python3.6/lib2to3/fixes/fix_long.py�	transformszFixLong.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrr	rsrN)�__doc__Zlib2to3rZlib2to3.fixer_utilrZBaseFixrrrrr	�<module>sPK�E[/�Ii��,__pycache__/fix_getcwdu.cpython-36.opt-2.pycnu�[���3


 \��@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixGetcwduTzR
              power< 'os' trailer< dot='.' name='getcwdu' > any* >
              cCs |d}|jtd|jd��dS)N�name�getcwd)�prefix)�replacerr)�selfZnodeZresultsr�r
�1/usr/lib64/python3.6/lib2to3/fixes/fix_getcwdu.py�	transformszFixGetcwdu.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrr
r
r
rr
srN)�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK�E[Y�ٜxx'__pycache__/fix_operator.cpython-36.pycnu�[���3


 \�
�@sNdZddlZddlmZddlmZmZmZmZdd�Z	Gdd�dej
�ZdS)	a�Fixer for operator functions.

operator.isCallable(obj)       -> hasattr(obj, '__call__')
operator.sequenceIncludes(obj) -> operator.contains(obj)
operator.isSequenceType(obj)   -> isinstance(obj, collections.Sequence)
operator.isMappingType(obj)    -> isinstance(obj, collections.Mapping)
operator.isNumberType(obj)     -> isinstance(obj, numbers.Number)
operator.repeat(obj, n)        -> operator.mul(obj, n)
operator.irepeat(obj, n)       -> operator.imul(obj, n)
�N)�
fixer_base)�Call�Name�String�touch_importcs�fdd�}|S)Ncs
�|_|S)N)�
invocation)�f)�s��2/usr/lib64/python3.6/lib2to3/fixes/fix_operator.py�decszinvocation.<locals>.decr
)r	rr
)r	rrsrc@s�eZdZdZdZdZdZdeeed�Zdd�Z	e
d	�d
d��Ze
d�d
d��Ze
d�dd��Z
e
d�dd��Ze
d�dd��Ze
d�dd��Ze
d�dd��Zdd�Zd d!�Zd"d#�Zd$S)%�FixOperatorTZprez�
              method=('isCallable'|'sequenceIncludes'
                     |'isSequenceType'|'isMappingType'|'isNumberType'
                     |'repeat'|'irepeat')
              z'(' obj=any ')'z�
              power< module='operator'
                trailer< '.' %(methods)s > trailer< %(obj)s > >
              |
              power< %(methods)s trailer< %(obj)s > >
              )�methods�objcCs"|j||�}|dk	r|||�SdS)N)�
_check_method)�self�node�results�methodr
r
r�	transform+szFixOperator.transformzoperator.contains(%s)cCs|j||d�S)N�contains)�_handle_rename)rrrr
r
r�_sequenceIncludes0szFixOperator._sequenceIncludeszhasattr(%s, '__call__')cCs2|d}|j�td�td�g}ttd�||jd�S)Nrz, z
'__call__'�hasattr)�prefix)�clonerrrr)rrrr�argsr
r
r�_isCallable4szFixOperator._isCallablezoperator.mul(%s)cCs|j||d�S)N�mul)r)rrrr
r
r�_repeat:szFixOperator._repeatzoperator.imul(%s)cCs|j||d�S)N�imul)r)rrrr
r
r�_irepeat>szFixOperator._irepeatz$isinstance(%s, collections.Sequence)cCs|j||dd�S)N�collections�Sequence)�_handle_type2abc)rrrr
r
r�_isSequenceTypeBszFixOperator._isSequenceTypez#isinstance(%s, collections.Mapping)cCs|j||dd�S)Nr"�Mapping)r$)rrrr
r
r�_isMappingTypeFszFixOperator._isMappingTypezisinstance(%s, numbers.Number)cCs|j||dd�S)NZnumbers�Number)r$)rrrr
r
r�
_isNumberTypeJszFixOperator._isNumberTypecCs|dd}||_|j�dS)Nrr)�valueZchanged)rrr�namerr
r
rrNszFixOperator._handle_renamecCsFtd||�|d}|j�tddj||g��g}ttd�||jd�S)Nrz, �.�
isinstance)r)rrr�joinrrr)rrr�module�abcrrr
r
rr$SszFixOperator._handle_type2abccCs\t|d|ddj�}t|tj�rXd|kr0|St|d�f}|j|}|j|d|�dS)N�_rrr/rzYou should use '%s' here.)�getattrr*r-r"�Callable�strrZwarning)rrrr�subZinvocation_strr
r
rrYs
zFixOperator._check_methodN)�__name__�
__module__�__qualname__Z
BM_compatible�orderrr�dictZPATTERNrrrrrr!r%r'r)rr$rr
r
r
rr
s r
)�__doc__r"Zlib2to3rZlib2to3.fixer_utilrrrrrZBaseFixr
r
r
r
r�<module>
s
PK�E[��{4��,__pycache__/fix_nonzero.cpython-36.opt-1.pycnu�[���3


 \O�@s2dZddlmZddlmZGdd�dej�ZdS)z*Fixer for __nonzero__ -> __bool__ methods.�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixNonzeroTz�
    classdef< 'class' any+ ':'
              suite< any*
                     funcdef< 'def' name='__nonzero__'
                              parameters< '(' NAME ')' > any+ >
                     any* > >
    cCs$|d}td|jd�}|j|�dS)N�name�__bool__)�prefix)rr�replace)�selfZnodeZresultsr�new�r�1/usr/lib64/python3.6/lib2to3/fixes/fix_nonzero.py�	transformszFixNonzero.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrrrsrN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK�E[Ѐ���2__pycache__/fix_standarderror.cpython-36.opt-1.pycnu�[���3


 \��@s2dZddlmZddlmZGdd�dej�ZdS)z%Fixer for StandardError -> Exception.�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�FixStandarderrorTz-
              'StandardError'
              cCstd|jd�S)N�	Exception)�prefix)rr)�selfZnodeZresults�r�7/usr/lib64/python3.6/lib2to3/fixes/fix_standarderror.py�	transformszFixStandarderror.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrr	rsrN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr	�<module>sPK�E[���9ss*__pycache__/fix_apply.cpython-36.opt-1.pycnu�[���3


 \~	�@sRdZddlmZddlmZddlmZddlmZmZm	Z	Gdd�dej
�ZdS)	zIFixer for apply().

This converts apply(func, v, k) into (func)(*v, **k).�)�pytree)�token)�
fixer_base)�Call�Comma�parenthesizec@seZdZdZdZdd�ZdS)�FixApplyTa.
    power< 'apply'
        trailer<
            '('
            arglist<
                (not argument<NAME '=' any>) func=any ','
                (not argument<NAME '=' any>) args=any [','
                (not argument<NAME '=' any>) kwds=any] [',']
            >
            ')'
        >
    >
    c	Cs>|j}|d}|d}|jd�}|rX|j|jjkr6dS|j|jjkrX|jdjdkrXdS|r~|j|jjkr~|jdjdkr~dS|j}|j�}|jt	j
|jfkr�|j|jks�|jdjt	j
kr�t|�}d|_|j�}d|_|dk	r�|j�}d|_tjt	jd�|g}|dk	�r0|jt�tjt	j
d�|g�d	|d_t|||d
�S)
N�func�args�kwds�z**r��*� )�prefix���r)�syms�get�typeZ	star_exprZargumentZchildren�valuerZcloner�NAMEZatomZpower�
DOUBLESTARrrZLeaf�STAR�extendrr)	�selfZnodeZresultsrr	r
rrZ	l_newargs�r�//usr/lib64/python3.6/lib2to3/fixes/fix_apply.py�	transforms@


zFixApply.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)�__doc__r
rZpgen2rrZ
fixer_utilrrrZBaseFixrrrrr�<module>s
PK�E[O���	�	+__pycache__/fix_xrange.cpython-36.opt-1.pycnu�[���3


 \�
�@sFdZddlmZddlmZmZmZddlmZGdd�dej�Z	dS)z/Fixer that changes xrange(...) into range(...).�)�
fixer_base)�Name�Call�consuming_calls)�patcompcsheZdZdZdZ�fdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
Z
eje
�Z
dZeje�Zdd�Z�ZS)�	FixXrangeTz�
              power<
                 (name='range'|name='xrange') trailer< '(' args=any ')' >
              rest=any* >
              cstt|�j||�t�|_dS)N)�superr�
start_tree�set�transformed_xranges)�self�tree�filename)�	__class__��0/usr/lib64/python3.6/lib2to3/fixes/fix_xrange.pyr	szFixXrange.start_treecCs
d|_dS)N)r)rr
rrrr�finish_treeszFixXrange.finish_treecCsD|d}|jdkr|j||�S|jdkr4|j||�Stt|���dS)N�nameZxrange�range)�value�transform_xrange�transform_range�
ValueError�repr)r�node�resultsrrrr�	transforms

zFixXrange.transformcCs0|d}|jtd|jd��|jjt|��dS)Nrr)�prefix)�replacerrr�add�id)rrrrrrrr$szFixXrange.transform_xrangecCslt|�|jkrh|j|�rhttd�|dj�g�}ttd�|g|jd�}x|dD]}|j|�qRW|SdS)Nr�args�list)r�rest)r r�in_special_contextrrZclonerZappend_child)rrrZ
range_callZ	list_call�nrrrr*s
zFixXrange.transform_rangez3power< func=NAME trailer< '(' node=any ')' > any* >z�for_stmt< 'for' any 'in' node=any ':' any* >
            | comp_for< 'for' any 'in' node=any any* >
            | comparison< any 'in' node=any any*>
         cCsf|jdkrdSi}|jjdk	rJ|jj|jj|�rJ|d|krJ|djtkS|jj|j|�od|d|kS)NFr�func)�parent�p1�matchrr�p2)rrrrrrr$?s
zFixXrange.in_special_context)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr	rrrrZP1rZcompile_patternr(ZP2r*r$�
__classcell__rr)rrrs	

rN)
�__doc__�rZ
fixer_utilrrrrZBaseFixrrrrr�<module>sPK�E[>���+__pycache__/fix_future.cpython-36.opt-1.pycnu�[���3


 \#�@s2dZddlmZddlmZGdd�dej�ZdS)zVRemove __future__ imports

from __future__ import foo is replaced with an empty line.
�)�
fixer_base)�	BlankLinec@s eZdZdZdZdZdd�ZdS)�	FixFutureTz;import_from< 'from' module_name="__future__" 'import' any >�
cCst�}|j|_|S)N)r�prefix)�selfZnodeZresults�new�r	�0/usr/lib64/python3.6/lib2to3/fixes/fix_future.py�	transformszFixFuture.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZ	run_orderrr	r	r	r
rsrN)�__doc__�rZ
fixer_utilrZBaseFixrr	r	r	r
�<module>sPK�E[8ڒ�'__pycache__/fix_ne.cpython-36.opt-1.pycnu�[���3


 \;�@s>dZddlmZddlmZddlmZGdd�dej�ZdS)zFixer that turns <> into !=.�)�pytree)�token)�
fixer_basec@s"eZdZejZdd�Zdd�ZdS)�FixNecCs
|jdkS)Nz<>)�value)�self�node�r	�,/usr/lib64/python3.6/lib2to3/fixes/fix_ne.py�matchszFixNe.matchcCstjtjd|jd�}|S)Nz!=)�prefix)rZLeafr�NOTEQUALr)rrZresults�newr	r	r
�	transformszFixNe.transformN)�__name__�
__module__�__qualname__rr
Z_accept_typerrr	r	r	r
rsrN)�__doc__�rZpgen2rrZBaseFixrr	r	r	r
�<module>sPK�E[Xz.��(__pycache__/fix_map.cpython-36.opt-2.pycnu�[���3


 \8�@sbddlmZddlmZddlmZmZmZmZm	Z	ddl
mZddl
mZGdd�dej�ZdS)	�)�token)�
fixer_base)�Name�ArgList�Call�ListComp�in_special_context)�python_symbols)�Nodec@s eZdZdZdZdZdd�ZdS)�FixMapTaL
    map_none=power<
        'map'
        trailer< '(' arglist< 'None' ',' arg=any [','] > ')' >
        [extra_trailers=trailer*]
    >
    |
    map_lambda=power<
        'map'
        trailer<
            '('
            arglist<
                lambdef< 'lambda'
                         (fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any
                >
                ','
                it=any
            >
            ')'
        >
        [extra_trailers=trailer*]
    >
    |
    power<
        'map' args=trailer< '(' [any] ')' >
        [extra_trailers=trailer*]
    >
    zfuture_builtins.mapcCs�|j|�rdSg}d|kr:x|dD]}|j|j��q$W|jjtjkrv|j|d�|j�}d|_t	t
d�|g�}�n&d|kr�t|dj�|dj�|dj��}ttj
|g|dd	�}n�d
|kr�|dj�}d|_n�d|k�rj|d}|jtjk�rL|jd
jtjk�rL|jd
jdjtjk�rL|jd
jdjdk�rL|j|d�dSttj
t
d�|j�g�}d|_t|��rxdSttj
t
d�t|g�g|�}d|_|j|_|S)NZextra_trailerszYou should use a for loop here��listZ
map_lambdaZxp�fp�it)�prefixZmap_none�arg�args���Nonezjcannot convert map(None, ...) with multiple arguments because map() now truncates to the shortest sequence�map)Zshould_skip�appendZclone�parent�type�symsZsimple_stmtZwarningrrrrr
ZpowerZtrailerZchildrenZarglistr�NAME�valuerr)�selfZnodeZresultsZtrailers�t�newr�r �-/usr/lib64/python3.6/lib2to3/fixes/fix_map.py�	transform@sF



zFixMap.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onr"r r r r!rsrN)Zpgen2rrrZ
fixer_utilrrrrrZpygramr	rZpytreer
ZConditionalFixrr r r r!�<module>s
PK�E[�>�GG0__pycache__/fix_methodattrs.cpython-36.opt-2.pycnu�[���3


 \^�@s:ddlmZddlmZdddd�ZGdd�dej�Zd	S)
�)�
fixer_base)�Name�__func__�__self__z__self__.__class__)Zim_funcZim_selfZim_classc@seZdZdZdZdd�ZdS)�FixMethodattrsTzU
    power< any+ trailer< '.' attr=('im_func' | 'im_self' | 'im_class') > any* >
    cCs.|dd}t|j}|jt||jd��dS)N�attr�)�prefix)�MAP�value�replacerr	)�selfZnodeZresultsr�new�r�5/usr/lib64/python3.6/lib2to3/fixes/fix_methodattrs.py�	transforms
zFixMethodattrs.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)�rZ
fixer_utilrr
ZBaseFixrrrrr�<module>s
PK�E[k�-O�
�
+__pycache__/fix_except.cpython-36.opt-1.pycnu�[���3


 \
�@sfdZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZmZdd�Z
Gdd	�d	ej�Zd
S)a�Fixer for except statements with named exceptions.

The following cases will be converted:

- "except E, T:" where T is a name:

    except E as T:

- "except E, T:" where T is not a name, tuple or list:

        except E as t:
            T = t

    This is done because the target of an "except" clause must be a
    name.

- "except E, T:" where T is a tuple or list literal:

        except E as t:
            T = t.args
�)�pytree)�token)�
fixer_base)�Assign�Attr�Name�is_tuple�is_list�symsccsHxBt|�D]6\}}|jtjkr
|jdjdkr
|||dfVq
WdS)N��exceptr)�	enumerate�typer
�
except_clause�children�value)Znodes�i�n�r�0/usr/lib64/python3.6/lib2to3/fixes/fix_except.py�find_exceptssrc@seZdZdZdZdd�ZdS)�	FixExceptTa1
    try_stmt< 'try' ':' (simple_stmt | suite)
                  cleanup=(except_clause ':' (simple_stmt | suite))+
                  tail=(['except' ':' (simple_stmt | suite)]
                        ['else' ':' (simple_stmt | suite)]
                        ['finally' ':' (simple_stmt | suite)]) >
    cCs�|j}dd�|dD�}dd�|dD�}�x*t|�D�]\}}t|j�dkr6|jdd�\}}	}
|	jtdd	d
��|
jtjk�rDt|j	�d	d
�}|
j
�}d|_|
j|�|j
�}|j}
x"t|
�D]\}}t
|tj�r�Pq�Wt|
�s�t|
��rt|t|td���}n
t||�}x&t|
d|��D]}|jd
|��q W|j||�q6|
jdkr6d	|
_q6Wdd�|jdd�D�||}tj|j|�S)NcSsg|]}|j��qSr)�clone)�.0rrrr�
<listcomp>2sz'FixExcept.transform.<locals>.<listcomp>�tailcSsg|]}|j��qSr)r)rZchrrrr4sZcleanup���as� )�prefix��argsrcSsg|]}|j��qSr)r)r�crrrr\s�)r
r�lenr�replacerrr�NAME�new_namerr r
�
isinstancerZNoderr	rr�reversedZinsert_child)�selfZnodeZresultsr
rZtry_cleanuprZe_suite�EZcomma�NZnew_N�targetZsuite_stmtsrZstmtZassignZchildrrrr�	transform/s6



 zFixExcept.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr/rrrrr$srN)�__doc__r!rZpgen2rrZ
fixer_utilrrrrr	r
rZBaseFixrrrrr�<module>s PK�E[Ѐ���,__pycache__/fix_standarderror.cpython-36.pycnu�[���3


 \��@s2dZddlmZddlmZGdd�dej�ZdS)z%Fixer for StandardError -> Exception.�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�FixStandarderrorTz-
              'StandardError'
              cCstd|jd�S)N�	Exception)�prefix)rr)�selfZnodeZresults�r�7/usr/lib64/python3.6/lib2to3/fixes/fix_standarderror.py�	transformszFixStandarderror.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrr	rsrN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr	�<module>sPK�E[	�W@'__pycache__/fix_imports2.cpython-36.pycnu�[���3


 \!�@s0dZddlmZddd�ZGdd�dej�ZdS)zTFix incompatible imports and module references that must be fixed after
fix_imports.�)�fix_importsZdbm)ZwhichdbZanydbmc@seZdZdZeZdS)�FixImports2�N)�__name__�
__module__�__qualname__Z	run_order�MAPPING�mapping�r
r
�2/usr/lib64/python3.6/lib2to3/fixes/fix_imports2.pyrsrN)�__doc__�rrZ
FixImportsrr
r
r
r�<module>sPK�E[q�XF��&__pycache__/fix_renames.cpython-36.pycnu�[���3


 \��@sVdZddlmZddlmZmZdddiiZiZdd�Zd	d
�Z	Gdd�dej
�Zd
S)z?Fix incompatible renames

Fixes:
  * sys.maxint -> sys.maxsize
�)�
fixer_base)�Name�
attr_chain�sysZmaxint�maxsizecCsddjtt|��dS)N�(�|�))�join�map�repr)�members�r�1/usr/lib64/python3.6/lib2to3/fixes/fix_renames.py�
alternatessrccsbx\ttj��D]L\}}xBt|j��D]2\}}|t||f<d|||fVd||fVq$WqWdS)Nz�
                  import_from< 'from' module_name=%r 'import'
                      ( attr_name=%r | import_as_name< attr_name=%r 'as' any >) >
                  z^
                  power< module_name=%r trailer< '.' attr_name=%r > any* >
                  )�list�MAPPING�items�LOOKUP)�module�replaceZold_attr�new_attrrrr�
build_patterns

rcs8eZdZdZdje��ZdZ�fdd�Zdd�Z	�Z
S)�
FixRenamesTrZprecs@tt|�j��|�}|r<t�fdd�t|d�D��r8dS|SdS)Nc3s|]}�|�VqdS)Nr)�.0�obj)�matchrr�	<genexpr>5sz#FixRenames.match.<locals>.<genexpr>�parentF)�superrr�anyr)�self�node�results)�	__class__)rrr1szFixRenames.matchcCsD|jd�}|jd�}|r@|r@t|j|jf}|jt||jd��dS)NZmodule_name�	attr_name)�prefix)�getr�valuerrr&)r!r"r#Zmod_namer%rrrr�	transform>s


zFixRenames.transform)�__name__�
__module__�__qualname__Z
BM_compatibler
rZPATTERN�orderrr)�
__classcell__rr)r$rr*s

rN)�__doc__�rZ
fixer_utilrrrrrrZBaseFixrrrrr�<module>sPK�E[tҵ0��,__pycache__/fix_asserts.cpython-36.opt-2.pycnu�[���3


 \��@sPddlmZddlmZeddddddd	dddddd
dd�ZGd
d�de�ZdS)�)�BaseFix)�NameZ
assertTrueZassertEqualZassertNotEqualZassertAlmostEqualZassertNotAlmostEqualZassertRegexZassertRaisesRegexZassertRaisesZassertFalse)Zassert_ZassertEqualsZassertNotEqualsZassertAlmostEqualsZassertNotAlmostEqualsZassertRegexpMatchesZassertRaisesRegexpZfailUnlessEqualZfailIfEqualZfailUnlessAlmostEqualZfailIfAlmostEqualZ
failUnlessZfailUnlessRaisesZfailIfc@s(eZdZddjeee��Zdd�ZdS)�
FixAssertszH
              power< any+ trailer< '.' meth=(%s)> any* >
              �|cCs,|dd}|jttt|�|jd��dS)N�meth�)�prefix)�replacer�NAMES�strr)�selfZnodeZresults�name�r�1/usr/lib64/python3.6/lib2to3/fixes/fix_asserts.py�	transform szFixAsserts.transformN)	�__name__�
__module__�__qualname__�join�map�reprr
ZPATTERNrrrrrrsrN)Z
fixer_baserZ
fixer_utilr�dictr
rrrrr�<module>s"PK�E[�]f�EE*__pycache__/fix_raise.cpython-36.opt-2.pycnu�[���3


 \n�@sVddlmZddlmZddlmZddlmZmZmZm	Z	m
Z
Gdd�dej�ZdS)�)�pytree)�token)�
fixer_base)�Name�Call�Attr�ArgList�is_tuplec@seZdZdZdZdd�ZdS)�FixRaiseTzB
    raise_stmt< 'raise' exc=any [',' val=any [',' tb=any]] >
    cCsl|j}|dj�}|jtjkr2d}|j||�dSt|�rbx t|�rZ|jdjdj�}q<Wd|_d|kr�t	j
|jtd�|g�}|j|_|S|dj�}t|�r�dd	�|jdd�D�}nd
|_|g}d|k�rF|dj�}	d
|	_|}
|jtj
kp�|jdk�rt||�}
t|
td
��t|	g�g}t	j
|jtd�g|�}|j|_|St	j
|jtd�t||�g|jd�SdS)N�excz+Python 3 does not support string exceptions��� �val�raisecSsg|]}|j��qS�)�clone)�.0�crr�//usr/lib64/python3.6/lib2to3/fixes/fix_raise.py�
<listcomp>Dsz&FixRaise.transform.<locals>.<listcomp>��tb�None�with_traceback)�prefix���)�symsr�typer�STRINGZcannot_convertr	ZchildrenrrZNodeZ
raise_stmtr�NAME�valuerrrZsimple_stmt)�selfZnodeZresultsrr�msg�newr�argsr�eZwith_tbrrr�	transform&s@


zFixRaise.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr'rrrrr
sr
N)
rrZpgen2rrZ
fixer_utilrrrrr	ZBaseFixr
rrrr�<module>sPK�E[	�W@-__pycache__/fix_imports2.cpython-36.opt-1.pycnu�[���3


 \!�@s0dZddlmZddd�ZGdd�dej�ZdS)zTFix incompatible imports and module references that must be fixed after
fix_imports.�)�fix_importsZdbm)ZwhichdbZanydbmc@seZdZdZeZdS)�FixImports2�N)�__name__�
__module__�__qualname__Z	run_order�MAPPING�mapping�r
r
�2/usr/lib64/python3.6/lib2to3/fixes/fix_imports2.pyrsrN)�__doc__�rrZ
FixImportsrr
r
r
r�<module>sPK�E[�����/__pycache__/fix_basestring.cpython-36.opt-1.pycnu�[���3


 \@�@s2dZddlmZddlmZGdd�dej�ZdS)zFixer for basestring -> str.�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixBasestringTz'basestring'cCstd|jd�S)N�str)�prefix)rr)�selfZnodeZresults�r�4/usr/lib64/python3.6/lib2to3/fixes/fix_basestring.py�	transform
szFixBasestring.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrr	rsrN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr	�<module>sPK�E[��C���,__pycache__/fix_sys_exc.cpython-36.opt-2.pycnu�[���3


 \
�@sFddlmZddlmZmZmZmZmZmZm	Z	Gdd�dej
�ZdS)�)�
fixer_base)�Attr�Call�Name�Number�	Subscript�Node�symsc@s:eZdZdddgZdZddjdd�eD��Zd	d
�ZdS)�	FixSysExc�exc_type�	exc_value�
exc_tracebackTzN
              power< 'sys' trailer< dot='.' attribute=(%s) > >
              �|ccs|]}d|VqdS)z'%s'N�)�.0�err�1/usr/lib64/python3.6/lib2to3/fixes/fix_sys_exc.py�	<genexpr>szFixSysExc.<genexpr>cCst|dd}t|jj|j��}ttd�|jd�}ttd�|�}|dj|djd_|j	t
|��ttj
||jd�S)NZ	attribute��exc_info)�prefix�sys�dot�)rr�index�valuerrrrZchildren�appendrrr	Zpower)�selfZnodeZresultsZsys_attrrZcall�attrrrr�	transformszFixSysExc.transformN)�__name__�
__module__�__qualname__rZ
BM_compatible�joinZPATTERNrrrrrr
s
r
N)�rZ
fixer_utilrrrrrrr	ZBaseFixr
rrrr�<module>s$PK�E[�Qv���)__pycache__/fix_next.cpython-36.opt-2.pycnu�[���3


 \f�@sjddlmZddlmZddlmZddlmZm	Z	m
Z
dZGdd�dej�Z
dd	�Zd
d�Zdd
�ZdS)�)�token)�python_symbols)�
fixer_base)�Name�Call�find_bindingz;Calls to builtin next() possibly shadowed by global bindingcs0eZdZdZdZdZ�fdd�Zdd�Z�ZS)�FixNextTa�
    power< base=any+ trailer< '.' attr='next' > trailer< '(' ')' > >
    |
    power< head=any+ trailer< '.' attr='next' > not trailer< '(' ')' > >
    |
    classdef< 'class' any+ ':'
              suite< any*
                     funcdef< 'def'
                              name='next'
                              parameters< '(' NAME ')' > any+ >
                     any* > >
    |
    global=global_stmt< 'global' any* 'next' any* >
    Zprecs>tt|�j||�td|�}|r4|j|t�d|_nd|_dS)N�nextTF)�superr�
start_treer�warning�bind_warning�
shadowed_next)�selfZtree�filename�n)�	__class__��./usr/lib64/python3.6/lib2to3/fixes/fix_next.pyr$s
zFixNext.start_treecCs�|jd�}|jd�}|jd�}|rr|jr>|jtd|jd��q�dd�|D�}d|d	_|jttd
|jd�|��n�|r�td|jd�}|j|�nj|r�t|�r�|d}djdd�|D��j�d
kr�|j	|t
�dS|jtd��nd|kr�|j	|t
�d|_dS)N�base�attr�name�__next__)�prefixcSsg|]}|j��qSr)Zclone)�.0rrrr�
<listcomp>9sz%FixNext.transform.<locals>.<listcomp>��r	�headcSsg|]}t|��qSr)�str)rrrrrrEsZ__builtin__�globalT)�getr�replacerrr�is_assign_target�join�striprr
)r�nodeZresultsrrrrrrrr�	transform.s,



zFixNext.transform)	�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERN�orderrr'�
__classcell__rr)rrrs

rcCsFt|�}|dkrdSx,|jD]"}|jtjkr0dSt||�rdSqWdS)NFT)�find_assign�children�typer�EQUAL�
is_subtree)r&ZassignZchildrrrr#Qs
r#cCs4|jtjkr|S|jtjks&|jdkr*dSt|j�S)N)r/�symsZ	expr_stmtZsimple_stmt�parentr-)r&rrrr-]s
r-cs$|�krdSt�fdd�|jD��S)NTc3s|]}t|��VqdS)N)r1)r�c)r&rr�	<genexpr>gszis_subtree.<locals>.<genexpr>)�anyr.)�rootr&r)r&rr1dsr1N)Zpgen2rZpygramrr2rrZ
fixer_utilrrrr
ZBaseFixrr#r-r1rrrr�<module>	s@PK�E[�dL��,__pycache__/fix_imports.cpython-36.opt-2.pycnu�[���3


 \4�1@s�ddlmZddlmZmZdddddddd	d
ddddd
ddddddddddddddddddd d!d!d"d#d$d%d&d'd'd'd(d)d)d*d+d,�0Zd-d.�Zefd/d0�ZGd1d2�d2ej�Z	d3S)4�)�
fixer_base)�Name�
attr_chain�io�pickle�builtins�copyregZqueueZsocketserverZconfigparser�reprlibztkinter.filedialogztkinter.simpledialogztkinter.colorchooserztkinter.commondialogztkinter.dialogztkinter.dndztkinter.fontztkinter.messageboxztkinter.scrolledtextztkinter.constantsztkinter.tixztkinter.ttkZtkinterZ_markupbase�winreg�_threadZ
_dummy_threadzdbm.bsdzdbm.dumbzdbm.ndbmzdbm.gnuz
xmlrpc.clientz
xmlrpc.serverzhttp.clientz
html.entitieszhtml.parserzhttp.cookieszhttp.cookiejarzhttp.server�
subprocess�collectionszurllib.parsezurllib.robotparser)0�StringIOZ	cStringIOZcPickleZ__builtin__Zcopy_regZQueueZSocketServerZConfigParser�reprZ
FileDialogZtkFileDialogZSimpleDialogZtkSimpleDialogZtkColorChooserZtkCommonDialogZDialogZTkdndZtkFontZtkMessageBoxZScrolledTextZTkconstantsZTixZttkZTkinterZ
markupbase�_winregZthreadZdummy_threadZdbhashZdumbdbmZdbmZgdbmZ	xmlrpclibZDocXMLRPCServerZSimpleXMLRPCServerZhttplibZhtmlentitydefsZ
HTMLParserZCookieZ	cookielibZBaseHTTPServerZSimpleHTTPServerZ
CGIHTTPServerZcommands�
UserString�UserListZurlparseZrobotparsercCsddjtt|��dS)N�(�|�))�join�mapr)�members�r�1/usr/lib64/python3.6/lib2to3/fixes/fix_imports.py�
alternates=srccsTdjdd�|D��}t|j��}d||fVd|Vd||fVd|VdS)Nz | cSsg|]}d|�qS)zmodule_name='%s'r)�.0�keyrrr�
<listcomp>Bsz!build_pattern.<locals>.<listcomp>zyname_import=import_name< 'import' ((%s) |
               multiple_imports=dotted_as_names< any* (%s) any* >) >
          z�import_from< 'from' (%s) 'import' ['(']
              ( any | import_as_name< any 'as' any > |
                import_as_names< any* >)  [')'] >
          z�import_name< 'import' (dotted_as_name< (%s) 'as' any > |
               multiple_imports=dotted_as_names<
                 any* dotted_as_name< (%s) 'as' any > any* >) >
          z3power< bare_with_attr=(%s) trailer<'.' any > any* >)rr�keys)�mappingZmod_listZ
bare_namesrrr�
build_patternAs
r!csTeZdZdZdZeZdZdd�Z�fdd�Z	�fdd�Z
�fd	d
�Zdd�Z�Z
S)
�
FixImportsT�cCsdjt|j��S)Nr)rr!r )�selfrrrr!`szFixImports.build_patterncs|j�|_tt|�j�dS)N)r!ZPATTERN�superr"�compile_pattern)r$)�	__class__rrr&cs
zFixImports.compile_patterncsHtt|�j��|�}|rDd|kr@t�fdd�t|d�D��r@dS|SdS)N�bare_with_attrc3s|]}�|�VqdS)Nr)r�obj)�matchrr�	<genexpr>qsz#FixImports.match.<locals>.<genexpr>�parentF)r%r"r*�anyr)r$�node�results)r')r*rr*jszFixImports.matchcstt|�j||�i|_dS)N)r%r"�
start_tree�replace)r$Ztree�filename)r'rrr0vszFixImports.start_treecCs�|jd�}|rh|j}|j|}|jt||jd��d|krD||j|<d|kr�|j|�}|r�|j||�n2|dd}|jj|j�}|r�|jt||jd��dS)NZmodule_name)�prefixZname_importZmultiple_importsr(�)�get�valuer r1rr3r*�	transform)r$r.r/Z
import_modZmod_name�new_nameZ	bare_namerrrr7zs



zFixImports.transform)�__name__�
__module__�__qualname__Z
BM_compatibleZkeep_line_order�MAPPINGr Z	run_orderr!r&r*r0r7�
__classcell__rr)r'rr"Usr"N)
�rZ
fixer_utilrrr<rr!ZBaseFixr"rrrr�<module>shPK�E[8`��0__pycache__/fix_set_literal.cpython-36.opt-1.pycnu�[���3


 \��@s:dZddlmZmZddlmZmZGdd�dej�ZdS)z:
Optional fixer to transform set() calls to set literals.
�)�
fixer_base�pytree)�token�symsc@s eZdZdZdZdZdd�ZdS)�
FixSetLiteralTajpower< 'set' trailer< '('
                     (atom=atom< '[' (items=listmaker< any ((',' any)* [',']) >
                                |
                                single=any) ']' >
                     |
                     atom< '(' items=testlist_gexp< any ((',' any)* [',']) > ')' >
                     )
                     ')' > >
              c	Cs�|jd�}|r2tjtj|j�g�}|j|�|}n|d}tjtj	d�g}|j
dd�|jD��|jtjtj
d��|jj|d
_tjtj|�}|j|_t|j�dkr�|jd	}|j�|j|jd_|S)N�single�items�{css|]}|j�VqdS)N)�clone)�.0�n�r
�5/usr/lib64/python3.6/lib2to3/fixes/fix_set_literal.py�	<genexpr>'sz*FixSetLiteral.transform.<locals>.<genexpr>�}������r)�getrZNoderZ	listmakerr
�replaceZLeafr�LBRACE�extendZchildren�append�RBRACEZnext_sibling�prefixZdictsetmaker�len�remove)	�selfZnodeZresultsrZfaker�literalZmakerrr
r
r�	transforms"


zFixSetLiteral.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZexplicitZPATTERNr r
r
r
rrs
rN)	�__doc__Zlib2to3rrZlib2to3.fixer_utilrrZBaseFixrr
r
r
r�<module>sPK�E[a�;888#__pycache__/fix_repr.cpython-36.pycnu�[���3


 \e�@s:dZddlmZddlmZmZmZGdd�dej�ZdS)z/Fixer that transforms `xyzzy` into repr(xyzzy).�)�
fixer_base)�Call�Name�parenthesizec@seZdZdZdZdd�ZdS)�FixReprTz7
              atom < '`' expr=any '`' >
              cCs8|dj�}|j|jjkr"t|�}ttd�|g|jd�S)N�expr�repr)�prefix)Zclone�typeZsymsZ	testlist1rrrr	)�selfZnodeZresultsr�r�./usr/lib64/python3.6/lib2to3/fixes/fix_repr.py�	transformszFixRepr.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrr
rsrN)	�__doc__�rZ
fixer_utilrrrZBaseFixrrrrr
�<module>sPK�E[%ځ���,__pycache__/fix_imports.cpython-36.opt-1.pycnu�[���3


 \4�1@s�dZddlmZddlmZmZddddddd	d
dddd
d
ddddddddddddddddddd d!d"d"d#d$d%d&d'd(d(d(d)d*d*d+d,d-�0Zd.d/�Zefd0d1�ZGd2d3�d3ej	�Z
d4S)5z/Fix incompatible imports and module references.�)�
fixer_base)�Name�
attr_chain�io�pickle�builtins�copyregZqueueZsocketserverZconfigparser�reprlibztkinter.filedialogztkinter.simpledialogztkinter.colorchooserztkinter.commondialogztkinter.dialogztkinter.dndztkinter.fontztkinter.messageboxztkinter.scrolledtextztkinter.constantsztkinter.tixztkinter.ttkZtkinterZ_markupbase�winreg�_threadZ
_dummy_threadzdbm.bsdzdbm.dumbzdbm.ndbmzdbm.gnuz
xmlrpc.clientz
xmlrpc.serverzhttp.clientz
html.entitieszhtml.parserzhttp.cookieszhttp.cookiejarzhttp.server�
subprocess�collectionszurllib.parsezurllib.robotparser)0�StringIOZ	cStringIOZcPickleZ__builtin__Zcopy_regZQueueZSocketServerZConfigParser�reprZ
FileDialogZtkFileDialogZSimpleDialogZtkSimpleDialogZtkColorChooserZtkCommonDialogZDialogZTkdndZtkFontZtkMessageBoxZScrolledTextZTkconstantsZTixZttkZTkinterZ
markupbase�_winregZthreadZdummy_threadZdbhashZdumbdbmZdbmZgdbmZ	xmlrpclibZDocXMLRPCServerZSimpleXMLRPCServerZhttplibZhtmlentitydefsZ
HTMLParserZCookieZ	cookielibZBaseHTTPServerZSimpleHTTPServerZ
CGIHTTPServerZcommands�
UserString�UserListZurlparseZrobotparsercCsddjtt|��dS)N�(�|�))�join�mapr)�members�r�1/usr/lib64/python3.6/lib2to3/fixes/fix_imports.py�
alternates=srccsTdjdd�|D��}t|j��}d||fVd|Vd||fVd|VdS)Nz | cSsg|]}d|�qS)zmodule_name='%s'r)�.0�keyrrr�
<listcomp>Bsz!build_pattern.<locals>.<listcomp>zyname_import=import_name< 'import' ((%s) |
               multiple_imports=dotted_as_names< any* (%s) any* >) >
          z�import_from< 'from' (%s) 'import' ['(']
              ( any | import_as_name< any 'as' any > |
                import_as_names< any* >)  [')'] >
          z�import_name< 'import' (dotted_as_name< (%s) 'as' any > |
               multiple_imports=dotted_as_names<
                 any* dotted_as_name< (%s) 'as' any > any* >) >
          z3power< bare_with_attr=(%s) trailer<'.' any > any* >)rr�keys)�mappingZmod_listZ
bare_namesrrr�
build_patternAs
r!csTeZdZdZdZeZdZdd�Z�fdd�Z	�fdd�Z
�fd	d
�Zdd�Z�Z
S)
�
FixImportsT�cCsdjt|j��S)Nr)rr!r )�selfrrrr!`szFixImports.build_patterncs|j�|_tt|�j�dS)N)r!ZPATTERN�superr"�compile_pattern)r$)�	__class__rrr&cs
zFixImports.compile_patterncsHtt|�j��|�}|rDd|kr@t�fdd�t|d�D��r@dS|SdS)N�bare_with_attrc3s|]}�|�VqdS)Nr)r�obj)�matchrr�	<genexpr>qsz#FixImports.match.<locals>.<genexpr>�parentF)r%r"r*�anyr)r$�node�results)r')r*rr*jszFixImports.matchcstt|�j||�i|_dS)N)r%r"�
start_tree�replace)r$Ztree�filename)r'rrr0vszFixImports.start_treecCs�|jd�}|rh|j}|j|}|jt||jd��d|krD||j|<d|kr�|j|�}|r�|j||�n2|dd}|jj|j�}|r�|jt||jd��dS)NZmodule_name)�prefixZname_importZmultiple_importsr(�)�get�valuer r1rr3r*�	transform)r$r.r/Z
import_modZmod_name�new_nameZ	bare_namerrrr7zs



zFixImports.transform)�__name__�
__module__�__qualname__Z
BM_compatibleZkeep_line_order�MAPPINGr Z	run_orderr!r&r*r0r7�
__classcell__rr)r'rr"Usr"N)�__doc__�rZ
fixer_utilrrr<rr!ZBaseFixr"rrrr�<module>sjPK�E[��4PXX+__pycache__/fix_filter.cpython-36.opt-2.pycnu�[���3


 \[
�@sRddlmZddlmZddlmZddlmZm	Z	m
Z
mZGdd�dej�Z
dS)�)�
fixer_base)�Node)�python_symbols)�Name�ArgList�ListComp�in_special_contextc@s eZdZdZdZdZdd�ZdS)�	FixFilterTaV
    filter_lambda=power<
        'filter'
        trailer<
            '('
            arglist<
                lambdef< 'lambda'
                         (fp=NAME | vfpdef< '(' fp=NAME ')'> ) ':' xp=any
                >
                ','
                it=any
            >
            ')'
        >
        [extra_trailers=trailer*]
    >
    |
    power<
        'filter'
        trailer< '(' arglist< none='None' ',' seq=any > ')' >
        [extra_trailers=trailer*]
    >
    |
    power<
        'filter'
        args=trailer< '(' [any] ')' >
        [extra_trailers=trailer*]
    >
    zfuture_builtins.filtercCs2|j|�rdSg}d|kr:x|dD]}|j|j��q$Wd|kr�t|jd�j�|jd�j�|jd�j�|jd�j��}ttj|g|dd�}n�d|kr�ttd	�td	�|d
j�td	��}ttj|g|dd�}nTt	|�r�dS|dj�}ttjtd�|gdd�}ttjtd
�t
|g�g|�}d|_|j|_|S)NZextra_trailersZ
filter_lambda�fp�itZxp�)�prefixZnoneZ_f�seq�args�filter�list)Zshould_skip�appendZcloner�getr�symsZpowerrrrr
)�selfZnodeZresultsZtrailers�t�newr�r�0/usr/lib64/python3.6/lib2to3/fixes/fix_filter.py�	transform:s4


zFixFilter.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZskip_onrrrrrr	sr	N)rrZpytreerZpygramrrZ
fixer_utilrrrrZConditionalFixr	rrrr�<module>sPK�E[�sL�UU/__pycache__/fix_basestring.cpython-36.opt-2.pycnu�[���3


 \@�@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixBasestringTz'basestring'cCstd|jd�S)N�str)�prefix)rr)�selfZnodeZresults�r�4/usr/lib64/python3.6/lib2to3/fixes/fix_basestring.py�	transform
szFixBasestring.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrr	rsrN)�rZ
fixer_utilrZBaseFixrrrrr	�<module>sPK�E[�T��0__pycache__/fix_numliterals.cpython-36.opt-2.pycnu�[���3


 \�@s:ddlmZddlmZddlmZGdd�dej�ZdS)�)�token)�
fixer_base)�Numberc@s"eZdZejZdd�Zdd�ZdS)�FixNumliteralscCs|jjd�p|jddkS)N�0��Ll���)�value�
startswith)�self�node�r�5/usr/lib64/python3.6/lib2to3/fixes/fix_numliterals.py�matchszFixNumliterals.matchcCs`|j}|ddkr |dd�}n2|jd�rR|j�rRtt|��dkrRd|dd�}t||jd�S)NrrrZ0o)�prefixr	r	)r
r�isdigit�len�setrr)rr
Zresults�valrrr�	transforms"zFixNumliterals.transformN)�__name__�
__module__�__qualname__r�NUMBERZ_accept_typerrrrrrrsrN)Zpgen2r�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK�E[!Z�H/	/	+__pycache__/fix_except.cpython-36.opt-2.pycnu�[���3


 \
�@sbddlmZddlmZddlmZddlmZmZmZm	Z	m
Z
mZdd�ZGdd�dej
�Zd	S)
�)�pytree)�token)�
fixer_base)�Assign�Attr�Name�is_tuple�is_list�symsccsHxBt|�D]6\}}|jtjkr
|jdjdkr
|||dfVq
WdS)N��exceptr)�	enumerate�typer
�
except_clause�children�value)Znodes�i�n�r�0/usr/lib64/python3.6/lib2to3/fixes/fix_except.py�find_exceptssrc@seZdZdZdZdd�ZdS)�	FixExceptTa1
    try_stmt< 'try' ':' (simple_stmt | suite)
                  cleanup=(except_clause ':' (simple_stmt | suite))+
                  tail=(['except' ':' (simple_stmt | suite)]
                        ['else' ':' (simple_stmt | suite)]
                        ['finally' ':' (simple_stmt | suite)]) >
    cCs�|j}dd�|dD�}dd�|dD�}�x*t|�D�]\}}t|j�dkr6|jdd�\}}	}
|	jtdd	d
��|
jtjk�rDt|j	�d	d
�}|
j
�}d|_|
j|�|j
�}|j}
x"t|
�D]\}}t
|tj�r�Pq�Wt|
�s�t|
��rt|t|td���}n
t||�}x&t|
d|��D]}|jd
|��q W|j||�q6|
jdkr6d	|
_q6Wdd�|jdd�D�||}tj|j|�S)NcSsg|]}|j��qSr)�clone)�.0rrrr�
<listcomp>2sz'FixExcept.transform.<locals>.<listcomp>�tailcSsg|]}|j��qSr)r)rZchrrrr4sZcleanup���as� )�prefix��argsrcSsg|]}|j��qSr)r)r�crrrr\s�)r
r�lenr�replacerrr�NAME�new_namerr r
�
isinstancerZNoderr	rr�reversedZinsert_child)�selfZnodeZresultsr
rZtry_cleanuprZe_suite�EZcomma�NZnew_N�targetZsuite_stmtsrZstmtZassignZchildrrrr�	transform/s6



 zFixExcept.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr/rrrrr$srN)r!rZpgen2rrZ
fixer_utilrrrrr	r
rZBaseFixrrrrr�<module>s
 PK�E[%ځ���&__pycache__/fix_imports.cpython-36.pycnu�[���3


 \4�1@s�dZddlmZddlmZmZddddddd	d
dddd
d
ddddddddddddddddddd d!d"d"d#d$d%d&d'd(d(d(d)d*d*d+d,d-�0Zd.d/�Zefd0d1�ZGd2d3�d3ej	�Z
d4S)5z/Fix incompatible imports and module references.�)�
fixer_base)�Name�
attr_chain�io�pickle�builtins�copyregZqueueZsocketserverZconfigparser�reprlibztkinter.filedialogztkinter.simpledialogztkinter.colorchooserztkinter.commondialogztkinter.dialogztkinter.dndztkinter.fontztkinter.messageboxztkinter.scrolledtextztkinter.constantsztkinter.tixztkinter.ttkZtkinterZ_markupbase�winreg�_threadZ
_dummy_threadzdbm.bsdzdbm.dumbzdbm.ndbmzdbm.gnuz
xmlrpc.clientz
xmlrpc.serverzhttp.clientz
html.entitieszhtml.parserzhttp.cookieszhttp.cookiejarzhttp.server�
subprocess�collectionszurllib.parsezurllib.robotparser)0�StringIOZ	cStringIOZcPickleZ__builtin__Zcopy_regZQueueZSocketServerZConfigParser�reprZ
FileDialogZtkFileDialogZSimpleDialogZtkSimpleDialogZtkColorChooserZtkCommonDialogZDialogZTkdndZtkFontZtkMessageBoxZScrolledTextZTkconstantsZTixZttkZTkinterZ
markupbase�_winregZthreadZdummy_threadZdbhashZdumbdbmZdbmZgdbmZ	xmlrpclibZDocXMLRPCServerZSimpleXMLRPCServerZhttplibZhtmlentitydefsZ
HTMLParserZCookieZ	cookielibZBaseHTTPServerZSimpleHTTPServerZ
CGIHTTPServerZcommands�
UserString�UserListZurlparseZrobotparsercCsddjtt|��dS)N�(�|�))�join�mapr)�members�r�1/usr/lib64/python3.6/lib2to3/fixes/fix_imports.py�
alternates=srccsTdjdd�|D��}t|j��}d||fVd|Vd||fVd|VdS)Nz | cSsg|]}d|�qS)zmodule_name='%s'r)�.0�keyrrr�
<listcomp>Bsz!build_pattern.<locals>.<listcomp>zyname_import=import_name< 'import' ((%s) |
               multiple_imports=dotted_as_names< any* (%s) any* >) >
          z�import_from< 'from' (%s) 'import' ['(']
              ( any | import_as_name< any 'as' any > |
                import_as_names< any* >)  [')'] >
          z�import_name< 'import' (dotted_as_name< (%s) 'as' any > |
               multiple_imports=dotted_as_names<
                 any* dotted_as_name< (%s) 'as' any > any* >) >
          z3power< bare_with_attr=(%s) trailer<'.' any > any* >)rr�keys)�mappingZmod_listZ
bare_namesrrr�
build_patternAs
r!csTeZdZdZdZeZdZdd�Z�fdd�Z	�fdd�Z
�fd	d
�Zdd�Z�Z
S)
�
FixImportsT�cCsdjt|j��S)Nr)rr!r )�selfrrrr!`szFixImports.build_patterncs|j�|_tt|�j�dS)N)r!ZPATTERN�superr"�compile_pattern)r$)�	__class__rrr&cs
zFixImports.compile_patterncsHtt|�j��|�}|rDd|kr@t�fdd�t|d�D��r@dS|SdS)N�bare_with_attrc3s|]}�|�VqdS)Nr)r�obj)�matchrr�	<genexpr>qsz#FixImports.match.<locals>.<genexpr>�parentF)r%r"r*�anyr)r$�node�results)r')r*rr*jszFixImports.matchcstt|�j||�i|_dS)N)r%r"�
start_tree�replace)r$Ztree�filename)r'rrr0vszFixImports.start_treecCs�|jd�}|rh|j}|j|}|jt||jd��d|krD||j|<d|kr�|j|�}|r�|j||�n2|dd}|jj|j�}|r�|jt||jd��dS)NZmodule_name)�prefixZname_importZmultiple_importsr(�)�get�valuer r1rr3r*�	transform)r$r.r/Z
import_modZmod_name�new_nameZ	bare_namerrrr7zs



zFixImports.transform)�__name__�
__module__�__qualname__Z
BM_compatibleZkeep_line_order�MAPPINGr Z	run_orderr!r&r*r0r7�
__classcell__rr)r'rr"Usr"N)�__doc__�rZ
fixer_utilrrr<rr!ZBaseFixr"rrrr�<module>sjPK�E[N���dd&__pycache__/fix_sys_exc.cpython-36.pycnu�[���3


 \
�@sJdZddlmZddlmZmZmZmZmZm	Z	m
Z
Gdd�dej�ZdS)z�Fixer for sys.exc_{type, value, traceback}

sys.exc_type -> sys.exc_info()[0]
sys.exc_value -> sys.exc_info()[1]
sys.exc_traceback -> sys.exc_info()[2]
�)�
fixer_base)�Attr�Call�Name�Number�	Subscript�Node�symsc@s:eZdZdddgZdZddjdd�eD��Zd	d
�ZdS)�	FixSysExc�exc_type�	exc_value�
exc_tracebackTzN
              power< 'sys' trailer< dot='.' attribute=(%s) > >
              �|ccs|]}d|VqdS)z'%s'N�)�.0�err�1/usr/lib64/python3.6/lib2to3/fixes/fix_sys_exc.py�	<genexpr>szFixSysExc.<genexpr>cCst|dd}t|jj|j��}ttd�|jd�}ttd�|�}|dj|djd_|j	t
|��ttj
||jd�S)NZ	attribute��exc_info)�prefix�sys�dot�)rr�index�valuerrrrZchildren�appendrrr	Zpower)�selfZnodeZresultsZsys_attrrZcall�attrrrr�	transformszFixSysExc.transformN)�__name__�
__module__�__qualname__rZ
BM_compatible�joinZPATTERNrrrrrr
s
r
N)
�__doc__�rZ
fixer_utilrrrrrrr	ZBaseFixr
rrrr�<module>s$PK�E[�K��.__pycache__/fix_itertools.cpython-36.opt-1.pycnu�[���3


 \�@s2dZddlmZddlmZGdd�dej�ZdS)aT Fixer for itertools.(imap|ifilter|izip) --> (map|filter|zip) and
    itertools.ifilterfalse --> itertools.filterfalse (bugs 2360-2363)

    imports from itertools are fixed in fix_itertools_import.py

    If itertools is imported as something else (ie: import itertools as it;
    it.izip(spam, eggs)) method calls will not get fixed.
    �)�
fixer_base)�Namec@s*eZdZdZdZde�ZdZdd�ZdS)�FixItertoolsTz7('imap'|'ifilter'|'izip'|'izip_longest'|'ifilterfalse')z�
              power< it='itertools'
                  trailer<
                     dot='.' func=%(it_funcs)s > trailer< '(' [any] ')' > >
              |
              power< func=%(it_funcs)s trailer< '(' [any] ')' > >
              �cCs�d}|dd}d|krV|jd	krV|d|d}}|j}|j�|j�|jj|�|p^|j}|jt|jdd�|d��dS)
N�func��it�ifilterfalse�izip_longest�dot�)�prefix)r	r
)�valuer
�remove�parent�replacer)�selfZnodeZresultsr
rrr�r�3/usr/lib64/python3.6/lib2to3/fixes/fix_itertools.py�	transforms

zFixItertools.transformN)	�__name__�
__module__�__qualname__Z
BM_compatibleZit_funcs�localsZPATTERNZ	run_orderrrrrrrs

rN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK�E[�Ⱥ��,__pycache__/fix_asserts.cpython-36.opt-1.pycnu�[���3


 \��@sTdZddlmZddlmZedddddd	d
dddddddd
�ZGdd�de�ZdS)z5Fixer that replaces deprecated unittest method names.�)�BaseFix)�NameZ
assertTrueZassertEqualZassertNotEqualZassertAlmostEqualZassertNotAlmostEqualZassertRegexZassertRaisesRegexZassertRaisesZassertFalse)Zassert_ZassertEqualsZassertNotEqualsZassertAlmostEqualsZassertNotAlmostEqualsZassertRegexpMatchesZassertRaisesRegexpZfailUnlessEqualZfailIfEqualZfailUnlessAlmostEqualZfailIfAlmostEqualZ
failUnlessZfailUnlessRaisesZfailIfc@s(eZdZddjeee��Zdd�ZdS)�
FixAssertszH
              power< any+ trailer< '.' meth=(%s)> any* >
              �|cCs,|dd}|jttt|�|jd��dS)N�meth�)�prefix)�replacer�NAMES�strr)�selfZnodeZresults�name�r�1/usr/lib64/python3.6/lib2to3/fixes/fix_asserts.py�	transform szFixAsserts.transformN)	�__name__�
__module__�__qualname__�join�map�reprr
ZPATTERNrrrrrrsrN)�__doc__Z
fixer_baserZ
fixer_utilr�dictr
rrrrr�<module>s$PK�E[\<�ֶ�*__pycache__/fix_print.cpython-36.opt-1.pycnu�[���3


 \�@sldZddlmZddlmZddlmZddlmZddlmZm	Z	m
Z
mZejd�Z
Gdd	�d	ej�Zd
S)aFixer for print.

Change:
    'print'          into 'print()'
    'print ...'      into 'print(...)'
    'print ... ,'    into 'print(..., end=" ")'
    'print >>x, ...' into 'print(..., file=x)'

No changes are applied if print_function is imported from __future__

�)�patcomp)�pytree)�token)�
fixer_base)�Name�Call�Comma�Stringz"atom< '(' [atom|STRING|NAME] ')' >c@s$eZdZdZdZdd�Zdd�ZdS)�FixPrintTzP
              simple_stmt< any* bare='print' any* > | print_stmt
              c
Cs`|jd�}|r,|jttd�g|jd��dS|jdd�}t|�dkrXtj|d�rXdSd}}}|r�|dt	�kr�|dd�}d}|r�|dt
jtj
d�kr�|dj�}|dd�}d	d
�|D�}|r�d|d_|dk	s�|dk	s�|dk	�rF|dk	�r|j|dtt|���|dk	�r.|j|d
tt|���|dk	�rF|j|d|�ttd�|�}	|j|	_|	S)NZbare�print)�prefix��� z>>�cSsg|]}|j��qS�)�clone)�.0�argrr�//usr/lib64/python3.6/lib2to3/fixes/fix_print.py�
<listcomp>?sz&FixPrint.transform.<locals>.<listcomp>��sep�end�file���r)�get�replacerrrZchildren�len�parend_expr�matchrr�Leafr�
RIGHTSHIFTr�	add_kwargr	�repr)
�selfZnodeZresultsZ
bare_print�argsrrrZl_argsZn_stmtrrr�	transform%s8




zFixPrint.transformcCsNd|_tj|jjt|�tjtjd�|f�}|r@|j	t
��d|_|j	|�dS)Nr�=r)rrZNodeZsymsZargumentrr!r�EQUAL�appendr)r%Zl_nodesZs_kwdZn_exprZ
n_argumentrrrr#Ms
zFixPrint.add_kwargN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr'r#rrrrr
s(r
N)�__doc__rrrZpgen2rrZ
fixer_utilrrrr	Zcompile_patternrZBaseFixr
rrrr�<module>sPK�E["^%���*__pycache__/fix_throw.cpython-36.opt-1.pycnu�[���3


 \.�@sZdZddlmZddlmZddlmZddlmZmZm	Z	m
Z
mZGdd�dej�Z
dS)	z�Fixer for generator.throw(E, V, T).

g.throw(E)       -> g.throw(E)
g.throw(E, V)    -> g.throw(E(V))
g.throw(E, V, T) -> g.throw(E(V).with_traceback(T))

g.throw("foo"[, V[, T]]) will warn about string exceptions.�)�pytree)�token)�
fixer_base)�Name�Call�ArgList�Attr�is_tuplec@seZdZdZdZdd�ZdS)�FixThrowTz�
    power< any trailer< '.' 'throw' >
           trailer< '(' args=arglist< exc=any ',' val=any [',' tb=any] > ')' >
    >
    |
    power< any trailer< '.' 'throw' > trailer< '(' exc=any ')' > >
    cCs�|j}|dj�}|jtjkr.|j|d�dS|jd�}|dkrDdS|j�}t|�rndd�|jdd�D�}nd|_	|g}|d}d	|kr�|d	j�}d|_	t
||�}	t|	td
��t
|g�g}
|jtj|j|
��n|jt
||��dS)N�excz+Python 3 does not support string exceptions�valcSsg|]}|j��qS�)�clone)�.0�cr
r
�//usr/lib64/python3.6/lib2to3/fixes/fix_throw.py�
<listcomp>)sz&FixThrow.transform.<locals>.<listcomp>���args�tb�with_traceback���)�symsr�typer�STRINGZcannot_convert�getr	Zchildren�prefixrrrr�replacerZNodeZpower)�selfZnodeZresultsrrrrZ
throw_argsr�eZwith_tbr
r
r�	transforms*

zFixThrow.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr!r
r
r
rr
sr
N)�__doc__rrZpgen2rrZ
fixer_utilrrrrr	ZBaseFixr
r
r
r
r�<module>s
PK�E[
'O!��.__pycache__/fix_funcattrs.cpython-36.opt-1.pycnu�[���3


 \��@s2dZddlmZddlmZGdd�dej�ZdS)z3Fix function attribute names (f.func_x -> f.__x__).�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�FixFuncattrsTz�
    power< any+ trailer< '.' attr=('func_closure' | 'func_doc' | 'func_globals'
                                  | 'func_name' | 'func_defaults' | 'func_code'
                                  | 'func_dict') > any* >
    cCs2|dd}|jtd|jdd�|jd��dS)N�attr�z__%s__�)�prefix)�replacer�valuer)�selfZnodeZresultsr�r�3/usr/lib64/python3.6/lib2to3/fixes/fix_funcattrs.py�	transformszFixFuncattrs.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrr
r	srN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr
�<module>sPK�E[��(__pycache__/fix_raw_input.cpython-36.pycnu�[���3


 \��@s2dZddlmZddlmZGdd�dej�ZdS)z2Fixer that changes raw_input(...) into input(...).�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�FixRawInputTzU
              power< name='raw_input' trailer< '(' [any] ')' > any* >
              cCs |d}|jtd|jd��dS)N�name�input)�prefix)�replacerr)�selfZnodeZresultsr�r
�3/usr/lib64/python3.6/lib2to3/fixes/fix_raw_input.py�	transformszFixRawInput.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrr
r
r
rrsrN)�__doc__�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK�E[�Ⱥ��&__pycache__/fix_asserts.cpython-36.pycnu�[���3


 \��@sTdZddlmZddlmZedddddd	d
dddddddd
�ZGdd�de�ZdS)z5Fixer that replaces deprecated unittest method names.�)�BaseFix)�NameZ
assertTrueZassertEqualZassertNotEqualZassertAlmostEqualZassertNotAlmostEqualZassertRegexZassertRaisesRegexZassertRaisesZassertFalse)Zassert_ZassertEqualsZassertNotEqualsZassertAlmostEqualsZassertNotAlmostEqualsZassertRegexpMatchesZassertRaisesRegexpZfailUnlessEqualZfailIfEqualZfailUnlessAlmostEqualZfailIfAlmostEqualZ
failUnlessZfailUnlessRaisesZfailIfc@s(eZdZddjeee��Zdd�ZdS)�
FixAssertszH
              power< any+ trailer< '.' meth=(%s)> any* >
              �|cCs,|dd}|jttt|�|jd��dS)N�meth�)�prefix)�replacer�NAMES�strr)�selfZnodeZresults�name�r�1/usr/lib64/python3.6/lib2to3/fixes/fix_asserts.py�	transform szFixAsserts.transformN)	�__name__�
__module__�__qualname__�join�map�reprr
ZPATTERNrrrrrrsrN)�__doc__Z
fixer_baserZ
fixer_utilr�dictr
rrrrr�<module>s$PK�E[�
��UU%__pycache__/fix_reduce.cpython-36.pycnu�[���3


 \E�@s2dZddlmZddlmZGdd�dej�ZdS)zqFixer for reduce().

Makes sure reduce() is imported from the functools module if reduce is
used in that module.
�)�
fixer_base)�touch_importc@s eZdZdZdZdZdd�ZdS)�	FixReduceTZpreai
    power< 'reduce'
        trailer< '('
            arglist< (
                (not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any) |
                (not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any)
            ) >
        ')' >
    >
    cCstdd|�dS)N�	functools�reduce)r)�selfZnodeZresults�r�0/usr/lib64/python3.6/lib2to3/fixes/fix_reduce.py�	transform"szFixReduce.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�orderZPATTERNr
rrrr	rsrN)�__doc__Zlib2to3rZlib2to3.fixer_utilrZBaseFixrrrrr	�<module>sPK�E[~aNN'__pycache__/fix_ws_comma.cpython-36.pycnu�[���3


 \B�@s>dZddlmZddlmZddlmZGdd�dej�ZdS)z�Fixer that changes 'a ,b' into 'a, b'.

This also changes '{a :b}' into '{a: b}', but does not touch other
uses of colons.  It does not touch other uses of whitespace.

�)�pytree)�token)�
fixer_basec@s@eZdZdZdZejejd�Zejej	d�Z	ee	fZ
dd�ZdS)�
FixWsCommaTzH
    any<(not(',') any)+ ',' ((not(',') any)+ ',')* [not(',') any]>
    �,�:cCsd|j�}d}xR|jD]H}||jkrD|j}|j�r>d|kr>d|_d}q|rX|j}|sXd|_d}qW|S)NF�
�T� )ZcloneZchildren�SEPS�prefix�isspace)�selfZnodeZresults�newZcommaZchildr�r�2/usr/lib64/python3.6/lib2to3/fixes/fix_ws_comma.py�	transforms
zFixWsComma.transformN)�__name__�
__module__�__qualname__ZexplicitZPATTERNrZLeafr�COMMA�COLONrrrrrrrsrN)�__doc__r	rZpgen2rrZBaseFixrrrrr�<module>sPK�E[ݛ�uu.__pycache__/fix_funcattrs.cpython-36.opt-2.pycnu�[���3


 \��@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�FixFuncattrsTz�
    power< any+ trailer< '.' attr=('func_closure' | 'func_doc' | 'func_globals'
                                  | 'func_name' | 'func_defaults' | 'func_code'
                                  | 'func_dict') > any* >
    cCs2|dd}|jtd|jdd�|jd��dS)N�attr�z__%s__�)�prefix)�replacer�valuer)�selfZnodeZresultsr�r�3/usr/lib64/python3.6/lib2to3/fixes/fix_funcattrs.py�	transformszFixFuncattrs.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrr
r	srN)�rZ
fixer_utilrZBaseFixrrrrr
�<module>sPK�E[a�;888)__pycache__/fix_repr.cpython-36.opt-1.pycnu�[���3


 \e�@s:dZddlmZddlmZmZmZGdd�dej�ZdS)z/Fixer that transforms `xyzzy` into repr(xyzzy).�)�
fixer_base)�Call�Name�parenthesizec@seZdZdZdZdd�ZdS)�FixReprTz7
              atom < '`' expr=any '`' >
              cCs8|dj�}|j|jjkr"t|�}ttd�|g|jd�S)N�expr�repr)�prefix)Zclone�typeZsymsZ	testlist1rrrr	)�selfZnodeZresultsr�r�./usr/lib64/python3.6/lib2to3/fixes/fix_repr.py�	transformszFixRepr.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrr
rsrN)	�__doc__�rZ
fixer_utilrrrZBaseFixrrrrr
�<module>sPK�E[8`��*__pycache__/fix_set_literal.cpython-36.pycnu�[���3


 \��@s:dZddlmZmZddlmZmZGdd�dej�ZdS)z:
Optional fixer to transform set() calls to set literals.
�)�
fixer_base�pytree)�token�symsc@s eZdZdZdZdZdd�ZdS)�
FixSetLiteralTajpower< 'set' trailer< '('
                     (atom=atom< '[' (items=listmaker< any ((',' any)* [',']) >
                                |
                                single=any) ']' >
                     |
                     atom< '(' items=testlist_gexp< any ((',' any)* [',']) > ')' >
                     )
                     ')' > >
              c	Cs�|jd�}|r2tjtj|j�g�}|j|�|}n|d}tjtj	d�g}|j
dd�|jD��|jtjtj
d��|jj|d
_tjtj|�}|j|_t|j�dkr�|jd	}|j�|j|jd_|S)N�single�items�{css|]}|j�VqdS)N)�clone)�.0�n�r
�5/usr/lib64/python3.6/lib2to3/fixes/fix_set_literal.py�	<genexpr>'sz*FixSetLiteral.transform.<locals>.<genexpr>�}������r)�getrZNoderZ	listmakerr
�replaceZLeafr�LBRACE�extendZchildren�append�RBRACEZnext_sibling�prefixZdictsetmaker�len�remove)	�selfZnodeZresultsrZfaker�literalZmakerrr
r
r�	transforms"


zFixSetLiteral.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZexplicitZPATTERNr r
r
r
rrs
rN)	�__doc__Zlib2to3rrZlib2to3.fixer_utilrrZBaseFixrr
r
r
r�<module>sPK�E[�
��)__pycache__/fix_next.cpython-36.opt-1.pycnu�[���3


 \f�@sndZddlmZddlmZddlmZddlm	Z	m
Z
mZdZGdd�dej
�Zd	d
�Zdd�Zd
d�ZdS)z.Fixer for it.next() -> next(it), per PEP 3114.�)�token)�python_symbols)�
fixer_base)�Name�Call�find_bindingz;Calls to builtin next() possibly shadowed by global bindingcs0eZdZdZdZdZ�fdd�Zdd�Z�ZS)�FixNextTa�
    power< base=any+ trailer< '.' attr='next' > trailer< '(' ')' > >
    |
    power< head=any+ trailer< '.' attr='next' > not trailer< '(' ')' > >
    |
    classdef< 'class' any+ ':'
              suite< any*
                     funcdef< 'def'
                              name='next'
                              parameters< '(' NAME ')' > any+ >
                     any* > >
    |
    global=global_stmt< 'global' any* 'next' any* >
    Zprecs>tt|�j||�td|�}|r4|j|t�d|_nd|_dS)N�nextTF)�superr�
start_treer�warning�bind_warning�
shadowed_next)�selfZtree�filename�n)�	__class__��./usr/lib64/python3.6/lib2to3/fixes/fix_next.pyr$s
zFixNext.start_treecCs�|jd�}|jd�}|jd�}|rr|jr>|jtd|jd��q�dd�|D�}d|d	_|jttd
|jd�|��n�|r�td|jd�}|j|�nj|r�t|�r�|d}djdd�|D��j�d
kr�|j	|t
�dS|jtd��nd|kr�|j	|t
�d|_dS)N�base�attr�name�__next__)�prefixcSsg|]}|j��qSr)Zclone)�.0rrrr�
<listcomp>9sz%FixNext.transform.<locals>.<listcomp>��r	�headcSsg|]}t|��qSr)�str)rrrrrrEsZ__builtin__�globalT)�getr�replacerrr�is_assign_target�join�striprr
)r�nodeZresultsrrrrrrrr�	transform.s,



zFixNext.transform)	�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERN�orderrr'�
__classcell__rr)rrrs

rcCsFt|�}|dkrdSx,|jD]"}|jtjkr0dSt||�rdSqWdS)NFT)�find_assign�children�typer�EQUAL�
is_subtree)r&ZassignZchildrrrr#Qs
r#cCs4|jtjkr|S|jtjks&|jdkr*dSt|j�S)N)r/�symsZ	expr_stmtZsimple_stmt�parentr-)r&rrrr-]s
r-cs$|�krdSt�fdd�|jD��S)NTc3s|]}t|��VqdS)N)r1)r�c)r&rr�	<genexpr>gszis_subtree.<locals>.<genexpr>)�anyr.)�rootr&r)r&rr1dsr1N)�__doc__Zpgen2rZpygramrr2rrZ
fixer_utilrrrr
ZBaseFixrr#r-r1rrrr�<module>s@PK�E[�
`��+__pycache__/fix_reduce.cpython-36.opt-2.pycnu�[���3


 \E�@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�touch_importc@s eZdZdZdZdZdd�ZdS)�	FixReduceTZpreai
    power< 'reduce'
        trailer< '('
            arglist< (
                (not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any) |
                (not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any)
            ) >
        ')' >
    >
    cCstdd|�dS)N�	functools�reduce)r)�selfZnodeZresults�r�0/usr/lib64/python3.6/lib2to3/fixes/fix_reduce.py�	transform"szFixReduce.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�orderZPATTERNr
rrrr	rsrN)Zlib2to3rZlib2to3.fixer_utilrZBaseFixrrrrr	�<module>
sPK�E[&Fam��,__pycache__/fix_getcwdu.cpython-36.opt-1.pycnu�[���3


 \��@s2dZddlmZddlmZGdd�dej�ZdS)z1
Fixer that changes os.getcwdu() to os.getcwd().
�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixGetcwduTzR
              power< 'os' trailer< dot='.' name='getcwdu' > any* >
              cCs |d}|jtd|jd��dS)N�name�getcwd)�prefix)�replacerr)�selfZnodeZresultsr�r
�1/usr/lib64/python3.6/lib2to3/fixes/fix_getcwdu.py�	transformszFixGetcwdu.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrr
r
r
rr
srN)�__doc__�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK�E[�3\\*__pycache__/fix_input.cpython-36.opt-2.pycnu�[���3


 \��@sHddlmZddlmZmZddlmZejd�ZGdd�dej�Z	dS)�)�
fixer_base)�Call�Name)�patcompz&power< 'eval' trailer< '(' any ')' > >c@seZdZdZdZdd�ZdS)�FixInputTzL
              power< 'input' args=trailer< '(' [any] ')' > >
              cCs6tj|jj�rdS|j�}d|_ttd�|g|jd�S)N��eval)�prefix)�context�match�parentZcloner	rr)�selfZnodeZresults�new�r�//usr/lib64/python3.6/lib2to3/fixes/fix_input.py�	transforms
zFixInput.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrr
srN)
rrZ
fixer_utilrrrZcompile_patternr
ZBaseFixrrrrr�<module>s
PK�E[Y�ٜxx-__pycache__/fix_operator.cpython-36.opt-1.pycnu�[���3


 \�
�@sNdZddlZddlmZddlmZmZmZmZdd�Z	Gdd�dej
�ZdS)	a�Fixer for operator functions.

operator.isCallable(obj)       -> hasattr(obj, '__call__')
operator.sequenceIncludes(obj) -> operator.contains(obj)
operator.isSequenceType(obj)   -> isinstance(obj, collections.Sequence)
operator.isMappingType(obj)    -> isinstance(obj, collections.Mapping)
operator.isNumberType(obj)     -> isinstance(obj, numbers.Number)
operator.repeat(obj, n)        -> operator.mul(obj, n)
operator.irepeat(obj, n)       -> operator.imul(obj, n)
�N)�
fixer_base)�Call�Name�String�touch_importcs�fdd�}|S)Ncs
�|_|S)N)�
invocation)�f)�s��2/usr/lib64/python3.6/lib2to3/fixes/fix_operator.py�decszinvocation.<locals>.decr
)r	rr
)r	rrsrc@s�eZdZdZdZdZdZdeeed�Zdd�Z	e
d	�d
d��Ze
d�d
d��Ze
d�dd��Z
e
d�dd��Ze
d�dd��Ze
d�dd��Ze
d�dd��Zdd�Zd d!�Zd"d#�Zd$S)%�FixOperatorTZprez�
              method=('isCallable'|'sequenceIncludes'
                     |'isSequenceType'|'isMappingType'|'isNumberType'
                     |'repeat'|'irepeat')
              z'(' obj=any ')'z�
              power< module='operator'
                trailer< '.' %(methods)s > trailer< %(obj)s > >
              |
              power< %(methods)s trailer< %(obj)s > >
              )�methods�objcCs"|j||�}|dk	r|||�SdS)N)�
_check_method)�self�node�results�methodr
r
r�	transform+szFixOperator.transformzoperator.contains(%s)cCs|j||d�S)N�contains)�_handle_rename)rrrr
r
r�_sequenceIncludes0szFixOperator._sequenceIncludeszhasattr(%s, '__call__')cCs2|d}|j�td�td�g}ttd�||jd�S)Nrz, z
'__call__'�hasattr)�prefix)�clonerrrr)rrrr�argsr
r
r�_isCallable4szFixOperator._isCallablezoperator.mul(%s)cCs|j||d�S)N�mul)r)rrrr
r
r�_repeat:szFixOperator._repeatzoperator.imul(%s)cCs|j||d�S)N�imul)r)rrrr
r
r�_irepeat>szFixOperator._irepeatz$isinstance(%s, collections.Sequence)cCs|j||dd�S)N�collections�Sequence)�_handle_type2abc)rrrr
r
r�_isSequenceTypeBszFixOperator._isSequenceTypez#isinstance(%s, collections.Mapping)cCs|j||dd�S)Nr"�Mapping)r$)rrrr
r
r�_isMappingTypeFszFixOperator._isMappingTypezisinstance(%s, numbers.Number)cCs|j||dd�S)NZnumbers�Number)r$)rrrr
r
r�
_isNumberTypeJszFixOperator._isNumberTypecCs|dd}||_|j�dS)Nrr)�valueZchanged)rrr�namerr
r
rrNszFixOperator._handle_renamecCsFtd||�|d}|j�tddj||g��g}ttd�||jd�S)Nrz, �.�
isinstance)r)rrr�joinrrr)rrr�module�abcrrr
r
rr$SszFixOperator._handle_type2abccCs\t|d|ddj�}t|tj�rXd|kr0|St|d�f}|j|}|j|d|�dS)N�_rrr/rzYou should use '%s' here.)�getattrr*r-r"�Callable�strrZwarning)rrrr�subZinvocation_strr
r
rrYs
zFixOperator._check_methodN)�__name__�
__module__�__qualname__Z
BM_compatible�orderrr�dictZPATTERNrrrrrr!r%r'r)rr$rr
r
r
rr
s r
)�__doc__r"Zlib2to3rZlib2to3.fixer_utilrrrrrZBaseFixr
r
r
r
r�<module>
s
PK�E[w2l���.__pycache__/fix_metaclass.cpython-36.opt-1.pycnu�[���3


 \ �@svdZddlmZddlmZddlmZmZmZdd�Z	dd�Z
d	d
�Zdd�Zd
d�Z
dd�ZGdd�dej�ZdS)a�Fixer for __metaclass__ = X -> (metaclass=X) methods.

   The various forms of classef (inherits nothing, inherits once, inherints
   many) don't parse the same in the CST so we look at ALL classes for
   a __metaclass__ and if we find one normalize the inherits to all be
   an arglist.

   For one-liner classes ('class X: pass') there is no indent/dedent so
   we normalize those into having a suite.

   Moving the __metaclass__ into the classdef can also cause the class
   body to be empty so there is some special casing for that as well.

   This fixer also tries very hard to keep original indenting and spacing
   in all those corner cases.

�)�
fixer_base)�token)�syms�Node�LeafcCsxxr|jD]h}|jtjkr t|�S|jtjkr|jr|jd}|jtjkr|jr|jd}t|t�r|j	dkrdSqWdS)z� we have to check the cls_node without changing it.
        There are two possibilities:
          1)  clsdef => suite => simple_stmt => expr_stmt => Leaf('__meta')
          2)  clsdef => simple_stmt => expr_stmt => Leaf('__meta')
    ��
__metaclass__TF)
�children�typer�suite�
has_metaclass�simple_stmt�	expr_stmt�
isinstancer�value)�parent�node�	expr_nodeZ	left_side�r�3/usr/lib64/python3.6/lib2to3/fixes/fix_metaclass.pyrs



rcCs�x|jD]}|jtjkrdSqWx,t|j�D]\}}|jtjkr,Pq,Wtd��ttjg�}x:|j|dd�r�|j|d}|j	|j
��|j�q\W|j	|�|}dS)zf one-line classes don't get a suite in the parse tree so we add
        one to normalize the tree
    NzNo class suite and no ':'!�)r	r
rr�	enumerater�COLON�
ValueErrorr�append_child�clone�remove)�cls_noder�ir�	move_noderrr�fixup_parse_tree-s
r c
Cs�x(t|j�D]\}}|jtjkrPqWdS|j�ttjg�}ttj	|g�}x2|j|d�r~|j|}|j
|j��|j�qNW|j||�|jdjd}|jdjd}	|	j
|_
dS)z� if there is a semi-colon all the parts count as part of the same
        simple_stmt.  We just want the __metaclass__ part so we move
        everything after the semi-colon into its own simple_stmt node
    Nr)rr	r
r�SEMIrrrrr
rr�insert_child�prefix)
rrZ	stmt_nodeZsemi_indrZnew_exprZnew_stmtrZ	new_leaf1Z	old_leaf1rrr�fixup_simple_stmtGs
r$cCs*|jr&|jdjtjkr&|jdj�dS)Nr���r%)r	r
r�NEWLINEr)rrrr�remove_trailing_newline_sr'ccs�x$|jD]}|jtjkrPqWtd��x�tt|j��D]t\}}|jtjkr6|jr6|jd}|jtjkr6|jr6|jd}t	|t
�r6|jdkr6t|||�t
|�|||fVq6WdS)NzNo class suite!rr)r	r
rrr�listrr
rrrrr$r')rrrZsimple_noderZ	left_noderrr�
find_metasds



r)cCs�|jddd�}x|r.|j�}|jtjkrPqWxL|r||j�}t|t�rd|jtjkrd|jr`d|_dS|j	|jddd��q2WdS)z� If an INDENT is followed by a thing with a prefix then nuke the prefix
        Otherwise we get in trouble when removing __metaclass__ at suite start
    Nr�r%r%)
r	�popr
r�INDENTrr�DEDENTr#�extend)rZkidsrrrr�fixup_indent{sr/c@seZdZdZdZdd�ZdS)�FixMetaclassTz
    classdef<any*>
    cCs<t|�sdSt|�d}x"t|�D]\}}}|}|j�q"W|jdj}t|j�dkr�|jdjtjkrt|jd}n(|jdj	�}	t
tj|	g�}|jd|�n�t|j�dkr�t
tjg�}|jd|�nZt|j�dk�rt
tjg�}|jdt
tjd��|jd|�|jdt
tjd��ntd	��|jdjd}
d
|
_|
j}|j�r^|jt
tjd��d|
_nd
|
_|jd}d
|jd_d
|jd_|j|�t|�|j�s�|j�t
|d�}
||
_|j|
�|jt
tjd��nbt|j�dk�r8|jdjtjk�r8|jdjtjk�r8t
|d�}
|jd|
�|jdt
tjd��dS)Nr����r�)�(zUnexpected class definition�	metaclass�,� r*r�pass�
���r%r%r%)rr r)rr	r
�lenr�arglistrrZ	set_childr"rr�RPAR�LPARrrr#r�COMMAr/r&r,r-)�selfrZresultsZlast_metaclassrrZstmtZ	text_typer>rZmeta_txtZorig_meta_prefixrZ	pass_leafrrr�	transform�s^




zFixMetaclass.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrCrrrrr0�sr0N)�__doc__r*rZpygramrZ
fixer_utilrrrrr r$r'r)r/ZBaseFixr0rrrr�<module>sPK�E[
'O!��(__pycache__/fix_funcattrs.cpython-36.pycnu�[���3


 \��@s2dZddlmZddlmZGdd�dej�ZdS)z3Fix function attribute names (f.func_x -> f.__x__).�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�FixFuncattrsTz�
    power< any+ trailer< '.' attr=('func_closure' | 'func_doc' | 'func_globals'
                                  | 'func_name' | 'func_defaults' | 'func_code'
                                  | 'func_dict') > any* >
    cCs2|dd}|jtd|jdd�|jd��dS)N�attr�z__%s__�)�prefix)�replacer�valuer)�selfZnodeZresultsr�r�3/usr/lib64/python3.6/lib2to3/fixes/fix_funcattrs.py�	transformszFixFuncattrs.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrr
r	srN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr
�<module>sPK�E[��~66*__pycache__/fix_types.cpython-36.opt-2.pycnu�[���3


 \��@slddlmZddlmZdddddddd	d
dd
dd
ddddddddd�Zdd�eD�ZGdd�dej�ZdS)�)�
fixer_base)�Name�bool�
memoryview�type�complex�dictztype(Ellipsis)�float�int�list�objectz
type(None)ztype(NotImplemented)�slice�bytesz(str,)�tuple�str�range)ZBooleanTypeZ
BufferTypeZ	ClassTypeZComplexTypeZDictTypeZDictionaryTypeZEllipsisTypeZ	FloatTypeZIntTypeZListTypeZLongTypeZ
ObjectTypeZNoneTypeZNotImplementedTypeZ	SliceTypeZ
StringTypeZStringTypesZ	TupleTypeZTypeTypeZUnicodeTypeZ
XRangeTypecCsg|]}d|�qS)z)power< 'types' trailer< '.' name='%s' > >�)�.0�trr�//usr/lib64/python3.6/lib2to3/fixes/fix_types.py�
<listcomp>3src@s"eZdZdZdje�Zdd�ZdS)�FixTypesT�|cCs&tj|dj�}|r"t||jd�SdS)N�name)�prefix)�
_TYPE_MAPPING�get�valuerr)�selfZnodeZresultsZ	new_valuerrr�	transform9szFixTypes.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�join�_patsZPATTERNrrrrrr5s
rN)�rZ
fixer_utilrrr$ZBaseFixrrrrr�<module>s0PK�E[&Fam��&__pycache__/fix_getcwdu.cpython-36.pycnu�[���3


 \��@s2dZddlmZddlmZGdd�dej�ZdS)z1
Fixer that changes os.getcwdu() to os.getcwd().
�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixGetcwduTzR
              power< 'os' trailer< dot='.' name='getcwdu' > any* >
              cCs |d}|jtd|jd��dS)N�name�getcwd)�prefix)�replacerr)�selfZnodeZresultsr�r
�1/usr/lib64/python3.6/lib2to3/fixes/fix_getcwdu.py�	transformszFixGetcwdu.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrr
r
r
rr
srN)�__doc__�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK�E[��7��'__pycache__/fix_ne.cpython-36.opt-2.pycnu�[���3


 \;�@s:ddlmZddlmZddlmZGdd�dej�ZdS)�)�pytree)�token)�
fixer_basec@s"eZdZejZdd�Zdd�ZdS)�FixNecCs
|jdkS)Nz<>)�value)�self�node�r	�,/usr/lib64/python3.6/lib2to3/fixes/fix_ne.py�matchszFixNe.matchcCstjtjd|jd�}|S)Nz!=)�prefix)rZLeafr�NOTEQUALr)rrZresults�newr	r	r
�	transformszFixNe.transformN)�__name__�
__module__�__qualname__rr
Z_accept_typerrr	r	r	r
rsrN)�rZpgen2rrZBaseFixrr	r	r	r
�<module>sPK�E[m2���-__pycache__/fix_execfile.cpython-36.opt-2.pycnu�[���3


 \�@sRddlmZddlmZmZmZmZmZmZm	Z	m
Z
mZmZGdd�dej
�ZdS)�)�
fixer_base)
�Comma�Name�Call�LParen�RParen�Dot�Node�ArgList�String�symsc@seZdZdZdZdd�ZdS)�FixExecfileTz�
    power< 'execfile' trailer< '(' arglist< filename=any [',' globals=any [',' locals=any ] ] > ')' > >
    |
    power< 'execfile' trailer< '(' filename=any ')' > >
    cCs&|d}|jd�}|jd�}|jdjdj�}t|j�t�tdd�g|d�}ttjt	d�|g�}ttj
t�t	d	�g�ttj
t�t
�g�g}	|g|	}
|j�}d|_td
d�}|
t�|t�|g}
tt	d�|
d�}|g}|dk	r�|jt�|j�g�|dk	�r|jt�|j�g�tt	d
�||jd�S)N�filename�globals�locals�z"rb"� )Zrparen�open�readz'exec'�compile��exec)�prefix���r)�getZchildrenZcloner
rrr	rZpowerrZtrailerrrrrr�extend)�selfZnodeZresultsrrrZexecfile_parenZ	open_argsZ	open_callrZ	open_exprZfilename_argZexec_strZcompile_argsZcompile_call�args�r�2/usr/lib64/python3.6/lib2to3/fixes/fix_execfile.py�	transforms*




zFixExecfile.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr rrrrr
sr
N)rrZ
fixer_utilrrrrrrr	r
rrZBaseFixr
rrrr�<module>
s0PK�E[��Ȍ�
�
%__pycache__/fix_import.cpython-36.pycnu�[���3


 \��@sZdZddlmZddlmZmZmZmZddlm	Z	m
Z
mZdd�ZGdd	�d	ej
�Zd
S)z�Fixer for import statements.
If spam is being imported from the local directory, this import:
    from spam import eggs
Becomes:
    from .spam import eggs

And this import:
    import spam
Becomes:
    from . import spam
�)�
fixer_base�)�dirname�join�exists�sep)�
FromImport�syms�tokenccs�|g}x�|r�|j�}|jtjkr*|jVq|jtjkrPdjdd�|jD��Vq|jtj	krn|j
|jd�q|jtjkr�|j|jddd��qt
d��qWdS)	zF
    Walks over all the names imported in a dotted_as_names node.
    �cSsg|]
}|j�qS�)�value)�.0Zchrr�0/usr/lib64/python3.6/lib2to3/fixes/fix_import.py�
<listcomp>sz$traverse_imports.<locals>.<listcomp>rNrzunknown node type���)�pop�typer
�NAMEr
r	Zdotted_namer�childrenZdotted_as_name�appendZdotted_as_names�extend�AssertionError)�names�pending�noderrr�traverse_importss
rcs4eZdZdZdZ�fdd�Zdd�Zdd�Z�ZS)	�	FixImportTzj
    import_from< 'from' imp=any 'import' ['('] any [')'] >
    |
    import_name< 'import' imp=any >
    cs"tt|�j||�d|jk|_dS)NZabsolute_import)�superr�
start_treeZfuture_features�skip)�selfZtree�name)�	__class__rrr/szFixImport.start_treecCs�|jr
dS|d}|jtjkrZxt|d�s6|jd}q W|j|j�r�d|j|_|j�n^d}d}x$t	|�D]}|j|�r�d}qld}qlW|r�|r�|j
|d�dStd|g�}|j|_|SdS)N�impr
r�.FTz#absolute and local imports together)
r rr	Zimport_from�hasattrr�probably_a_local_importr
ZchangedrZwarningr�prefix)r!rZresultsr$Z
have_localZ
have_absoluteZmod_name�newrrr�	transform3s,

zFixImport.transformcCsv|jd�rdS|jdd�d}t|j�}t||�}ttt|�d��sHdSx(dtddd	d
gD]}t||�rZdSqZWdS)Nr%F�rz__init__.pyz.pyz.pycz.soz.slz.pydT)�
startswith�splitr�filenamerrr)r!Zimp_name�	base_pathZextrrrr'Us


z!FixImport.probably_a_local_import)	�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrr*r'�
__classcell__rr)r#rr&s
"rN)�__doc__rrZos.pathrrrrZ
fixer_utilrr	r
rZBaseFixrrrrr�<module>s
PK�E[+��??,__pycache__/fix_unicode.cpython-36.opt-2.pycnu�[���3


 \��@s8ddlmZddlmZddd�ZGdd�dej�ZdS)	�)�token)�
fixer_base�chr�str)ZunichrZunicodecs,eZdZdZdZ�fdd�Zdd�Z�ZS)�
FixUnicodeTzSTRING | 'unicode' | 'unichr'cs"tt|�j||�d|jk|_dS)N�unicode_literals)�superr�
start_treeZfuture_featuresr)�selfZtree�filename)�	__class__��1/usr/lib64/python3.6/lib2to3/fixes/fix_unicode.pyr	szFixUnicode.start_treecCs�|jtjkr$|j�}t|j|_|S|jtjkr�|j}|jrl|ddkrld|krldjdd�|j	d�D��}|ddkr�|dd�}||jkr�|S|j�}||_|SdS)	N�z'"�\z\\cSs g|]}|jdd�jdd��qS)z\uz\\uz\Uz\\U)�replace)�.0�vr
r
r�
<listcomp>!sz(FixUnicode.transform.<locals>.<listcomp>ZuU�)
�typer�NAMEZclone�_mapping�value�STRINGr�join�split)r
ZnodeZresults�new�valr
r
r�	transforms"
zFixUnicode.transform)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr	r�
__classcell__r
r
)rrrsrN)Zpgen2r�rrZBaseFixrr
r
r
r�<module>s
PK�E[G�**%__pycache__/fix_idioms.cpython-36.pycnu�[���3


 \�@sNdZddlmZddlmZmZmZmZmZm	Z	dZ
dZGdd�dej�Z
dS)	a�Adjust some old Python 2 idioms to their modern counterparts.

* Change some type comparisons to isinstance() calls:
    type(x) == T -> isinstance(x, T)
    type(x) is T -> isinstance(x, T)
    type(x) != T -> not isinstance(x, T)
    type(x) is not T -> not isinstance(x, T)

* Change "while 1:" into "while True:".

* Change both

    v = list(EXPR)
    v.sort()
    foo(v)

and the more general

    v = EXPR
    v.sort()
    foo(v)

into

    v = sorted(EXPR)
    foo(v)
�)�
fixer_base)�Call�Comma�Name�Node�	BlankLine�symsz0(n='!=' | '==' | 'is' | n=comp_op< 'is' 'not' >)z(power< 'type' trailer< '(' x=any ')' > >csPeZdZdZdeeeefZ�fdd�Zdd�Zdd�Z	d	d
�Z
dd�Z�ZS)
�	FixIdiomsTa�
        isinstance=comparison< %s %s T=any >
        |
        isinstance=comparison< T=any %s %s >
        |
        while_stmt< 'while' while='1' ':' any+ >
        |
        sorted=any<
            any*
            simple_stmt<
              expr_stmt< id1=any '='
                         power< list='list' trailer< '(' (not arglist<any+>) any ')' > >
              >
              '\n'
            >
            sort=
            simple_stmt<
              power< id2=any
                     trailer< '.' 'sort' > trailer< '(' ')' >
              >
              '\n'
            >
            next=any*
        >
        |
        sorted=any<
            any*
            simple_stmt< expr_stmt< id1=any '=' expr=any > '\n' >
            sort=
            simple_stmt<
              power< id2=any
                     trailer< '.' 'sort' > trailer< '(' ')' >
              >
              '\n'
            >
            next=any*
        >
    cs8tt|�j|�}|r4d|kr4|d|dkr0|SdS|S)N�sortedZid1Zid2)�superr	�match)�self�node�r)�	__class__��0/usr/lib64/python3.6/lib2to3/fixes/fix_idioms.pyrOszFixIdioms.matchcCsHd|kr|j||�Sd|kr(|j||�Sd|kr<|j||�Std��dS)N�
isinstance�whiler
z
Invalid match)�transform_isinstance�transform_while�transform_sort�RuntimeError)r
r�resultsrrr�	transformZszFixIdioms.transformcCsh|dj�}|dj�}d|_d|_ttd�|t�|g�}d|kr\d|_ttjtd�|g�}|j|_|S)N�x�T�� r�n�not)�clone�prefixrrrrrZnot_test)r
rrrrZtestrrrrdszFixIdioms.transform_isinstancecCs |d}|jtd|jd��dS)Nr�True)r")�replacerr")r
rrZonerrrrpszFixIdioms.transform_whilecCs|d}|d}|jd�}|jd�}|r>|jtd|jd��n8|rn|j�}d|_|jttd�|g|jd��ntd��|j�|j}d	|k�r|r�|jd	�d
|d
jf}	d	j	|	�|d
_nH|j
s�t�|jdks�t�t
�}
|j
j|
�|j|
ks�t�|jd	�d
|
_dS)N�sort�next�list�exprr
)r"rzshould not have reached here�
�)�getr$rr"r!rr�remove�
rpartition�join�parent�AssertionErrorZnext_siblingrZappend_child)r
rrZ	sort_stmtZ	next_stmtZ	list_callZsimple_expr�newZbtwnZprefix_linesZend_linerrrrts0



zFixIdioms.transform_sort)
�__name__�
__module__�__qualname__Zexplicit�TYPE�CMPZPATTERNrrrrr�
__classcell__rr)rrr	%s'
r	N)�__doc__rrZ
fixer_utilrrrrrrr6r5ZBaseFixr	rrrr�<module>s
 PK�E[�폏��#__pycache__/__init__.cpython-36.pycnu�[���3


 \/�@sdS)N�rrr�./usr/lib64/python3.6/lib2to3/fixes/__init__.py�<module>sPK�E[�폏��)__pycache__/__init__.cpython-36.opt-1.pycnu�[���3


 \/�@sdS)N�rrr�./usr/lib64/python3.6/lib2to3/fixes/__init__.py�<module>sPK�E[��ȽHH/__pycache__/fix_xreadlines.cpython-36.opt-1.pycnu�[���3


 \��@s2dZddlmZddlmZGdd�dej�ZdS)zpFix "for x in f.xreadlines()" -> "for x in f".

This fixer will also convert g(f.xreadlines) into g(f.__iter__).�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixXreadlinesTz�
    power< call=any+ trailer< '.' 'xreadlines' > trailer< '(' ')' > >
    |
    power< any+ trailer< '.' no_call='xreadlines' > >
    cCs@|jd�}|r$|jtd|jd��n|jdd�|dD��dS)N�no_call�__iter__)�prefixcSsg|]}|j��qS�)Zclone)�.0�xrr�4/usr/lib64/python3.6/lib2to3/fixes/fix_xreadlines.py�
<listcomp>sz+FixXreadlines.transform.<locals>.<listcomp>Zcall)�get�replacerr)�selfZnodeZresultsrrrr�	transforms
zFixXreadlines.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK�E[9��xx-__pycache__/fix_execfile.cpython-36.opt-1.pycnu�[���3


 \�@sVdZddlmZddlmZmZmZmZmZm	Z	m
Z
mZmZm
Z
Gdd�dej�ZdS)zoFixer for execfile.

This converts usages of the execfile function into calls to the built-in
exec() function.
�)�
fixer_base)
�Comma�Name�Call�LParen�RParen�Dot�Node�ArgList�String�symsc@seZdZdZdZdd�ZdS)�FixExecfileTz�
    power< 'execfile' trailer< '(' arglist< filename=any [',' globals=any [',' locals=any ] ] > ')' > >
    |
    power< 'execfile' trailer< '(' filename=any ')' > >
    cCs&|d}|jd�}|jd�}|jdjdj�}t|j�t�tdd�g|d�}ttjt	d�|g�}ttj
t�t	d	�g�ttj
t�t
�g�g}	|g|	}
|j�}d|_td
d�}|
t�|t�|g}
tt	d�|
d�}|g}|dk	r�|jt�|j�g�|dk	�r|jt�|j�g�tt	d
�||jd�S)N�filename�globals�locals�z"rb"� )Zrparen�open�readz'exec'�compile��exec)�prefix���r)�getZchildrenZcloner
rrr	rZpowerrZtrailerrrrrr�extend)�selfZnodeZresultsrrrZexecfile_parenZ	open_argsZ	open_callrZ	open_exprZfilename_argZexec_strZcompile_argsZcompile_call�args�r�2/usr/lib64/python3.6/lib2to3/fixes/fix_execfile.py�	transforms*




zFixExecfile.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr rrrrr
sr
N)�__doc__rrZ
fixer_utilrrrrrrr	r
rrZBaseFixr
rrrr�<module>s0PK�E[7�N���/__pycache__/fix_xreadlines.cpython-36.opt-2.pycnu�[���3


 \��@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixXreadlinesTz�
    power< call=any+ trailer< '.' 'xreadlines' > trailer< '(' ')' > >
    |
    power< any+ trailer< '.' no_call='xreadlines' > >
    cCs@|jd�}|r$|jtd|jd��n|jdd�|dD��dS)N�no_call�__iter__)�prefixcSsg|]}|j��qS�)Zclone)�.0�xrr�4/usr/lib64/python3.6/lib2to3/fixes/fix_xreadlines.py�
<listcomp>sz+FixXreadlines.transform.<locals>.<listcomp>Zcall)�get�replacerr)�selfZnodeZresultsrrrr�	transforms
zFixXreadlines.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrrsrN)�rZ
fixer_utilrZBaseFixrrrrr�<module>sPK�E[R2P9��+__pycache__/fix_future.cpython-36.opt-2.pycnu�[���3


 \#�@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�	BlankLinec@s eZdZdZdZdZdd�ZdS)�	FixFutureTz;import_from< 'from' module_name="__future__" 'import' any >�
cCst�}|j|_|S)N)r�prefix)�selfZnodeZresults�new�r	�0/usr/lib64/python3.6/lib2to3/fixes/fix_future.py�	transformszFixFuture.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNZ	run_orderrr	r	r	r
rsrN)�rZ
fixer_utilrZBaseFixrr	r	r	r
�<module>sPK�E[�����)__pycache__/fix_basestring.cpython-36.pycnu�[���3


 \@�@s2dZddlmZddlmZGdd�dej�ZdS)zFixer for basestring -> str.�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�
FixBasestringTz'basestring'cCstd|jd�S)N�str)�prefix)rr)�selfZnodeZresults�r�4/usr/lib64/python3.6/lib2to3/fixes/fix_basestring.py�	transform
szFixBasestring.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr
rrrr	rsrN)�__doc__�rZ
fixer_utilrZBaseFixrrrrr	�<module>sPK�E[��!i��+__pycache__/fix_idioms.cpython-36.opt-2.pycnu�[���3


 \�@sJddlmZddlmZmZmZmZmZmZdZ	dZ
Gdd�dej�ZdS)�)�
fixer_base)�Call�Comma�Name�Node�	BlankLine�symsz0(n='!=' | '==' | 'is' | n=comp_op< 'is' 'not' >)z(power< 'type' trailer< '(' x=any ')' > >csPeZdZdZdeeeefZ�fdd�Zdd�Zdd�Z	d	d
�Z
dd�Z�ZS)
�	FixIdiomsTa�
        isinstance=comparison< %s %s T=any >
        |
        isinstance=comparison< T=any %s %s >
        |
        while_stmt< 'while' while='1' ':' any+ >
        |
        sorted=any<
            any*
            simple_stmt<
              expr_stmt< id1=any '='
                         power< list='list' trailer< '(' (not arglist<any+>) any ')' > >
              >
              '\n'
            >
            sort=
            simple_stmt<
              power< id2=any
                     trailer< '.' 'sort' > trailer< '(' ')' >
              >
              '\n'
            >
            next=any*
        >
        |
        sorted=any<
            any*
            simple_stmt< expr_stmt< id1=any '=' expr=any > '\n' >
            sort=
            simple_stmt<
              power< id2=any
                     trailer< '.' 'sort' > trailer< '(' ')' >
              >
              '\n'
            >
            next=any*
        >
    cs8tt|�j|�}|r4d|kr4|d|dkr0|SdS|S)N�sortedZid1Zid2)�superr	�match)�self�node�r)�	__class__��0/usr/lib64/python3.6/lib2to3/fixes/fix_idioms.pyrOszFixIdioms.matchcCsHd|kr|j||�Sd|kr(|j||�Sd|kr<|j||�Std��dS)N�
isinstance�whiler
z
Invalid match)�transform_isinstance�transform_while�transform_sort�RuntimeError)r
r�resultsrrr�	transformZszFixIdioms.transformcCsh|dj�}|dj�}d|_d|_ttd�|t�|g�}d|kr\d|_ttjtd�|g�}|j|_|S)N�x�T�� r�n�not)�clone�prefixrrrrrZnot_test)r
rrrrZtestrrrrdszFixIdioms.transform_isinstancecCs |d}|jtd|jd��dS)Nr�True)r")�replacerr")r
rrZonerrrrpszFixIdioms.transform_whilecCs�|d}|d}|jd�}|jd�}|r>|jtd|jd��n8|rn|j�}d|_|jttd�|g|jd��ntd��|j�|j}d	|kr�|r�|jd	�d
|d
jf}	d	j	|	�|d
_n"t
�}
|jj|
�|jd	�d
|
_dS)N�sort�next�list�exprr
)r"rzshould not have reached here�
�)
�getr$rr"r!rr�remove�
rpartition�joinr�parentZappend_child)r
rrZ	sort_stmtZ	next_stmtZ	list_callZsimple_expr�newZbtwnZprefix_linesZend_linerrrrts*

zFixIdioms.transform_sort)
�__name__�
__module__�__qualname__Zexplicit�TYPE�CMPZPATTERNrrrrr�
__classcell__rr)rrr	%s'
r	N)
rrZ
fixer_utilrrrrrrr5r4ZBaseFixr	rrrr�<module>s PK�E[�oH+QQ&__pycache__/fix_has_key.cpython-36.pycnu�[���3


 \|�@sBdZddlmZddlmZddlmZmZGdd�dej�ZdS)a&Fixer for has_key().

Calls to .has_key() methods are expressed in terms of the 'in'
operator:

    d.has_key(k) -> k in d

CAVEATS:
1) While the primary target of this fixer is dict.has_key(), the
   fixer will change any has_key() method call, regardless of its
   class.

2) Cases like this will not be converted:

    m = d.has_key
    if m(k):
        ...

   Only *calls* to has_key() are converted. While it is possible to
   convert the above to something like

    m = d.__contains__
    if m(k):
        ...

   this is currently not done.
�)�pytree)�
fixer_base)�Name�parenthesizec@seZdZdZdZdd�ZdS)�	FixHasKeyTa�
    anchor=power<
        before=any+
        trailer< '.' 'has_key' >
        trailer<
            '('
            ( not(arglist | argument<any '=' any>) arg=any
            | arglist<(not argument<any '=' any>) arg=any ','>
            )
            ')'
        >
        after=any*
    >
    |
    negation=not_test<
        'not'
        anchor=power<
            before=any+
            trailer< '.' 'has_key' >
            trailer<
                '('
                ( not(arglist | argument<any '=' any>) arg=any
                | arglist<(not argument<any '=' any>) arg=any ','>
                )
                ')'
            >
        >
    >
    c

Cs�|st�|j}|jj|jkr.|jj|j�r.dS|jd�}|d}|j}dd�|dD�}|dj	�}|jd�}	|	r�dd�|	D�}	|j|j
|j|j|j|j
|j|jfkr�t|�}t|�d	kr�|d
}ntj|j|�}d|_tddd
�}
|�rtddd
�}tj|j||
f�}
tj|j
||
|f�}|	�rBt|�}tj|j|ft|	��}|jj|j
|j|j|j|j|j|j|j|jf	k�r|t|�}||_|S)N�negation�anchorcSsg|]}|j��qS�)�clone)�.0�nr	r	�1/usr/lib64/python3.6/lib2to3/fixes/fix_has_key.py�
<listcomp>Rsz'FixHasKey.transform.<locals>.<listcomp>�before�arg�aftercSsg|]}|j��qSr	)r
)rrr	r	r
rVs��� �in)�prefix�not)�AssertionError�syms�parent�typeZnot_test�pattern�match�getrr
Z
comparisonZand_testZor_testZtestZlambdefZargumentr�lenrZNodeZpowerrZcomp_op�tuple�exprZxor_exprZand_exprZ
shift_exprZ
arith_exprZtermZfactor)
�selfZnodeZresultsrrrrrrrZn_opZn_not�newr	r	r
�	transformGsF


zFixHasKey.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr$r	r	r	r
r&srN)	�__doc__�rrZ
fixer_utilrrZBaseFixrr	r	r	r
�<module>sPK�E[��.__pycache__/fix_raw_input.cpython-36.opt-1.pycnu�[���3


 \��@s2dZddlmZddlmZGdd�dej�ZdS)z2Fixer that changes raw_input(...) into input(...).�)�
fixer_base)�Namec@seZdZdZdZdd�ZdS)�FixRawInputTzU
              power< name='raw_input' trailer< '(' [any] ')' > any* >
              cCs |d}|jtd|jd��dS)N�name�input)�prefix)�replacerr)�selfZnodeZresultsr�r
�3/usr/lib64/python3.6/lib2to3/fixes/fix_raw_input.py�	transformszFixRawInput.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrr
r
r
rrsrN)�__doc__�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK�E[~aNN-__pycache__/fix_ws_comma.cpython-36.opt-1.pycnu�[���3


 \B�@s>dZddlmZddlmZddlmZGdd�dej�ZdS)z�Fixer that changes 'a ,b' into 'a, b'.

This also changes '{a :b}' into '{a: b}', but does not touch other
uses of colons.  It does not touch other uses of whitespace.

�)�pytree)�token)�
fixer_basec@s@eZdZdZdZejejd�Zejej	d�Z	ee	fZ
dd�ZdS)�
FixWsCommaTzH
    any<(not(',') any)+ ',' ((not(',') any)+ ',')* [not(',') any]>
    �,�:cCsd|j�}d}xR|jD]H}||jkrD|j}|j�r>d|kr>d|_d}q|rX|j}|sXd|_d}qW|S)NF�
�T� )ZcloneZchildren�SEPS�prefix�isspace)�selfZnodeZresults�newZcommaZchildr�r�2/usr/lib64/python3.6/lib2to3/fixes/fix_ws_comma.py�	transforms
zFixWsComma.transformN)�__name__�
__module__�__qualname__ZexplicitZPATTERNrZLeafr�COMMA�COLONrrrrrrrsrN)�__doc__r	rZpgen2rrZBaseFixrrrrr�<module>sPK�E[�9�1��+__pycache__/fix_buffer.cpython-36.opt-2.pycnu�[���3


 \N�@s.ddlmZddlmZGdd�dej�ZdS)�)�
fixer_base)�Namec@s eZdZdZdZdZdd�ZdS)�	FixBufferTzR
              power< name='buffer' trailer< '(' [any] ')' > any* >
              cCs |d}|jtd|jd��dS)N�name�
memoryview)�prefix)�replacerr)�selfZnodeZresultsr�r
�0/usr/lib64/python3.6/lib2to3/fixes/fix_buffer.py�	transformszFixBuffer.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZexplicitZPATTERNrr
r
r
rrsrN)�rZ
fixer_utilrZBaseFixrr
r
r
r�<module>sPK�E[6�H�770__pycache__/fix_set_literal.cpython-36.opt-2.pycnu�[���3


 \��@s6ddlmZmZddlmZmZGdd�dej�ZdS)�)�
fixer_base�pytree)�token�symsc@s eZdZdZdZdZdd�ZdS)�
FixSetLiteralTajpower< 'set' trailer< '('
                     (atom=atom< '[' (items=listmaker< any ((',' any)* [',']) >
                                |
                                single=any) ']' >
                     |
                     atom< '(' items=testlist_gexp< any ((',' any)* [',']) > ')' >
                     )
                     ')' > >
              c	Cs�|jd�}|r2tjtj|j�g�}|j|�|}n|d}tjtj	d�g}|j
dd�|jD��|jtjtj
d��|jj|d
_tjtj|�}|j|_t|j�dkr�|jd	}|j�|j|jd_|S)N�single�items�{css|]}|j�VqdS)N)�clone)�.0�n�r
�5/usr/lib64/python3.6/lib2to3/fixes/fix_set_literal.py�	<genexpr>'sz*FixSetLiteral.transform.<locals>.<genexpr>�}������r)�getrZNoderZ	listmakerr
�replaceZLeafr�LBRACE�extendZchildren�append�RBRACEZnext_sibling�prefixZdictsetmaker�len�remove)	�selfZnodeZresultsrZfaker�literalZmakerrr
r
r�	transforms"


zFixSetLiteral.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZexplicitZPATTERNr r
r
r
rrs
rN)Zlib2to3rrZlib2to3.fixer_utilrrZBaseFixrr
r
r
r�<module>sPK�E[������1__pycache__/fix_tuple_params.cpython-36.opt-2.pycnu�[���3


 \��@s�ddlmZddlmZddlmZddlmZmZmZm	Z	m
Z
mZdd�ZGdd�dej
�Zd	d
�Zdd�Zgd
fdd�Zdd�Zd
S)�)�pytree)�token)�
fixer_base)�Assign�Name�Newline�Number�	Subscript�symscCst|tj�o|jdjtjkS)N�)�
isinstancer�Node�children�typer�STRING)�stmt�r�6/usr/lib64/python3.6/lib2to3/fixes/fix_tuple_params.py�is_docstringsrc@s(eZdZdZdZdZdd�Zdd�ZdS)	�FixTupleParams�Ta
              funcdef< 'def' any parameters< '(' args=any ')' >
                       ['->' any] ':' suite=any+ >
              |
              lambda=
              lambdef< 'lambda' args=vfpdef< '(' inner=any ')' >
                       ':' body=any
              >
              cs�d|kr�j||�Sg�|d}|d}|djdjtjkrZd}|djdj}t��nd}d}tjtjd��d���fd
d�	}|jt	j
kr�||�n@|jt	jkr�x2t|j�D]$\}}	|	jt	j
kr�||	|dkd�q�W�s�dSx�D]}
|d|
_
q�W|}|dk�rd
�d_n&t|dj|��r8|�d_|d}x�D]}
|d|
_
�q>W�|dj||�<x4t|d|t��d�D]}||dj|_�q�W|dj�dS)N�lambda�suite�argsr�rz; �Fcs\t�j��}|j�}d|_t||j��}|r2d|_|j|��jtjt	j
|�j�g��dS)Nr� )r�new_name�clone�prefixr�replace�appendrr
r
Zsimple_stmt)Z	tuple_arg�
add_prefix�n�argr)�end�	new_lines�selfrr�handle_tupleCs
z.FixTupleParams.transform.<locals>.handle_tuple)r"r)F)�transform_lambdarrr�INDENT�valuerrZLeafr
ZtfpdefZ
typedargslist�	enumerate�parentrr�range�lenZchanged)r'�node�resultsrr�start�indentr(�ir$�line�afterr)r%r&r'r�	transform.sF




 zFixTupleParams.transformc
Cs�|d}|d}t|d�}|jtjkrD|j�}d|_|j|�dSt|�}t|�}|j	t
|��}t|dd�}	|j|	j��xd|j�D]X}
|
jtjkr�|
j
|kr�dd�||
j
D�}tjtj|	j�g|�}|
j|_|
j|�q�WdS)Nr�body�innerr)rcSsg|]}|j��qSr)r)�.0�crrr�
<listcomp>�sz3FixTupleParams.transform_lambda.<locals>.<listcomp>)�
simplify_argsrr�NAMErrr �find_params�map_to_indexr�
tuple_namerZ
post_orderr+rr
r
Zpower)
r'r0r1rr8r9ZparamsZto_indexZtup_nameZ	new_paramr#Z
subscripts�newrrrr)ns(
zFixTupleParams.transform_lambdaN)�__name__�
__module__�__qualname__Z	run_orderZ
BM_compatibleZPATTERNr7r)rrrrrs

@rcCsR|jtjtjfkr|S|jtjkrBx|jtjkr<|jd}q$W|Std|��dS)NrzReceived unexpected node %s)rr
Zvfplistrr>�vfpdefr�RuntimeError)r0rrrr=�sr=cCs<|jtjkrt|jd�S|jtjkr,|jSdd�|jD�S)NrcSs g|]}|jtjkrt|��qSr)rr�COMMAr?)r:r;rrrr<�szfind_params.<locals>.<listcomp>)rr
rFr?rrr>r+)r0rrrr?�s
r?NcCs^|dkri}xLt|�D]@\}}ttt|���g}t|t�rJt|||d�q||||<qW|S)N)�d)r,r	r�strr�listr@)�
param_listrrIr4�objZtrailerrrrr@�s
r@cCs@g}x0|D](}t|t�r(|jt|��q
|j|�q
Wdj|�S)N�_)rrKr!rA�join)rL�lrMrrrrA�s

rA)rrZpgen2rrZ
fixer_utilrrrrr	r
rZBaseFixrr=r?r@rArrrr�<module>s lPK�E[�Bp		)__pycache__/fix_dict.cpython-36.opt-2.pycnu�[���3


 \��@sfddlmZddlmZddlmZddlmZmZmZddlmZejdhBZ	Gdd�dej
�Zd	S)
�)�pytree)�patcomp)�
fixer_base)�Name�Call�Dot)�
fixer_util�iterc@s@eZdZdZdZdd�ZdZeje�Z	dZ
eje
�Zdd�Zd	S)
�FixDictTa
    power< head=any+
         trailer< '.' method=('keys'|'items'|'values'|
                              'iterkeys'|'iteritems'|'itervalues'|
                              'viewkeys'|'viewitems'|'viewvalues') >
         parens=trailer< '(' ')' >
         tail=any*
    >
    c
Cs|d}|dd}|d}|j}|j}|jd�}|jd�}	|sD|	rP|dd�}dd	�|D�}d
d	�|D�}|o||j||�}
|tj|jt�t||j	d�g�|dj
�g}tj|j|�}|
p�|	s�d
|_	tt|r�dnd�|g�}|r�tj|j|g|�}|j	|_	|S)N�head�method��tailr	Zview�cSsg|]}|j��qS�)�clone)�.0�nrr�./usr/lib64/python3.6/lib2to3/fixes/fix_dict.py�
<listcomp>Asz%FixDict.transform.<locals>.<listcomp>cSsg|]}|j��qSr)r)rrrrrrBs)�prefixZparens��list)
�syms�value�
startswith�in_special_contextrZNodeZtrailerrrrrZpowerr)
�self�node�resultsrrrrZmethod_name�isiterZisviewZspecial�args�newrrr�	transform6s2


zFixDict.transformz3power< func=NAME trailer< '(' node=any ')' > any* >zmfor_stmt< 'for' any 'in' node=any ':' any* >
            | comp_for< 'for' any 'in' node=any any* >
         cCs�|jdkrdSi}|jjdk	r^|jj|jj|�r^|d|kr^|rN|djtkS|djtjkS|sfdS|jj|j|�o�|d|kS)NFr�func)�parent�p1�matchr�iter_exemptr�consuming_calls�p2)rrr rrrrrZs
zFixDict.in_special_contextN)
�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr#ZP1rZcompile_patternr&ZP2r*rrrrrr
)s


r
N)rrrrrrrrr)r(ZBaseFixr
rrrr�<module>sPK�E[��*__pycache__/fix_throw.cpython-36.opt-2.pycnu�[���3


 \.�@sVddlmZddlmZddlmZddlmZmZmZm	Z	m
Z
Gdd�dej�ZdS)�)�pytree)�token)�
fixer_base)�Name�Call�ArgList�Attr�is_tuplec@seZdZdZdZdd�ZdS)�FixThrowTz�
    power< any trailer< '.' 'throw' >
           trailer< '(' args=arglist< exc=any ',' val=any [',' tb=any] > ')' >
    >
    |
    power< any trailer< '.' 'throw' > trailer< '(' exc=any ')' > >
    cCs�|j}|dj�}|jtjkr.|j|d�dS|jd�}|dkrDdS|j�}t|�rndd�|jdd�D�}nd|_	|g}|d}d	|kr�|d	j�}d|_	t
||�}	t|	td
��t
|g�g}
|jtj|j|
��n|jt
||��dS)N�excz+Python 3 does not support string exceptions�valcSsg|]}|j��qS�)�clone)�.0�cr
r
�//usr/lib64/python3.6/lib2to3/fixes/fix_throw.py�
<listcomp>)sz&FixThrow.transform.<locals>.<listcomp>���args�tb�with_traceback���)�symsr�typer�STRINGZcannot_convert�getr	Zchildren�prefixrrrr�replacerZNodeZpower)�selfZnodeZresultsrrrrZ
throw_argsr�eZwith_tbr
r
r�	transforms*

zFixThrow.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNr!r
r
r
rr
sr
N)
rrZpgen2rrZ
fixer_utilrrrrr	ZBaseFixr
r
r
r
r�<module>sPK�E[�
��UU+__pycache__/fix_reduce.cpython-36.opt-1.pycnu�[���3


 \E�@s2dZddlmZddlmZGdd�dej�ZdS)zqFixer for reduce().

Makes sure reduce() is imported from the functools module if reduce is
used in that module.
�)�
fixer_base)�touch_importc@s eZdZdZdZdZdd�ZdS)�	FixReduceTZpreai
    power< 'reduce'
        trailer< '('
            arglist< (
                (not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any) |
                (not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any ','
                 not(argument<any '=' any>) any)
            ) >
        ')' >
    >
    cCstdd|�dS)N�	functools�reduce)r)�selfZnodeZresults�r�0/usr/lib64/python3.6/lib2to3/fixes/fix_reduce.py�	transform"szFixReduce.transformN)�__name__�
__module__�__qualname__Z
BM_compatible�orderZPATTERNr
rrrr	rsrN)�__doc__Zlib2to3rZlib2to3.fixer_utilrZBaseFixrrrrr	�<module>sPK�E[�/Za��)__pycache__/fix_repr.cpython-36.opt-2.pycnu�[���3


 \e�@s6ddlmZddlmZmZmZGdd�dej�ZdS)�)�
fixer_base)�Call�Name�parenthesizec@seZdZdZdZdd�ZdS)�FixReprTz7
              atom < '`' expr=any '`' >
              cCs8|dj�}|j|jjkr"t|�}ttd�|g|jd�S)N�expr�repr)�prefix)Zclone�typeZsymsZ	testlist1rrrr	)�selfZnodeZresultsr�r�./usr/lib64/python3.6/lib2to3/fixes/fix_repr.py�	transformszFixRepr.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrr
rsrN)�rZ
fixer_utilrrrZBaseFixrrrrr
�<module>sPK�E[�9z��$__pycache__/fix_input.cpython-36.pycnu�[���3


 \��@sLdZddlmZddlmZmZddlmZejd�ZGdd�dej	�Z
dS)	z4Fixer that changes input(...) into eval(input(...)).�)�
fixer_base)�Call�Name)�patcompz&power< 'eval' trailer< '(' any ')' > >c@seZdZdZdZdd�ZdS)�FixInputTzL
              power< 'input' args=trailer< '(' [any] ')' > >
              cCs6tj|jj�rdS|j�}d|_ttd�|g|jd�S)N��eval)�prefix)�context�match�parentZcloner	rr)�selfZnodeZresults�new�r�//usr/lib64/python3.6/lib2to3/fixes/fix_input.py�	transforms
zFixInput.transformN)�__name__�
__module__�__qualname__Z
BM_compatibleZPATTERNrrrrrr
srN)�__doc__rrZ
fixer_utilrrrZcompile_patternr
ZBaseFixrrrrr�<module>s

PK':�Z)��EE
fix_reduce.pynu�[���PK':�ZZ6���fix_print.pynu�[���PK':�Z�=����fix_asserts.pynu�[���PK':�Z2�ۭ��fix_renames.pynu�[���PK':�Z�E[//�__init__.pynu�[���PK':�Z5Y��
�

Efix_filter.pynu�[���PK':�Z�)xx
O'fix_intern.pynu�[���PK':�Zp2�I


,fix_except.pynu�[���PK':�Zl�HQ9fix_numliterals.pynu�[���PK':�Z��|�b
b
�<fix_operator.pynu�[���PK':�Z%TW688
4Jfix_map.pynu�[���PK':�Z=��nn�Xfix_raise.pynu�[���PK':�Z�|�44Pdfix_imports.pynu�[���PK':�Z6u����zfix_raw_input.pynu�[���PK':�Z�x�u..�|fix_throw.pynu�[���PK':�Z�M��@@2�fix_basestring.pynu�[���PK':�ZC���
�

��fix_xrange.pynu�[���PK':�Z��S���v�fix_types.pynu�[���PK':�Z_� \
��fix_idioms.pynu�[���PK':�ZD�Iu||�fix_has_key.pynu�[���PK':�Z�+nbcc%��__pycache__/fix_reduce.cpython-38.pycnu�[���PK':�Z;�3���0[�__pycache__/fix_set_literal.cpython-38.opt-1.pycnu�[���PK':�Zn�^3(I�__pycache__/fix_map.cpython-38.opt-1.pycnu�[���PK':�Z۷a���/��__pycache__/fix_isinstance.cpython-38.opt-2.pycnu�[���PK':�Z�@�*��__pycache__/fix_apply.cpython-38.opt-2.pycnu�[���PK':�Z�\�"��)O�__pycache__/fix_exec.cpython-38.opt-2.pycnu�[���PK':�ZA���~~,`�__pycache__/fix_sys_exc.cpython-38.opt-1.pycnu�[���PK':�Z���##+:�__pycache__/fix_buffer.cpython-38.opt-1.pycnu�[���PK':�Zؠ�˥�*��__pycache__/fix_methodattrs.cpython-38.pycnu�[���PK':�Zz8{x,��__pycache__/fix_getcwdu.cpython-38.opt-1.pycnu�[���PK':�Z�	��?	?	)"�__pycache__/fix_dict.cpython-38.opt-2.pycnu�[���PK':�Z辻�YY0��__pycache__/fix_methodattrs.cpython-38.opt-2.pycnu�[���PK':�Z��-r,s�__pycache__/fix_unicode.cpython-38.opt-1.pycnu�[���PK':�Z��&[��,�__pycache__/fix_imports.cpython-38.opt-2.pycnu�[���PK':�Z���))+__pycache__/fix_intern.cpython-38.opt-2.pycnu�[���PK':�Z�J�qq*�__pycache__/fix_apply.cpython-38.opt-1.pycnu�[���PK':�Z���##%h__pycache__/fix_buffer.cpython-38.pycnu�[���PK':�ZS�ӏ��,�"__pycache__/fix_asserts.cpython-38.opt-2.pycnu�[���PK':�Z݉p��$�'__pycache__/fix_raise.cpython-38.pycnu�[���PK':�Z�ٵ�.1__pycache__/fix_metaclass.cpython-38.opt-1.pycnu�[���PK':�Z~��uu%F__pycache__/fix_reload.cpython-38.pycnu�[���PK':�Ze�~�.�J__pycache__/fix_raw_input.cpython-38.opt-1.pycnu�[���PK':�Z0jZZ-]N__pycache__/fix_ws_comma.cpython-38.opt-1.pycnu�[���PK':�Z��*��*S__pycache__/fix_paren.cpython-38.opt-2.pycnu�[���PK':�Ze�a�//+QX__pycache__/fix_reload.cpython-38.opt-2.pycnu�[���PK':�ZU$+���/�\__pycache__/fix_xreadlines.cpython-38.opt-2.pycnu�[���PK':�Z^Κ���-a__pycache__/fix_imports2.cpython-38.opt-2.pycnu�[���PK':�ZHILL%,c__pycache__/fix_idioms.cpython-38.pycnu�[���PK':�Z���'�r__pycache__/fix_exitfunc.cpython-38.pycnu�[���PK':�ZT����1!|__pycache__/fix_tuple_params.cpython-38.opt-1.pycnu�[���PK':�Z��9��)l�__pycache__/fix_next.cpython-38.opt-2.pycnu�[���PK':�Z���jj+p�__pycache__/fix_urllib.cpython-38.opt-1.pycnu�[���PK':�Z����(5�__pycache__/fix_zip.cpython-38.opt-2.pycnu�[���PK':�Z}����)l�__pycache__/fix_basestring.cpython-38.pycnu�[���PK':�Z��T��+W�__pycache__/fix_future.cpython-38.opt-2.pycnu�[���PK':�ZT����+V�__pycache__/fix_tuple_params.cpython-38.pycnu�[���PK':�Zz8{x&��__pycache__/fix_getcwdu.cpython-38.pycnu�[���PK':�Z�.���*�__pycache__/fix_input.cpython-38.opt-1.pycnu�[���PK':�Z��xC��+�__pycache__/fix_filter.cpython-38.opt-2.pycnu�[���PK':�Z��xQ��-!�__pycache__/fix_exitfunc.cpython-38.opt-2.pycnu�[���PK':�Z�}��
�
+3�__pycache__/fix_import.cpython-38.opt-1.pycnu�[���PK':�Z���Ӽ�)l�__pycache__/fix_long.cpython-38.opt-1.pycnu�[���PK':�Zb����&��__pycache__/fix_asserts.cpython-38.pycnu�[���PK':�Z�.���$�__pycache__/fix_input.cpython-38.pycnu�[���PK':�Zy_�$$�__pycache__/fix_throw.cpython-38.pycnu�[���PK':�Z"�Gee/5__pycache__/fix_basestring.cpython-38.opt-2.pycnu�[���PK':�Z�O�ww'�	__pycache__/fix_operator.cpython-38.pycnu�[���PK':�ZW���,�__pycache__/fix_renames.cpython-38.opt-1.pycnu�[���PK':�Z�YT$$*�"__pycache__/fix_throw.cpython-38.opt-2.pycnu�[���PK':�Z���
�
+s)__pycache__/fix_except.cpython-38.opt-1.pycnu�[���PK':�Z^�z5UU,�4__pycache__/fix_unicode.cpython-38.opt-2.pycnu�[���PK':�ZV�����+|:__pycache__/fix_buffer.cpython-38.opt-2.pycnu�[���PK':�Z���,�=__pycache__/fix_nonzero.cpython-38.opt-1.pycnu�[���PK':�Z�O�'

/�A__pycache__/fix_isinstance.cpython-38.opt-1.pycnu�[���PK':�Z�Zm�+H__pycache__/fix_future.cpython-38.opt-1.pycnu�[���PK':�Z�_�1QQ.vK__pycache__/fix_metaclass.cpython-38.opt-2.pycnu�[���PK':�Z&eV�((*%[__pycache__/fix_types.cpython-38.opt-1.pycnu�[���PK':�Zx�*���0�b__pycache__/fix_numliterals.cpython-38.opt-1.pycnu�[���PK(:�ZV�ii+g__pycache__/fix_intern.cpython-38.opt-1.pycnu�[���PK(:�Z�6���)�k__pycache__/__init__.cpython-38.opt-1.pycnu�[���PK(:�Z�X;�

+�l__pycache__/fix_idioms.cpython-38.opt-2.pycnu�[���PK(:�Z�ё��.z__pycache__/fix_funcattrs.cpython-38.opt-1.pycnu�[���PK(:�Z���jj%;~__pycache__/fix_urllib.cpython-38.pycnu�[���PK(:�Zoz�&&,��__pycache__/fix_imports.cpython-38.opt-1.pycnu�[���PK(:�Z�ё��(|�__pycache__/fix_funcattrs.cpython-38.pycnu�[���PK(:�Z?u9sHH#��__pycache__/fix_repr.cpython-38.pycnu�[���PK(:�Z(�q&&!:�__pycache__/fix_ne.cpython-38.pycnu�[���PK(:�Z����NN*��__pycache__/fix_types.cpython-38.opt-2.pycnu�[���PK(:�Zb����,Y�__pycache__/fix_asserts.cpython-38.opt-1.pycnu�[���PK(:�Znb�^^)��__pycache__/fix_exec.cpython-38.opt-1.pycnu�[���PK(:�Z�6���)f�__pycache__/__init__.cpython-38.opt-2.pycnu�[���PK(:�Zo=��#H�__pycache__/fix_next.cpython-38.pycnu�[���PK(:�Z�����1��__pycache__/fix_tuple_params.cpython-38.opt-2.pycnu�[���PK(:�Z���[[,��__pycache__/fix_nonzero.cpython-38.opt-2.pycnu�[���PK(:�Z��CC0U�__pycache__/fix_set_literal.cpython-38.opt-2.pycnu�[���PK(:�Z;�3���*��__pycache__/fix_set_literal.cpython-38.pycnu�[���PK(:�Zoz�&&&��__pycache__/fix_imports.cpython-38.pycnu�[���PK(:�Z��-r&\__pycache__/fix_unicode.cpython-38.pycnu�[���PK(:�Z�{.Nii*�	__pycache__/fix_paren.cpython-38.opt-1.pycnu�[���PK(:�Z�ЊD)}__pycache__/fix_repr.cpython-38.opt-2.pycnu�[���PK(:�Z#T9D��2�__pycache__/fix_standarderror.cpython-38.opt-1.pycnu�[���PK(:�Z���
�
%__pycache__/fix_except.cpython-38.pycnu�[���PK(:�Z�Zm�%]!__pycache__/fix_future.cpython-38.pycnu�[���PK(:�Z6�Ne�	�	+�$__pycache__/fix_filter.cpython-38.opt-1.pycnu�[���PK(:�Z&eV�(($�.__pycache__/fix_types.cpython-38.pycnu�[���PK(:�Zi.�6��'6__pycache__/fix_ne.cpython-38.opt-2.pycnu�[���PK(:�Z��"	"	$k9__pycache__/fix_print.cpython-38.pycnu�[���PK(:�Z�[�	�	+�B__pycache__/fix_import.cpython-38.opt-2.pycnu�[���PK(:�Z���^^/�L__pycache__/fix_xreadlines.cpython-38.opt-1.pycnu�[���PK(:�Zx�*���*�Q__pycache__/fix_numliterals.cpython-38.pycnu�[���PK(:�ZB�$��-�U__pycache__/fix_ws_comma.cpython-38.opt-2.pycnu�[���PK(:�Z#T9D��,�Y__pycache__/fix_standarderror.cpython-38.pycnu�[���PK(:�Z˾�< 	 	,]__pycache__/fix_has_key.cpython-38.opt-2.pycnu�[���PK(:�Z�+nbcc+�f__pycache__/fix_reduce.cpython-38.opt-1.pycnu�[���PK(:�Z��C��0Rk__pycache__/fix_numliterals.cpython-38.opt-2.pycnu�[���PK(:�Z��Ė�&no__pycache__/fix_nonzero.cpython-38.pycnu�[���PK(:�Z6�Ne�	�	%Zs__pycache__/fix_filter.cpython-38.pycnu�[���PK(:�Z�OuC**"6}__pycache__/fix_zip.cpython-38.pycnu�[���PK(:�Z�K�xx#��__pycache__/fix_exec.cpython-38.pycnu�[���PK(:�ZbR�%��-}�__pycache__/fix_execfile.cpython-38.opt-1.pycnu�[���PK(:�Z�}��
�
%\�__pycache__/fix_import.cpython-38.pycnu�[���PK(:�Z0jZZ'��__pycache__/fix_ws_comma.cpython-38.pycnu�[���PK(:�Z 2ny		.@�__pycache__/fix_itertools.cpython-38.opt-1.pycnu�[���PK(:�Z*Gl��6��__pycache__/fix_itertools_imports.cpython-38.opt-2.pycnu�[���PK(:�Z����ZZ,��__pycache__/fix_has_key.cpython-38.opt-1.pycnu�[���PK(:�Z?u9sHH)n�__pycache__/fix_repr.cpython-38.opt-1.pycnu�[���PK(:�Z��ǡ�.�__pycache__/fix_itertools.cpython-38.opt-2.pycnu�[���PK(:�Z(�q&&'�__pycache__/fix_ne.cpython-38.opt-1.pycnu�[���PK(:�Z��vv&��__pycache__/fix_has_key.cpython-38.pycnu�[���PK(:�Z�
����*W�__pycache__/fix_print.cpython-38.opt-1.pycnu�[���PK(:�ZV�ii%��__pycache__/fix_intern.cpython-38.pycnu�[���PK(:�ZCC�2��)B�__pycache__/fix_dict.cpython-38.opt-1.pycnu�[���PK(:�Z�:��*X�__pycache__/fix_print.cpython-38.opt-2.pycnu�[���PK(:�Z=HF���2f�__pycache__/fix_standarderror.cpython-38.opt-2.pycnu�[���PK(:�Z
�5YY*]�__pycache__/fix_raise.cpython-38.opt-2.pycnu�[���PK(:�Z|f?	?	+�__pycache__/fix_except.cpython-38.opt-2.pycnu�[���PK(:�Zn�l��(�__pycache__/fix_map.cpython-38.opt-2.pycnu�[���PK(:�Z�{.Nii$�__pycache__/fix_paren.cpython-38.pycnu�[���PK(:�Z�?M���(�__pycache__/fix_metaclass.cpython-38.pycnu�[���PK(:�Z(���	�	%�)__pycache__/fix_xrange.cpython-38.pycnu�[���PK(:�Z��fh-4__pycache__/fix_imports2.cpython-38.opt-1.pycnu�[���PK(:�Z���-�6__pycache__/fix_exitfunc.cpython-38.opt-1.pycnu�[���PK(:�Zؠ�˥�0�?__pycache__/fix_methodattrs.cpython-38.opt-1.pycnu�[���PK(:�Z~��uu+�C__pycache__/fix_reload.cpython-38.opt-1.pycnu�[���PK(:�Z(���	�	+�H__pycache__/fix_xrange.cpython-38.opt-1.pycnu�[���PK(:�Z#|����)�R__pycache__/fix_next.cpython-38.opt-1.pycnu�[���PK(:�Z��܎||)A___pycache__/fix_long.cpython-38.opt-2.pycnu�[���PK(:�Z�OuC**(b__pycache__/fix_zip.cpython-38.opt-1.pycnu�[���PK(:�Z]m���+�h__pycache__/fix_reduce.cpython-38.opt-2.pycnu�[���PK(:�ZL�\��,�l__pycache__/fix_renames.cpython-38.opt-2.pycnu�[���PK(:�Z���+�t__pycache__/fix_idioms.cpython-38.opt-1.pycnu�[���PK(:�Z�O�'

)
�__pycache__/fix_isinstance.cpython-38.pycnu�[���PK(:�Z�	�'��-p�__pycache__/fix_operator.cpython-38.opt-2.pycnu�[���PK(:�Z�߽0��6`�__pycache__/fix_itertools_imports.cpython-38.opt-1.pycnu�[���PK(:�Z���Ӽ�#ß__pycache__/fix_long.cpython-38.pycnu�[���PK(:�Z
5�<<+Ң__pycache__/fix_urllib.cpython-38.opt-2.pycnu�[���PK(:�Z7)����.i�__pycache__/fix_raw_input.cpython-38.opt-2.pycnu�[���PK(:�Z}����/��__pycache__/fix_basestring.cpython-38.opt-1.pycnu�[���PK(:�ZA���~~&��__pycache__/fix_sys_exc.cpython-38.pycnu�[���PK(:�ZP�����,_�__pycache__/fix_sys_exc.cpython-38.opt-2.pycnu�[���PK(:�Zy_�$*��__pycache__/fix_throw.cpython-38.opt-1.pycnu�[���PK(:�Zn�^3"��__pycache__/fix_map.cpython-38.pycnu�[���PK(:�Z��ҋ�$[�__pycache__/fix_apply.cpython-38.pycnu�[���PK(:�ZW���&:�__pycache__/fix_renames.cpython-38.pycnu�[���PK(:�Z���^^)b�__pycache__/fix_xreadlines.cpython-38.pycnu�[���PK(:�Z�O�ww-�__pycache__/fix_operator.cpython-38.opt-1.pycnu�[���PK(:�Z�'�Z-�__pycache__/fix_execfile.cpython-38.opt-2.pycnu�[���PK(:�Z=�LJ�.L__pycache__/fix_funcattrs.cpython-38.opt-2.pycnu�[���PK(:�Z��fh'1__pycache__/fix_imports2.cpython-38.pycnu�[���PK(:�Ze�~�(�__pycache__/fix_raw_input.cpython-38.pycnu�[���PK(:�Z�$0@ll*__pycache__/fix_input.cpython-38.opt-2.pycnu�[���PK(:�Z�;�%%0�__pycache__/fix_itertools_imports.cpython-38.pycnu�[���PK(:�Z�6���#^__pycache__/__init__.cpython-38.pycnu�[���PK(:�Z
�?��,:__pycache__/fix_getcwdu.cpython-38.opt-2.pycnu�[���PK(:�Z���ٜ�'c __pycache__/fix_execfile.cpython-38.pycnu�[���PK(:�Z���	�	+V'__pycache__/fix_xrange.cpython-38.opt-2.pycnu�[���PK(:�Z��

#M1__pycache__/fix_dict.cpython-38.pycnu�[���PK(:�Z݉p��*�>__pycache__/fix_raise.cpython-38.opt-1.pycnu�[���PK(:�Z 2ny		(�G__pycache__/fix_itertools.cpython-38.pycnu�[���PK(:�Zd�s��%Nfix_dict.pynu�[���PK(:�Z������]fix_paren.pynu�[���PK(:�Zq�|��bfix_input.pynu�[���PK(:�Zr�399
efix_reload.pynu�[���PK(:�ZN2E����ifix_xreadlines.pynu�[���PK(:�ZIkN�fflfix_next.pynu�[���PK(:�Z 2�Ϳ	�	 yfix_exitfunc.pynu�[���PK(:�Z>ӵ;&&�fix_itertools_imports.pynu�[���PK(:�ZJ�b�BB��fix_ws_comma.pynu�[���PK(:�Z��NN

�fix_buffer.pynu�[���PK(:�Z+&^^��fix_methodattrs.pynu�[���PK(:�Z'�� � 
8�fix_urllib.pynu�[���PK(:�Z�7h##
�fix_future.pynu�[���PK(:�Z�޽���v�fix_standarderror.pynu�[���PK(:�Z��M1		
{�fix_zip.pynu�[���PK(:�Zܬ'!!��fix_imports2.pynu�[���PK):�Z�:����fix_exec.pynu�[���PK):�Z誔�*	*	,�fix_apply.pynu�[���PK):�ZO�+����fix_tuple_params.pynu�[���PK):�Z��w  ��fix_metaclass.pynu�[���PK):�Z�f�ϡ��fix_set_literal.pynu�[���PK):�Z���I

�fix_sys_exc.pynu�[���PK):�Za�.�eefix_repr.pynu�[���PK):�Z�&����fix_unicode.pynu�[���PK):�ZGg���fix_itertools.pynu�[���PK):�Z�?k��fix_getcwdu.pynu�[���PK):�Z�{Wk fix_execfile.pynu�[���PK):�Zi�G���S(fix_long.pynu�[���PK):�ZH��gHHj*fix_isinstance.pynu�[���PK):�Z�<��;;	�0fix_ne.pynu�[���PK):�Z?���OOg3fix_nonzero.pynu�[���PK):�ZF�����5fix_funcattrs.pynu�[���PK):�Z6ng��
�8fix_import.pynu�[���PK�E[5ڍ_(�E__pycache__/fix_map.cpython-36.opt-1.pycnu�[���PK�E[�#���*R__pycache__/fix_numliterals.cpython-36.pycnu�[���PK�E[K�t�!!+OV__pycache__/fix_urllib.cpython-36.opt-2.pycnu�[���PK�E[Cy�F��*�k__pycache__/fix_paren.cpython-36.opt-2.pycnu�[���PK�E[�rD���0�p__pycache__/fix_methodattrs.cpython-36.opt-1.pycnu�[���PK�E[�N���#�t__pycache__/fix_dict.cpython-36.pycnu�[���PK�E[k�-O�
�
%,�__pycache__/fix_except.cpython-36.pycnu�[���PK�E[�^\���.n�__pycache__/fix_raw_input.cpython-36.opt-2.pycnu�[���PK�E[>���%��__pycache__/fix_future.cpython-36.pycnu�[���PK�E[�^��(ߓ__pycache__/fix_metaclass.cpython-36.pycnu�[���PK�E[C�pb��$"�__pycache__/fix_raise.cpython-36.pycnu�[���PK�E[�A	�uu+*�__pycache__/fix_reload.cpython-36.opt-1.pycnu�[���PK�E[�j���&��__pycache__/fix_unicode.cpython-36.pycnu�[���PK�E[:\��NN)B�__pycache__/fix_exec.cpython-36.opt-1.pycnu�[���PK�E[���YY$�__pycache__/fix_paren.cpython-36.pycnu�[���PK�E[E�3��'��__pycache__/fix_execfile.cpython-36.pycnu�[���PK�E[��Ȍ�
�
+��__pycache__/fix_import.cpython-36.opt-1.pycnu�[���PK�E[��G$	$	+��__pycache__/fix_filter.cpython-36.opt-1.pycnu�[���PK�E[�폏��),�__pycache__/__init__.cpython-36.opt-2.pycnu�[���PK�E[؈��]].�__pycache__/fix_metaclass.cpython-36.opt-2.pycnu�[���PK�E[��.]		$��__pycache__/fix_print.cpython-36.pycnu�[���PK�E[��C�	�	+�__pycache__/fix_xrange.cpython-36.opt-2.pycnu�[���PK�E[I��4��-
__pycache__/fix_exitfunc.cpython-36.opt-1.pycnu�[���PK�E[��
�OO+J__pycache__/fix_urllib.cpython-36.opt-1.pycnu�[���PK�E[�?�dd,�'__pycache__/fix_renames.cpython-36.opt-2.pycnu�[���PK�E[��ȽHH)�/__pycache__/fix_xreadlines.cpython-36.pycnu�[���PK�E[T�|���1U4__pycache__/fix_tuple_params.cpython-36.opt-1.pycnu�[���PK�E[o>���+�F__pycache__/fix_idioms.cpython-36.opt-1.pycnu�[���PK�E[T�|���+�U__pycache__/fix_tuple_params.cpython-36.pycnu�[���PK�E[Z�ļ*h__pycache__/fix_apply.cpython-36.opt-2.pycnu�[���PK�E[N���dd,{n__pycache__/fix_sys_exc.cpython-36.opt-1.pycnu�[���PK�E[��نuu+;t__pycache__/fix_intern.cpython-36.opt-1.pycnu�[���PK�E[�rD���*y__pycache__/fix_methodattrs.cpython-36.pycnu�[���PK�E[g2����.�|__pycache__/fix_itertools.cpython-36.opt-2.pycnu�[���PK�E[�K��(�__pycache__/fix_itertools.cpython-36.pycnu�[���PK�E[���%@�__pycache__/fix_buffer.cpython-36.pycnu�[���PK�E[hRN���)��__pycache__/fix_exec.cpython-36.opt-2.pycnu�[���PK�E[�A	�uu%��__pycache__/fix_reload.cpython-36.pycnu�[���PK�E[�w�(s�__pycache__/fix_zip.cpython-36.opt-1.pycnu�[���PK�E[��نuu%�__pycache__/fix_intern.cpython-36.pycnu�[���PK�E[�����,��__pycache__/fix_has_key.cpython-36.opt-2.pycnu�[���PK�E['q����/�__pycache__/fix_isinstance.cpython-36.opt-2.pycnu�[���PK�E[aI䖪�-&�__pycache__/fix_imports2.cpython-36.opt-2.pycnu�[���PK�E[U���--�__pycache__/fix_exitfunc.cpython-36.opt-2.pycnu�[���PK�E[��l�55,%�__pycache__/fix_has_key.cpython-36.opt-1.pycnu�[���PK�E[�:�~��(��__pycache__/fix_zip.cpython-36.opt-2.pycnu�[���PK�E[���YY*��__pycache__/fix_paren.cpython-36.opt-1.pycnu�[���PK�E[��.]55+��__pycache__/fix_intern.cpython-36.opt-2.pycnu�[���PK�E[�>�fhh#�__pycache__/fix_exec.cpython-36.pycnu�[���PK�E[&�"��6��__pycache__/fix_itertools_imports.cpython-36.opt-2.pycnu�[���PK�E[��G$	$	%��__pycache__/fix_filter.cpython-36.pycnu�[���PK�E[�"*��#v�__pycache__/fix_long.cpython-36.pycnu�[���PK�E[�̻���$u�__pycache__/fix_apply.cpython-36.pycnu�[���PK�E[�#���0V�__pycache__/fix_numliterals.cpython-36.opt-1.pycnu�[���PK�E[�y��#��__pycache__/fix_next.cpython-36.pycnu�[���PK�E[*wGV��*�__pycache__/fix_print.cpython-36.opt-2.pycnu�[���PK�E[6#3�ll)�
__pycache__/fix_long.cpython-36.opt-2.pycnu�[���PK�E[D�.?440�
__pycache__/fix_itertools_imports.cpython-36.pycnu�[���PK�E[a�)"__pycache__/fix_isinstance.cpython-36.pycnu�[���PK�E[���a��-~__pycache__/fix_ws_comma.cpython-36.opt-2.pycnu�[���PK�E[8ڒ�!o__pycache__/fix_ne.cpython-36.pycnu�[���PK�E[��k/$�!__pycache__/fix_types.cpython-36.pycnu�[���PK�E[��{4��&6)__pycache__/fix_nonzero.cpython-36.pycnu�[���PK�E[t�u55+-__pycache__/fix_reload.cpython-36.opt-2.pycnu�[���PK�E[^�D:6�1__pycache__/fix_itertools_imports.cpython-36.opt-1.pycnu�[���PK�E[�9z��*8__pycache__/fix_input.cpython-36.opt-1.pycnu�[���PK�E[�Zq���)<__pycache__/fix_dict.cpython-36.opt-1.pycnu�[���PK�E[5ڍ_"I__pycache__/fix_map.cpython-36.pycnu�[���PK�E[���+XU__pycache__/fix_buffer.cpython-36.opt-1.pycnu�[���PK�E[a�/�X__pycache__/fix_isinstance.cpython-36.opt-1.pycnu�[���PK�E[I��4��'(___pycache__/fix_exitfunc.cpython-36.pycnu�[���PK�E["^%���$bh__pycache__/fix_throw.cpython-36.pycnu�[���PK�E[+8nL�	�	+�o__pycache__/fix_import.cpython-36.opt-2.pycnu�[���PK�E[C�pb��*�y__pycache__/fix_raise.cpython-36.opt-1.pycnu�[���PK�E[��k/*��__pycache__/fix_types.cpython-36.opt-1.pycnu�[���PK�E[�w�"�__pycache__/fix_zip.cpython-36.pycnu�[���PK�E[�j���,��__pycache__/fix_unicode.cpython-36.opt-1.pycnu�[���PK�E[��
�OO%Ж__pycache__/fix_urllib.cpython-36.pycnu�[���PK�E[O���	�	%t�__pycache__/fix_xrange.cpython-36.pycnu�[���PK�E[q�XF��,��__pycache__/fix_renames.cpython-36.opt-1.pycnu�[���PK�E[�����2��__pycache__/fix_standarderror.cpython-36.opt-2.pycnu�[���PK�E[�����-��__pycache__/fix_operator.cpython-36.opt-2.pycnu�[���PK�E[ZO#/KK,��__pycache__/fix_nonzero.cpython-36.opt-2.pycnu�[���PK�E[�"*��)*�__pycache__/fix_long.cpython-36.opt-1.pycnu�[���PK�E[/�Ii��,/�__pycache__/fix_getcwdu.cpython-36.opt-2.pycnu�[���PK�E[Y�ٜxx'H�__pycache__/fix_operator.cpython-36.pycnu�[���PK�E[��{4��,�__pycache__/fix_nonzero.cpython-36.opt-1.pycnu�[���PK�E[Ѐ���2��__pycache__/fix_standarderror.cpython-36.opt-1.pycnu�[���PK�E[���9ss*�__pycache__/fix_apply.cpython-36.opt-1.pycnu�[���PK�E[O���	�	+�__pycache__/fix_xrange.cpython-36.opt-1.pycnu�[���PK�E[>���+	__pycache__/fix_future.cpython-36.opt-1.pycnu�[���PK�E[8ڒ�'i	__pycache__/fix_ne.cpython-36.opt-1.pycnu�[���PK�E[Xz.��(�	__pycache__/fix_map.cpython-36.opt-2.pycnu�[���PK�E[�>�GG0	__pycache__/fix_methodattrs.cpython-36.opt-2.pycnu�[���PK�E[k�-O�
�
+�	__pycache__/fix_except.cpython-36.opt-1.pycnu�[���PK�E[Ѐ���,�#	__pycache__/fix_standarderror.cpython-36.pycnu�[���PK�E[	�W@''	__pycache__/fix_imports2.cpython-36.pycnu�[���PK�E[q�XF��&z)	__pycache__/fix_renames.cpython-36.pycnu�[���PK�E[tҵ0��,�1	__pycache__/fix_asserts.cpython-36.opt-2.pycnu�[���PK�E[�]f�EE*~6	__pycache__/fix_raise.cpython-36.opt-2.pycnu�[���PK�E[	�W@-=	__pycache__/fix_imports2.cpython-36.opt-1.pycnu�[���PK�E[�����/�?	__pycache__/fix_basestring.cpython-36.opt-1.pycnu�[���PK�E[��C���,jB	__pycache__/fix_sys_exc.cpython-36.opt-2.pycnu�[���PK�E[�Qv���)�G	__pycache__/fix_next.cpython-36.opt-2.pycnu�[���PK�E[�dL��,^S	__pycache__/fix_imports.cpython-36.opt-2.pycnu�[���PK�E[8`��0bd	__pycache__/fix_set_literal.cpython-36.opt-1.pycnu�[���PK�E[a�;888#Dk	__pycache__/fix_repr.cpython-36.pycnu�[���PK�E[%ځ���,�n	__pycache__/fix_imports.cpython-36.opt-1.pycnu�[���PK�E[��4PXX+�	__pycache__/fix_filter.cpython-36.opt-2.pycnu�[���PK�E[�sL�UU/Ƈ	__pycache__/fix_basestring.cpython-36.opt-2.pycnu�[���PK�E[�T��0z�	__pycache__/fix_numliterals.cpython-36.opt-2.pycnu�[���PK�E[!Z�H/	/	+��	__pycache__/fix_except.cpython-36.opt-2.pycnu�[���PK�E[%ځ���&�	__pycache__/fix_imports.cpython-36.pycnu�[���PK�E[N���dd&T�	__pycache__/fix_sys_exc.cpython-36.pycnu�[���PK�E[�K��.�	__pycache__/fix_itertools.cpython-36.opt-1.pycnu�[���PK�E[�Ⱥ��,i�	__pycache__/fix_asserts.cpython-36.opt-1.pycnu�[���PK�E[\<�ֶ�*��	__pycache__/fix_print.cpython-36.opt-1.pycnu�[���PK�E["^%���*��	__pycache__/fix_throw.cpython-36.opt-1.pycnu�[���PK�E[
'O!��.�	__pycache__/fix_funcattrs.cpython-36.opt-1.pycnu�[���PK�E[��(�	__pycache__/fix_raw_input.cpython-36.pycnu�[���PK�E[�Ⱥ��&}�	__pycache__/fix_asserts.cpython-36.pycnu�[���PK�E[�
��UU%��	__pycache__/fix_reduce.cpython-36.pycnu�[���PK�E[~aNN'a�	__pycache__/fix_ws_comma.cpython-36.pycnu�[���PK�E[ݛ�uu.�	__pycache__/fix_funcattrs.cpython-36.opt-2.pycnu�[���PK�E[a�;888)��	__pycache__/fix_repr.cpython-36.opt-1.pycnu�[���PK�E[8`��*j�	__pycache__/fix_set_literal.cpython-36.pycnu�[���PK�E[�
��)F�	__pycache__/fix_next.cpython-36.opt-1.pycnu�[���PK�E[�
`��+b�	__pycache__/fix_reduce.cpython-36.opt-2.pycnu�[���PK�E[&Fam��,��	__pycache__/fix_getcwdu.cpython-36.opt-1.pycnu�[���PK�E[�3\\*�
__pycache__/fix_input.cpython-36.opt-2.pycnu�[���PK�E[Y�ٜxx-�
__pycache__/fix_operator.cpython-36.opt-1.pycnu�[���PK�E[w2l���.v
__pycache__/fix_metaclass.cpython-36.opt-1.pycnu�[���PK�E[
'O!��(�,
__pycache__/fix_funcattrs.cpython-36.pycnu�[���PK�E[��~66*�0
__pycache__/fix_types.cpython-36.opt-2.pycnu�[���PK�E[&Fam��&76
__pycache__/fix_getcwdu.cpython-36.pycnu�[���PK�E[��7��'�9
__pycache__/fix_ne.cpython-36.opt-2.pycnu�[���PK�E[m2���-�<
__pycache__/fix_execfile.cpython-36.opt-2.pycnu�[���PK�E[��Ȍ�
�
%C
__pycache__/fix_import.cpython-36.pycnu�[���PK�E[+��??,CN
__pycache__/fix_unicode.cpython-36.opt-2.pycnu�[���PK�E[G�**%�S
__pycache__/fix_idioms.cpython-36.pycnu�[���PK�E[�폏��#]c
__pycache__/__init__.cpython-36.pycnu�[���PK�E[�폏��)1d
__pycache__/__init__.cpython-36.opt-1.pycnu�[���PK�E[��ȽHH/e
__pycache__/fix_xreadlines.cpython-36.opt-1.pycnu�[���PK�E[9��xx-�i
__pycache__/fix_execfile.cpython-36.opt-1.pycnu�[���PK�E[7�N���/�p
__pycache__/fix_xreadlines.cpython-36.opt-2.pycnu�[���PK�E[R2P9��+�t
__pycache__/fix_future.cpython-36.opt-2.pycnu�[���PK�E[�����)�w
__pycache__/fix_basestring.cpython-36.pycnu�[���PK�E[��!i��+wz
__pycache__/fix_idioms.cpython-36.opt-2.pycnu�[���PK�E[�oH+QQ&��
__pycache__/fix_has_key.cpython-36.pycnu�[���PK�E[��.g�
__pycache__/fix_raw_input.cpython-36.opt-1.pycnu�[���PK�E[~aNN-˖
__pycache__/fix_ws_comma.cpython-36.opt-1.pycnu�[���PK�E[�9�1��+v�
__pycache__/fix_buffer.cpython-36.opt-2.pycnu�[���PK�E[6�H�770��
__pycache__/fix_set_literal.cpython-36.opt-2.pycnu�[���PK�E[������16�
__pycache__/fix_tuple_params.cpython-36.opt-2.pycnu�[���PK�E[�Bp		)(�
__pycache__/fix_dict.cpython-36.opt-2.pycnu�[���PK�E[��*��
__pycache__/fix_throw.cpython-36.opt-2.pycnu�[���PK�E[�
��UU+�
__pycache__/fix_reduce.cpython-36.opt-1.pycnu�[���PK�E[�/Za��)��
__pycache__/fix_repr.cpython-36.opt-2.pycnu�[���PK�E[�9z��$�
__pycache__/fix_input.cpython-36.pycnu�[���PKss˓��