ó
Ÿ^Yc           @   sæ   d  Z  d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d	 e f d
     YZ d e f d     YZ d e f d     YZ d e f d     YZ	 d e	 f d     YZ
 d e	 f d     YZ d S(   s$   Exception classes for all of Flake8.t   Flake8Exceptionc           B   s   e  Z d  Z RS(   s   Plain Flake8 exception.(   t   __name__t
   __module__t   __doc__(    (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyR       s   t	   EarlyQuitc           B   s   e  Z d  Z RS(   s4   Except raised when encountering a KeyboardInterrupt.(   R   R   R   (    (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyR   
   s   t   FailedToLoadPluginc           B   s&   e  Z d  Z d Z d   Z d   Z RS(   s-   Exception raised when a plugin fails to load.s7   Flake8 failed to load plugin "%(name)s" due to %(exc)s.c         O   sP   | j  d  |  _ |  j j |  _ | j  d  |  _ t t |   j | |   d S(   s,   Initialize our FailedToLoadPlugin exception.t   plugint	   exceptionN(   t   popR   t   namet   ep_namet   original_exceptiont   superR   t   __init__(   t   selft   argst   kwargs(    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyR      s    c         C   s   |  j  i |  j d 6|  j d 6S(   s'   Return a nice string for our exception.R	   t   exc(   t   FORMATR
   R   (   R   (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyt   __str__   s    (   R   R   R   R   R   R   (    (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyR      s   	t   InvalidSyntaxc           B   s   e  Z d  Z d   Z RS(   s.   Exception raised when tokenizing a file fails.c         O   s{   | j  d d  } | |  _ d j | j j | j d  |  _ d |  _ d |  _	 d |  _
 t t |   j |  j | |  d S(   s'   Initialize our InvalidSyntax exception.R   s   {0}: {1}i    t   E902i   N(   R   t   NoneR   t   formatt	   __class__R   R   t   error_messaget
   error_codet   line_numbert   column_numberR   R   R   (   R   R   R   R   (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyR   %   s    					(   R   R   R   R   (    (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyR   "   s   t    PluginRequestedUnknownParametersc           B   s&   e  Z d  Z d Z d   Z d   Z RS(   s(   The plugin requested unknown parameters.s7   "%(name)s" requested unknown parameters causing %(exc)sc         O   sA   | j  d  |  _ | j  d  |  _ t t |   j | |   d S(   s1   Pop certain keyword arguments for initialization.R   R   N(   R   R   R   R   R   R   (   R   R   R   (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyR   <   s
    c         C   s#   |  j  i |  j d d 6|  j d 6S(   s   Format our exception message.t   plugin_nameR	   R   (   R   R   R   (   R   (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyR   E   s    (   R   R   R   R   R   R   (    (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyR   7   s   		t   HookInstallationErrorc           B   s   e  Z d  Z RS(   s&   Parent exception for all hooks errors.(   R   R   R   (    (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyR   K   s   t   GitHookAlreadyExistsc           B   s    e  Z d  Z d   Z d   Z RS(   sB   Exception raised when the git pre-commit hook file already exists.c         O   s/   | j  d  |  _ t t |   j | |   d S(   s   Initialize the path attribute.t   pathN(   R   R!   R   R    R   (   R   R   R   (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyR   T   s    c         C   s   d } | j  |  j  S(   s/   Provide a nice message regarding the exception.sv   The Git pre-commit hook ({0}) already exists. To convince Flake8 to install the hook, please remove the existing hook.(   R   R!   (   R   t   msg(    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyR   Y   s    (   R   R   R   R   R   (    (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyR    Q   s   	t   MercurialHookAlreadyExistsc           B   s&   e  Z d  Z d Z d   Z d   Z RS(   s=   Exception raised when a mercurial hook is already configured.c         O   sA   | j  d  |  _ | j  d  |  _ t t |   j | |   d S(   s#   Initialize the relevant attributes.R!   t   valueN(   R   R!   R$   R   R#   R   (   R   R   R   (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyR   f   s    c         C   s"   d } | j  |  j |  j |  j  S(   s2   Return a nicely formatted string for these errors.s«   The Mercurial {0} hook already exists with "{1}" in {2}. To convince Flake8 to install the hook, please remove the {0} configuration from the [hooks] section of your hgrc.(   R   t	   hook_nameR$   R!   (   R   R"   (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyR   l   s    N(   R   R   R   R   R%   R   R   (    (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyR#   a   s   	t    MercurialCommitHookAlreadyExistsc           B   s   e  Z d  Z d Z RS(   s?   Exception raised when the hg commit hook is already configured.t   commit(   R   R   R   R%   (    (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyR&   t   s   t"   MercurialQRefreshHookAlreadyExistsc           B   s   e  Z d  Z d Z RS(   s?   Exception raised when the hg commit hook is already configured.t   qrefresh(   R   R   R   R%   (    (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyR(   z   s   N(   R   t	   ExceptionR    R   R   R   R   R   R    R#   R&   R(   (    (    (    s1   /tmp/pip-build-EndXZ2/flake8/flake8/exceptions.pyt   <module>   s   