# Path: py3kwarn2to3/refactor.py
# def refactor(self, items, write=False, doctests_only=False):
#     """Refactor a list of files and directories."""
# 
#     for dir_or_file in items:
#         if os.path.isdir(dir_or_file):
#             self.refactor_dir(dir_or_file, write, doctests_only)
#         else:
#             self.refactor_file(dir_or_file, write, doctests_only)
# 
# Path: py3kwarn2to3/pytree.py
# HUGE = 0x7FFFFFFF  # maximum repeat count, default max
# def type_repr(type_num):
#     def __new__(cls, *args, **kwds):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def _eq(self, other):
#     def clone(self):
#     def post_order(self):
#     def pre_order(self):
#     def set_prefix(self, prefix):
#     def get_prefix(self):
#     def replace(self, new):
#     def get_lineno(self):
#     def changed(self):
#     def remove(self):
#     def next_sibling(self):
#     def prev_sibling(self):
#     def leaves(self):
#     def depth(self):
#     def get_suffix(self):
#         def __str__(self):
#     def __init__(self,type, children,
#                  context=None,
#                  prefix=None,
#                  fixers_applied=None):
#     def __repr__(self):
#     def __unicode__(self):
#     def _eq(self, other):
#     def clone(self):
#     def post_order(self):
#     def pre_order(self):
#     def _prefix_getter(self):
#     def _prefix_setter(self, prefix):
#     def set_child(self, i, child):
#     def insert_child(self, i, child):
#     def append_child(self, child):
#     def __init__(self, type, value,
#                  context=None,
#                  prefix=None,
#                  fixers_applied=[]):
#     def __repr__(self):
#     def __unicode__(self):
#     def _eq(self, other):
#     def clone(self):
#     def leaves(self):
#     def post_order(self):
#     def pre_order(self):
#     def _prefix_getter(self):
#     def _prefix_setter(self, prefix):
# def convert(gr, raw_node):
#     def __new__(cls, *args, **kwds):
#     def __repr__(self):
#     def optimize(self):
#     def match(self, node, results=None):
#     def match_seq(self, nodes, results=None):
#     def generate_matches(self, nodes):
#     def __init__(self, type=None, content=None, name=None):
#     def match(self, node, results=None):
#     def _submatch(self, node, results=None):
#     def __init__(self, type=None, content=None, name=None):
#     def _submatch(self, node, results=None):
#     def __init__(self, content=None, min=0, max=HUGE, name=None):
#     def optimize(self):
#     def match(self, node, results=None):
#     def match_seq(self, nodes, results=None):
#     def generate_matches(self, nodes):
#     def _iterative_matches(self, nodes):
#     def _bare_name_matches(self, nodes):
#     def _recursive_matches(self, nodes, count):
#     def __init__(self, content=None):
#     def match(self, node):
#     def match_seq(self, nodes):
#     def generate_matches(self, nodes):
# def generate_matches(patterns, nodes):
# class Base(object):
# class Node(Base):
# class Leaf(Base):
# class BasePattern(object):
# class LeafPattern(BasePattern):
# class NodePattern(BasePattern):
# class WildcardPattern(BasePattern):
# class NegatedPattern(BasePattern):
# 
# Path: py3kwarn2to3/fixer_util.py
# def find_root(node):
#     """Find the top level namespace."""
#     # Scamper up to the top level namespace
#     while node.type != syms.file_input:
#         assert node.parent, "Tree is insane! root found before "\
#                            "file_input node was found."
#         node = node.parent
#     return node


from itertools import chain
from . import __version__
from py3kwarn2to3 import refactor, pytree
from py3kwarn2to3.fixer_util import find_root
import sys
    import optparse
            import multiprocessing
# coding=utf-8

from __future__ import print_function
from __future__ import unicode_literals





try:
    unicode
except NameError:
    unicode = str


def to_warn_str(node):
    lines = [text.strip() for text in unicode(node).split('\n')]
    for i, line in enumerate(lines):
        if line:
            if line.startswith('#'):
                del lines[i]
            elif line[-1] != ':':
                lines[i] = line + ';'
    return ''.join(lines).strip()



