o
    ÕÜÓh«  ã                   @  sd   d Z ddlmZ ddlZddlZddlZddlmZ ddlm	Z	 ddl
mZ e e¡Zddd„ZdS )zÖAggregation function for CLI specified options and config file options.

This holds the logic that uses the collected and merged config files and
applies the user-specified command-line configuration on top of it.
é    )ÚannotationsN)ÚSequence)Úconfig)ÚOptionManagerÚmanagerr   Úcfgúconfigparser.RawConfigParserÚcfg_dirÚstrÚargvúSequence[str] | NoneÚreturnúargparse.Namespacec           
      C  s–   |   g ¡}t | ||¡}| j|_| j|_| ¡ D ],\}}|}t||ƒs2| j| j}	t	|	t
ƒs0J ‚|	}t dt||dƒ||¡ t|||ƒ q|   ||¡S )z0Aggregate and merge CLI and config file options.z3Overriding default value of (%s) for "%s" with (%s)N)Ú
parse_argsr   Úparse_configÚextended_default_ignoreÚextended_default_selectÚitemsÚhasattrÚconfig_options_dictÚdestÚ
isinstancer
   ÚLOGÚdebugÚgetattrÚsetattr)
r   r   r	   r   Údefault_valuesÚparsed_configÚconfig_nameÚvalueÚ	dest_nameÚdest_val© r"   úO/var/www/html/ai/venv/lib/python3.10/site-packages/flake8/options/aggregator.pyÚaggregate_options   s$   


ür$   )
r   r   r   r   r	   r
   r   r   r   r   )Ú__doc__Ú
__future__r   ÚargparseÚconfigparserÚloggingÚtypingr   Úflake8.optionsr   Úflake8.options.managerr   Ú	getLoggerÚ__name__r   r$   r"   r"   r"   r#   Ú<module>   s    
