a c@sXdZddlmZddlmZddlmZmZddl Z GdddeZ Gdd d eZdS) zy Customized Mixin2to3 support: - adds support for converting doctests This module raises an ImportError on Python 2. ) Mixin2to3)log)RefactoringToolget_fixers_from_packageNc@s$eZdZddZddZddZdS)DistutilsRefactoringToolcOstj|g|RdSN)rerror)selfmsgargskwr b/workspaces/shunt/resources/test-fastapi/venv/lib/python3.9/site-packages/setuptools/lib2to3_ex.py log_errorsz"DistutilsRefactoringTool.log_errorcGstj|g|RdSr)rinfor r r r r r log_messagesz$DistutilsRefactoringTool.log_messagecGstj|g|RdSr)rdebugrr r r log_debugsz"DistutilsRefactoringTool.log_debugN)__name__ __module__ __qualname__rrrr r r rrsrc@s&eZdZd ddZddZddZdS) rFcCsr|jjdurdS|sdStdd||||rbtjrnt |j }|j |dddn t ||dS)NTzFixing  )writeZ doctests_only) distributionZuse_2to3rrjoin_Mixin2to3__build_fixer_names_Mixin2to3__exclude_fixers setuptoolsZrun_2to3_on_doctestsr fixer_namesrefactor _Mixin2to3run_2to3)r filesZdoctestsrr r rr"s  zMixin2to3.run_2to3cCsZ|jr dSg|_tjD]}|jt|q|jjdurV|jjD]}|jt|q@dSr)rrZlib2to3_fixer_packagesextendrrZuse_2to3_fixers)r pr r rZ__build_fixer_names.s   zMixin2to3.__build_fixer_namescCsJt|dg}|jjdur&||jj|D]}||jvr*|j|q*dS)NZexclude_fixers)getattrrZuse_2to3_exclude_fixersr%rremove)r Zexcluded_fixersZ fixer_namer r rZ__exclude_fixers8s    zMixin2to3.__exclude_fixersN)F)rrrr"rrr r r rrs  r) __doc__distutils.utilrr! distutilsrlib2to3.refactorrrrrr r r rs