# Path: py3kwarn2to3/refactor.py
# def refactor(self, items, write=False, doctests_only=False):
#     """Refactor a list of files and directories."""
# 
#     for dir_or_file in items:
#         if os.path.isdir(dir_or_file):
#             self.refactor_dir(dir_or_file, write, doctests_only)
#         else:
#             self.refactor_file(dir_or_file, write, doctests_only)
# 
# Path: py3kwarn2to3/pytree.py
# HUGE = 0x7FFFFFFF  # maximum repeat count, default max
# def type_repr(type_num):
#     def __new__(cls, *args, **kwds):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def _eq(self, other):
#     def clone(self):
#     def post_order(self):
#     def pre_order(self):
#     def set_prefix(self, prefix):
#     def get_prefix(self):
#     def replace(self, new):
#     def get_lineno(self):
#     def changed(self):
#     def remove(self):
#     def next_sibling(self):
#     def prev_sibling(self):
#     def leaves(self):
#     def depth(self):
#     def get_suffix(self):
#         def __str__(self):
#     def __init__(self,type, children,
#                  context=None,
#                  prefix=None,
#                  fixers_applied=None):
#     def __repr__(self):
#     def __unicode__(self):
#     def _eq(self, other):
#     def clone(self):
#     def post_order(self):
#     def pre_order(self):
#     def _prefix_getter(self):
#     def _prefix_setter(self, prefix):
#     def set_child(self, i, child):
#     def insert_child(self, i, child):
#     def append_child(self, child):
#     def __init__(self, type, value,
#                  context=None,
#                  prefix=None,
#                  fixers_applied=[]):
#     def __repr__(self):
#     def __unicode__(self):
#     def _eq(self, other):
#     def clone(self):
#     def leaves(self):
#     def post_order(self):
#     def pre_order(self):
#     def _prefix_getter(self):
#     def _prefix_setter(self, prefix):
# def convert(gr, raw_node):
#     def __new__(cls, *args, **kwds):
#     def __repr__(self):
#     def optimize(self):
#     def match(self, node, results=None):
#     def match_seq(self, nodes, results=None):
#     def generate_matches(self, nodes):
#     def __init__(self, type=None, content=None, name=None):
#     def match(self, node, results=None):
#     def _submatch(self, node, results=None):
#     def __init__(self, type=None, content=None, name=None):
#     def _submatch(self, node, results=None):
#     def __init__(self, content=None, min=0, max=HUGE, name=None):
#     def optimize(self):
#     def match(self, node, results=None):
#     def match_seq(self, nodes, results=None):
#     def generate_matches(self, nodes):
#     def _iterative_matches(self, nodes):
#     def _bare_name_matches(self, nodes):
#     def _recursive_matches(self, nodes, count):
#     def __init__(self, content=None):
#     def match(self, node):
#     def match_seq(self, nodes):
#     def generate_matches(self, nodes):
# def generate_matches(patterns, nodes):
# class Base(object):
# class Node(Base):
# class Leaf(Base):
# class BasePattern(object):
# class LeafPattern(BasePattern):
# class NodePattern(BasePattern):
# class WildcardPattern(BasePattern):
# class NegatedPattern(BasePattern):
# 
# Path: py3kwarn2to3/fixer_util.py
# def find_root(node):
#     """Find the top level namespace."""
#     # Scamper up to the top level namespace
#     while node.type != syms.file_input:
#         assert node.parent, "Tree is insane! root found before "\
#                            "file_input node was found."
#         node = node.parent
#     return node


# Path: py3kwarn/main.py
from itertools import chain
from . import __version__
from py3kwarn2to3 import refactor, pytree
from py3kwarn2to3.fixer_util import find_root
import sys
    import optparse
            import multiprocessing

# coding=utf-8

from __future__ import print_function
from __future__ import unicode_literals





try:
    unicode
except NameError:
    unicode = str


def to_warn_str(node):
    lines = [text.strip() for text in unicode(node).split('\n')]
    for i, line in enumerate(lines):
        if line:
            if line.startswith('#'):
                del lines[i]
            elif line[-1] != ':':
                lines[i] = line + ';'
    return ''.join(lines).strip()



class WarnRefactoringTool(refactor.MultiprocessRefactoringTool):