o
    EDi5                     @  sj  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
ZddlmZ eeZi ddd	d
dddddddddddddddddddddd d!d"d#d$d%d&d'd(i d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXZG dYdZ dZejjZdS )[z8Plugin built-in to Flake8 to treat pyflakes as a plugin.    )annotationsN)	Generator)Any)OptionManagerUnusedImportF401ImportShadowedByLoopVarF402ImportStarUsedF403LateFutureImportF404ImportStarUsageF405ImportStarNotPermittedF406FutureFeatureNotDefinedF407PercentFormatInvalidFormatF501PercentFormatExpectedMappingF502PercentFormatExpectedSequenceF503 PercentFormatExtraNamedArgumentsF504PercentFormatMissingArgumentF505$PercentFormatMixedPositionalAndNamedF506$PercentFormatPositionalCountMismatchF507!PercentFormatStarRequiresSequenceF508'PercentFormatUnsupportedFormatCharacterF509StringDotFormatInvalidFormatF521"StringDotFormatExtraNamedArgumentsF522'StringDotFormatExtraPositionalArgumentsF523StringDotFormatMissingArgumentF524StringDotFormatMixingAutomaticF525FStringMissingPlaceholdersF541TStringMissingPlaceholdersF542MultiValueRepeatedKeyLiteralF601MultiValueRepeatedKeyVariableF602%TooManyExpressionsInStarredAssignmentF621TwoStarredExpressionsF622AssertTupleF631	IsLiteralF632InvalidPrintSyntaxF633IfTupleF634BreakOutsideLoopF701ContinueOutsideLoopF702YieldOutsideFunctionF704F706F707F721F722F811F821F822F823F824F831F841F842F901)ReturnOutsideFunctionDefaultExceptNotLastDoctestSyntaxErrorForwardAnnotationSyntaxErrorRedefinedWhileUnusedUndefinedNameUndefinedExportUndefinedLocalUnusedIndirectAssignmentDuplicateArgumentUnusedVariableUnusedAnnotationRaiseNotImplementedc                      sL   e Zd ZdZdZd fd	d
ZedddZedddZdddZ	  Z
S )FlakesCheckerz=Subclass the Pyflakes checker to conform with the flake8 API.Ftreeast.ASTfilenamestrreturnNonec                   s   t  j||| jd dS )z=Initialize the PyFlakes plugin with an AST tree and filename.)rg   withDoctestN)super__init__with_doctest)selfre   rg   	__class__ P/var/www/Datamplify/venv/lib/python3.10/site-packages/flake8/plugins/pyflakes.pyrm   H   s   
zFlakesChecker.__init__parserr   c                 C  s*   |j ddddd |j dddddd	 d
S )z:Register options for PyFlakes on the Flake8 OptionManager.z
--builtinsTz&define more built-ins, comma separated)parse_from_configcomma_separated_listhelpz
--doctestsF
store_truez!also check syntax of the doctests)defaultactionru   rw   N)
add_option)clsrt   rr   rr   rs   add_optionsN   s   
zFlakesChecker.add_optionsoptionsargparse.Namespacec                 C  s"   |j r| j|j | _|j| _dS )z0Parse option values from Flake8's OptionManager.N)builtinsbuiltInsuniondoctestsrn   )r|   r~   rr   rr   rs   parse_options_   s   zFlakesChecker.parse_options*Generator[tuple[int, int, str, type[Any]]]c              	   c  sN    | j D ] }t|dd}|j|dtt|jd|j|j	 |j
fV  qdS )zRun the plugin.colr   z{} {}F999N)messagesgetattrlinenoformatFLAKE8_PYFLAKES_CODESgettype__name__messagemessage_argsrq   )ro   r   r   rr   rr   rs   runf   s   

zFlakesChecker.run)re   rf   rg   rh   ri   rj   )rt   r   ri   rj   )r~   r   ri   rj   )ri   r   )r   
__module____qualname____doc__rn   rm   classmethodr}   r   r   __classcell__rr   rr   rp   rs   rd   C   s    rd   )r   
__future__r   argparseastloggingcollections.abcr   typingr   pyflakes.checkerpyflakesflake8.options.managerr   	getLoggerr   LOGr   checkerCheckerrd   rr   rr   rr   rs   <module>   s    
	
 !"#3