o
    ÕÜÓhÙ  ã                   @  sP   d Z ddlmZ ddlZddlZddlmZ ddlmZ e 	e
¡Zddd„ZdS )z7Functions for constructing the requested report plugin.é    )ÚannotationsN)ÚBaseFormatter)ÚLoadedPluginÚ	reportersúdict[str, LoadedPlugin]Úoptionsúargparse.NamespaceÚreturnr   c                 C  sb   |j }|jdkrd}n|jdkrd}z| | }W n ty+   t d|¡ | d }Y nw | |¡S )a›  Make the formatter from the requested user options.

    - if :option:`flake8 --quiet` is specified, return the ``quiet-filename``
      formatter.
    - if :option:`flake8 --quiet` is specified at least twice, return the
      ``quiet-nothing`` formatter.
    - otherwise attempt to return the formatter by name.
    - failing that, assume it is a format string and return the ``default``
      formatter.
    é   zquiet-filenameé   zquiet-nothingz5%r is an unknown formatter.  Falling back to default.Údefault)ÚformatÚquietÚKeyErrorÚLOGÚwarningÚobj)r   r   Úformat_nameÚformat_plugin© r   úM/var/www/html/ai/venv/lib/python3.10/site-packages/flake8/plugins/reporter.pyÚmake   s   

þû
r   )r   r   r   r   r	   r   )Ú__doc__Ú
__future__r   ÚargparseÚloggingÚflake8.formatting.baser   Úflake8.plugins.finderr   Ú	getLoggerÚ__name__r   r   r   r   r   r   Ú<module>   s    
