B
    )°zf?  ã               @   sX   yd dl Z W n ek
r(   d dlZ Y nX d dlZdZe d¡Zdd„ Zde_ee_	dS )é    Nz0.2.1z+(^[ \t]*except(.*\b(Base)?Exception\b.*)?:)c             C   sF   t  | ¡rdS t | ¡}|rB| d¡dkr6| ¡ dfS | ¡ dfS dS )a²  Check for blind except statements.

    >>> check_blind_except('except:')
    (0, 'B901 blind except: statement')
    >>> check_blind_except('except Exception:')
    (0, 'B902 blind except Exception: statement')
    >>> check_blind_except('except  Exception as exc:')
    (0, 'B902 blind except Exception: statement')
    >>> check_blind_except('except ValueError, Exception as exc:')
    (0, 'B902 blind except Exception: statement')
    >>> check_blind_except('except Exception, ValueError as exc:')
    (0, 'B902 blind except Exception: statement')
    >>> check_blind_except('except BaseException as exc:')
    (0, 'B902 blind except Exception: statement')
    >>> check_blind_except('except GoodException as exc:  # except:')
    >>> check_blind_except('except ExceptionGood as exc:')
    >>> check_blind_except('except Exception')  # only trigger with trailing colon
    >>> check_blind_except('some code containing except: in string')
    Né   zB901 blind except: statementz&B902 blind except Exception: statement)ÚpycodestyleZnoqaÚBLIND_EXCEPT_REGEXÚsearchÚgroupÚstart)Zphysical_lineÚmatch© r	   úV/home/ankuromar296_gmail_com/.local/lib/python3.7/site-packages/flake8_blind_except.pyÚcheck_blind_except   s    

r   zflake8-blind-except)
r   ÚImportErrorZpep8ÚreÚ__version__Úcompiler   r   ÚnameÚversionr	   r	   r	   r
   Ú<module>   s   
