ó
„¾^Yc           @  se   d  Z  d d l m Z d d l Z d d l Z d d l Z d d „ Z d „  Z d „  Z	 d „  Z
 d S(   s4   Module containing the logic for our debugging logic.iÿÿÿÿ(   t   print_functionNc         C  sB   | j  s d St t j t | ƒ d d d t ƒƒ t t ƒ ‚ d S(   s"  Print debugging information used in bug reports.

    :param option:
        The optparse Option instance.
    :type option:
        optparse.Option
    :param str option_string:
        The option name
    :param value:
        The value passed to the callback parsed from the command-line
    :param parser:
        The optparse OptionParser instance
    :type parser:
        optparse.OptionParser
    :param option_manager:
        The Flake8 OptionManager instance.
    :type option_manager:
        flake8.options.manager.OptionManager
    Nt   indenti   t	   sort_keys(   t   registered_pluginst   printt   jsont   dumpst   informationt   Truet
   SystemExitt   False(   t   optiont   option_stringt   valuet   parsert   option_manager(    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/main/debug.pyt   print_information
   s    	%c         C  sS   i |  j  d 6t |  ƒ d 6t ƒ  d 6i t j ƒ  d 6t j ƒ  d 6t j ƒ  d 6d 6S(   s:   Generate the information to be printed for the bug report.t   versiont   pluginst   dependenciest   python_implementationt   python_versiont   systemt   platform(   R   t   plugins_fromR   R   R   R   R   (   R   (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/main/debug.pyR   (   s    

c         C  s4   g  t  |  j ƒ D]  \ } } i | d 6| d 6^ q S(   s'   Generate the list of plugins installed.t   pluginR   (   t   sortedR   (   R   R   R   (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/main/debug.pyR   6   s    c           C  s   i d d 6t  j d 6g S(   s0   Generate the list of dependencies we care about.t
   setuptoolst
   dependencyR   (   R   t   __version__(    (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/main/debug.pyR   <   s    (   t   __doc__t
   __future__R    R   R   R   t   NoneR   R   R   R   (    (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/main/debug.pyt   <module>   s   		