+
    n‡Bi  ã                   óD   € ^ RI t ^RIHt  ! R R]]4      tRRRR/R ltR# )	é    N)ÚAutocommandErrorc                   ó   € ] tR t^tRtR# )ÚAutomainRequiresModuleError© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__static_attributes__r   ó    Ú6/usr/lib/python3/dist-packages/autocommand/automain.pyr   r      s   † Ûr   r   ÚargsÚkwargsc               ó|   aa€ \        V 4      '       d   \        V 4      hV R8X  g   V RJ d   Sf   / oVV3R lpV# R # )ay  
This decorator automatically invokes a function if the module is being run
as the "__main__" module. Optionally, provide args or kwargs with which to
call the function. If `module` is "__main__", the function is called, and
the program is `sys.exit`ed with the return value. You can also pass `True`
to cause the function to be called unconditionally. If the function is not
called, it is returned unchanged by the decorator.

Usage:

@automain(__name__)  # Pass __name__ to check __name__=="__main__"
def main():
    ...

If __name__ is "__main__" here, the main function is called, and then
sys.exit called with the return value.
Ú__main__Tc                 ó@   <€ \         P                  ! V ! S/ SB 4       R # ©N)ÚsysÚexit)Úmainr   r   s   &€€r   Úautomain_decoratorÚ$automain.<locals>.automain_decorator6   s   ø€ Ü�HŠH‘T˜4Ð* 6Ñ*Ö+r   c                 ó   € V # r   r   )r   s   &r   Ú<lambda>Úautomain.<locals>.<lambda>;   s   € ™Dr   )Úcallabler   )Úmoduler   r   r   s   &dd r   Úautomainr      sF   ù€ ô( �×ÒÜ)¨&Ó1Ð1à�Ô˜v¨›~ØŠ>ØˆFö	,ð "Ð!á Ð r   r   )r   Úerrorsr   Ú	TypeErrorr   r   r   r   r   Ú<module>r!      s/   ðó$ Ý $ô	Ð"2°Iô 	ð!!˜Rð !!¨ö !!r   