(self, node, results)
Transform for the basic import case. Replaces the old
           import name with a comma separated list of its
           replacements.
Transform for the basic import case. Replaces the old
           import name with a comma separated list of its
           replacements.
Transform for the basic import case . Replaces the old import name with a comma separated list of its replacements .
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_import ( self , node , results ) : 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 )