+
    üÐj­R  ã                   ó$  € R t ^ RIt^ RIHt ^ RIHtHt ^ RIHtH	t	H
t
 ^ RIHtHtHtHt ^ RIHt  ! R R]4      t ! R	 R
]R7      tR t ! R R]P,                  4      t ! R R]P,                  4      t ! R R]P,                  4      t ! R R]
P4                  4      t ! R R]
P4                  4      t ! R R]4      tR t ! R R]
P4                  4      t ! R R]
P4                  4      t  ! R R]
P4                  4      t! ! R  R!]4      t"R"t#R#t$R# )$z*
Test cases for twisted.python._shellcomp
N)ÚBytesIO)ÚListÚOptional)Ú
_shellcompÚreflectÚusage)ÚCompleteFilesÚCompleteListÚ	CompleterÚCompletions)Úunittestc                   ó*   a € ] tR t^t o RtR tRtV tR# )ÚZshScriptTestMetaz"
Metaclass of ZshScriptTestMixin.
c                óŒ   € R  pRV9   d&   VR,           F  w  rVV! WV4      pWsRV,           &   K  	  \         P                  WW#4      # )c                 ó   a a€ V V3R  lpV# )c                 ó   <€ \        V SS4      # )N)Útest_genZshFunction)ÚselfÚcmdNameÚoptionsFQPNs   &€€ÚD/usr/lib/python3/dist-packages/twisted/python/test/test_shellcomp.pyÚrunTestÚ<ZshScriptTestMeta.__new__.<locals>.makeTest.<locals>.runTest   s   ø€ Ü*¨4°¸+ÓFÐFó    © )r   r   r   s   ff r   ÚmakeTestÚ+ZshScriptTestMeta.__new__.<locals>.makeTest   s   ù€ öGð ˆNr   ÚgenerateForÚtest_genZshFunction_)ÚtypeÚ__new__)ÚclsÚnameÚbasesÚattrsr   r   r   Útests   &&&&    r   r    ÚZshScriptTestMeta.__new__   sQ   € ò	ð ˜EÔ!Ø(-¨m×(<Ð(<Ñ$�Ù Ó5�Ø:>Ð,¨wÕ6Ó7ñ )=ô �|‰|˜C uÓ4Ð4r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r    Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r      s   ø‡ € ñ÷5ð 5r   r   c                   ó   € ] tR t^(tRtRtR# )ÚZshScriptTestMixinaw  
Integration test helper to show that C{usage.Options} classes can have zsh
completion functions generated for them without raising errors.

In your subclasses set a class variable like so::

  #            | cmd name | Fully Qualified Python Name of Options class |
  #
  generateFor = [('conch',  'twisted.conch.scripts.conch.ClientOptions'),
                 ('twistd', 'twisted.scripts.twistd.ServerOptions'),
                 ]

Each package that contains Twisted scripts should contain one TestCase
subclass which also inherits from this mixin, and contains a C{generateFor}
list appropriate for the scripts in that package.
r   N)r'   r(   r)   r*   r+   r,   r   r   r   r1   r1   (   s   † õr   r1   )Ú	metaclassc           	     óF  € \        4       pV P                  \        P                  RV4        \        P
                  ! V4      ! 4       p TP                  . RO4       T P                  R4       TP                  ^ 4       T P                  ^\        TP!                  ^4      4      4       TP                  ^ 4       TP#                  4        \%        TR4      '       dš   TP&                   F‰  w  rgr‰ TP                  TRRR	.4       T P                  R4       TP                  ^ 4       T P                  ^\        TP!                  ^4      4      4       TP                  ^ 4       TP#                  4        K‹  	  T P)                  4        R#   \         d    p\        P                  ! RT: 24      hRp?ii ; i  \         d   p\        P                  ! RT34      hRp?i\         d     ELzi ; i  \         d   p\        P                  ! R
T34      hRp?i\         d     ELi ; i)a)  
Generate completion functions for given twisted command - no errors
should be raised

@type cmdName: C{str}
@param cmdName: The name of the command-line utility e.g. 'twistd'

@type optionsFQPN: C{str}
@param optionsFQPN: The Fully Qualified Python Name of the C{Options}
    class to be tested.
Ú_shellCompFilez.Couldn't import or instantiate Options class: NÚ ú--_shell-completionzSystemExit not raisedz&ImportError calling parseOptions(): %sÚsubCommandszzsh:3z4ImportError calling parseOptions() on subcommand: %s©r5   r6   úzsh:2)r   Úpatchr   ÚOptionsr   ÚnamedAnyÚ	Exceptionr   ÚSkipTestÚparseOptionsÚfailÚImportErrorÚ
SystemExitÚseekÚassertEqualÚlenÚreadÚtruncateÚhasattrr7   ÚflushWarnings)
r   r   r   Ú
outputFileÚoÚeÚcmdÚshortÚparserÚdocs
   &&&       r   r   r   ;   sÓ  € ô “€JØ‡J�JŒu�}‰}Ð.°
Ô;ð
Ü×Ò˜[Ô)Ó+ˆð
+Ø	�‰Ò;Ô<ð 	�	‰	Ð)Ô*Ø‡O�O�AÔà×Ñ�Qœ˜JŸO™O¨AÓ.Ó/Ô0Ø‡O�O�AÔØ×ÑÔô ˆq�-× Ò Ø'(§}¤}Ñ#ˆC˜ð3Ø—‘  RÐ)>ÀÐHÔIð —	‘	Ð1Ô2à�O‰O˜AÔà×Ñ˜Q¤ J§O¡O°AÓ$6Ó 7Ô8Ø�O‰O˜AÔØ×ÑÖ!ñ% (5ð, 	×ÑÖøô] ô 
Ü×ÓÚEFÐHó
ð 	
ûð
ûô ô Pô ×ÒÐ HÈ1È$ÓOÐOûÜô Úðûô ô ô ×'Ò'ØMÐPQÈtóð ûô ô Úðús_   ­F Á	F3 Ã.G+ÆF0ÆF+Æ+F0Æ3G(Æ>GÇG(Ç#G(Ç'G(Ç+H Ç6HÈH ÈH ÈH c                   ór   a € ] tR t^t o RtR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tRtV tR# )ÚZshTestsz
Tests for zsh completion code
c                óX  € \        4       p\        P                  ! VR\        4       4      p\        P
                  P                  P                  4       pVP                  \         P
                  P                  4       V P                  VP                  V4       V P                  VP                  \        \        P
                  P                  4      4       V P                  VP                  \        P
                  P                  4       \        P
                  P                  P                  4       pVP                  \         P
                  P                  4       V P                  VP                  V4       V P                  VP                  \        P
                  P                  4       R# )zQ
Are `compData' attributes you can place on Options classes
picked up correctly?
ÚaceN)ÚFighterAceExtendedOptionsr   ÚZshArgumentsGeneratorr   ÚFighterAceOptionsÚcompDataÚdescriptionsÚcopyÚupdaterD   ÚmultiUseÚsetÚmutuallyExclusiveÚ
optActionsÚextraActions)r   ÚoptsÚagrY   r_   s   &    r   Útest_accumulateMetadataÚ ZshTests.test_accumulateMetadata„   s#  € ô
 )Ó*ˆÜ×-Ò-¨d°E¼7»9ÓEˆä(×1Ñ1×>Ñ>×CÑCÓEˆØ×ÑÔ5×>Ñ>×KÑKÔLà×Ñ˜Ÿ™¨,Ô7Ø×Ñ˜Ÿ™¤cÔ*;×*DÑ*D×*MÑ*MÓ&NÔOØ×ÑØ× Ñ Ô"3×"<Ñ"<×"NÑ"Nô	
ô '×/Ñ/×:Ñ:×?Ñ?ÓAˆ
Ø×ÑÔ3×<Ñ<×GÑGÔHØ×Ñ˜Ÿ™¨
Ô3à×Ñ˜Ÿ™Ô*;×*DÑ*D×*QÑ*QÖRr   c                óÖ   €  ! R R\         4      pV! 4       p\        P                  ! VR\        4       4      pR0 R
mR0 RmR0 RmR0 RmR0 Rm/pV P	                  VP
                  V4       R	# )z’
Exercise a corner-case of ZshArgumentsGenerator.makeExcludesDict()
where the long option name already exists in the `excludes` dict being
built.
c                   ó8   € ] tR t^¢t. RO.t]! . RO.R7      tRtR# )ÚGZshTests.test_mutuallyExclusiveCornerCase.<locals>.OddFighterAceOptionsN©r^   r   )ÚanatraNz0Select the Anatra DS as your dogfighter aircraft)ri   ÚfokkerÚalbatrosÚspadÚbristol)r'   r(   r)   r*   ÚoptFlagsr   rX   r,   r   r   r   ÚOddFighterAceOptionsrg   ¢   s!   † ò
 UðˆHñ #Ú#VÐ"WôŒHr   ro   rT   rk   ri   rm   rj   rl   N>   ÚbÚfÚsrl   ri   rj   rm   >   Úarp   rq   rr   rl   rj   rm   rk   >   rs   rq   rr   rl   ri   rj   rk   >   rs   rp   rr   rl   ri   rm   rk   >   rs   rp   rq   ri   rj   rm   rk   )rU   r   rV   r   rD   Úexcludes)r   ro   ra   rb   Úexpecteds   &    r   Ú test_mutuallyExclusiveCornerCaseÚ)ZshTests.test_mutuallyExclusiveCornerCase›   sl   € ô		Ô#<ô 		ñ $Ó%ˆÜ×-Ò-¨d°E¼7»9ÓEˆð ÒNØÒSØÒNØÒNØÒNð
ˆð 	×Ñ˜Ÿ™ hÖ/r   c                ó:  € \        4       p\        P                  ! VR\        4       4      pV P	                  RVP
                  4       V P	                  RVP                  4       V P	                  RVP                  4       V P	                  RVP                  4       R# )z…
We pick up options that are only defined by having an
appropriately named method on your Options class,
e.g. def opt_foo(self, foo)
rT   ÚnocrashÚ
difficultyN)rU   r   rV   r   ÚassertInÚflagNameToDefinitionÚallOptionsNameToDefinitionÚparamNameToDefinition)r   ra   rb   s   &  r   Ú test_accumulateAdditionalOptionsÚ)ZshTests.test_accumulateAdditionalOptionsº   sr   € ô )Ó*ˆÜ×-Ò-¨d°E¼7»9ÓEˆà�‰�i ×!8Ñ!8Ô9Ø�‰�i ×!>Ñ!>Ô?à�‰�l B×$<Ñ$<Ô=Ø�‰�l B×$AÑ$AÖBr   c                ó  €  ! R R\         4      pV P                  \        \        P                  V! 4       R\        4       4        ! R R\         4      pV P                  \        \        P                  V! 4       R\        4       4       R# )zD
Using a parameter/flag name that doesn't exist
will raise an error
c                   ó,   € ] tR t^Ït]! RR/R7      tRtR# )Ú0ZshTests.test_verifyZshNames.<locals>.TmpOptionsÚdetaillN)r_   r   ©r'   r(   r)   r*   r   rX   r,   r   r   r   Ú
TmpOptionsrƒ   Ï   s   † á"¨y¸$Ð.?Ô@ŒHr   r†   rT   c                   ó*   € ] tR t^×t]! R.R7      tRtR# )Ú1ZshTests.test_verifyZshNames.<locals>.TmpOptions2rh   r   N)ÚfooÚbarr…   r   r   r   ÚTmpOptions2rˆ   ×   s   † ñ #°nÐ5EÔFŒHr   r‹   N)rU   ÚassertRaisesÚ
ValueErrorr   rV   r   )r   r†   r‹   s   &  r   Útest_verifyZshNamesÚZshTests.test_verifyZshNamesÉ   sn   € ô	AÔ2ô 	Að 	×ÑÜœ
×8Ñ8¹*»,ÈÌwËyô	
ô	GÔ3ô 	Gð
 	×ÑÜÜ×,Ñ,Ù‹MØÜ‹Iö	
r   c                ó*  € \        4       pV P                  \        P                  RV4       V P                  \        R. RO4       \        4       pV P                  \        VP                  4       V P                  \        VP                  4       4       R# )z\
Generate a completion function, and test the textual output
against a known correct output
r4   ÚargvN)Úsillyr5   r6   r9   )r   r:   r   r;   ÚsysÚSimpleProgOptionsrŒ   rB   r?   rD   ÚtestOutput1Úgetvalue©r   rJ   ra   s   &  r   Útest_zshCodeÚZshTests.test_zshCodeä   sh   € ô
 “Yˆ
Ø�
‰
”5—=‘=Ð"2°JÔ?Ø�
‰
”3˜Ò MÔNÜ Ó"ˆØ×Ñœ* d×&7Ñ&7Ô8Ø×Ñœ j×&9Ñ&9Ó&;Ö<r   c                ó*  € \        4       pV P                  \        P                  RV4       V P                  \        R. RO4       \        4       pV P                  \        VP                  4       V P                  \        VP                  4       4       R# )zm
Generate a completion function with subcommands,
and test the textual output against a known correct output
r4   r‘   N)Úsilly2r5   r6   r9   )r   r:   r   r;   r“   ÚSimpleProgWithSubcommandsrŒ   rB   r?   rD   ÚtestOutput2r–   r—   s   &  r   Útest_zshCodeWithSubsÚZshTests.test_zshCodeWithSubsð   sh   € ô
 “Yˆ
Ø�
‰
”5—=‘=Ð"2°JÔ?Ø�
‰
”3˜Ò NÔOÜ(Ó*ˆØ×Ñœ* d×&7Ñ&7Ô8Ø×Ñœ j×&9Ñ&9Ó&;Ö<r   c                ó,  € \        4       pV P                  \        P                  RV4       \	        4       pV P                  \        VP                  . RO4       VP                  ^ 4       V P                  ^\        VP                  ^4      4      4       R# )z`
Completion still happens even if a command-line is given
that would normally throw UsageError.
r4   N)ú--fokkerÚserverú--unknown-optionz--unknown-option2r6   úzsh:5©r   r:   r   r;   rW   rŒ   rB   r?   rC   rD   rE   rF   r—   s   &  r   Útest_incompleteCommandLineÚ#ZshTests.test_incompleteCommandLineü   ss   € ô
 “Yˆ
Ø�
‰
”5—=‘=Ð"2°JÔ?Ü Ó"ˆà×ÑÜØ×Ñòô	
ð 	�‰˜Ôà×Ñ˜œC 
§¡°Ó 2Ó3Ö4r   c                ón  € \        4       pV P                  \        P                  RV4       \	        4       pV P                  \        VP                  . RO4       VP                  ^ 4       V P                  ^\        VP                  ^4      4      4       VP                  ^ 4       VP                  4        R# )zÕ
Completion still happens even if a command-line is given
that would normally throw UsageError.

The existence of --unknown-option prior to the subcommand
will break subcommand detection... but we complete anyway
r4   N)r¡   r£   r¢   ú--list-serverr6   r¤   )r   r:   r   r;   rW   rŒ   rB   r?   rC   rD   rE   rF   rG   r—   s   &  r   Ú test_incompleteCommandLine_case2Ú)ZshTests.test_incompleteCommandLine_case2  s‹   € ô “Yˆ
Ø�
‰
”5—=‘=Ð"2°JÔ?Ü Ó"ˆà×ÑÜØ×Ñòô	
ð 	�‰˜Ôà×Ñ˜œC 
§¡°Ó 2Ó3Ô4à�‰˜ÔØ×ÑÖr   c                ó,  € \        4       pV P                  \        P                  RV4       \	        4       pV P                  \        VP                  . RO4       VP                  ^ 4       V P                  ^\        VP                  ^4      4      4       R# )z¸
Completion still happens even if a command-line is given
that would normally throw UsageError.

Break subcommand detection in a different way by providing
an invalid subcommand name.
r4   N)r¡   zunknown-subcommandr©   r6   zzsh:4r¥   r—   s   &  r   Ú test_incompleteCommandLine_case3Ú)ZshTests.test_incompleteCommandLine_case34  ss   € ô “Yˆ
Ø�
‰
”5—=‘=Ð"2°JÔ?Ü Ó"ˆà×ÑÜØ×Ñòô
	
ð 	�‰˜Ôà×Ñ˜œC 
§¡°Ó 2Ó3Ö4r   c                ó,  € \        4       pV P                  \        P                  RV4       \	        4       pV P                  \        VP                  . RO4       VP                  ^ 4       V P                  ^\        VP                  ^4      4      4       R# )zi
Ensure the optimization which skips building the subcommand list
under certain conditions isn't broken.
r4   N)z--albar6   r9   r¥   r—   s   &  r   Útest_skipSubcommandListÚ ZshTests.test_skipSubcommandListO  sp   € ô
 “Yˆ
Ø�
‰
”5—=‘=Ð"2°JÔ?Ü Ó"ˆà×ÑÜ˜×)Ñ)Ò+Uô	
ð 	�‰˜Ôà×Ñ˜œC 
§¡°Ó 2Ó3Ö4r   c                ó�   € \        4       p\        P                  ! VRR4      pVP                  R4      pV P	                  VR4       R# )zI
Test corner case fetching an option description from a method docstring
rT   Nr’   )rW   r   rV   ÚgetDescriptionrD   )r   ra   ÚargGenÚdescrs   &   r   Útest_poorlyDescribedOptMethodÚ&ZshTests.test_poorlyDescribedOptMethod_  sB   € ô !Ó"ˆÜ×1Ò1°$¸¸tÓDˆà×%Ñ% gÓ.ˆð 	×Ñ˜ Ö(r   c                óÆ   €  ! R R\         P                  4      p\        4       pV! 4       pV P                  VRV4       V P	                  \
        VP                  . RO4       R# )z]
A C{Completer} with repeat=True may only be used as the
last item in the extraActions list.
c                   ó€   € ] tR tRt]P
                  ! ]P                  ! RR7      ]P                  ! 4       .R7      tRtR# )Ú2ZshTests.test_brokenActions.<locals>.BrokenActionsir  T)Úrepeat)r`   r   N)	r'   r(   r)   r*   r   r   r
   rX   r,   r   r   r   ÚBrokenActionsrº   r  s*   † Ø×(Ò(Ø#Ÿošo°TÔ:¸E¿OºOÓ<MÐNôŒHr   r¼   r4   Nr8   )r   r;   r   r:   rŒ   r�   r?   )r   r¼   rJ   ra   s   &   r   Útest_brokenActionsÚZshTests.test_brokenActionsl  sO   € ô	œEŸM™Mô 	ô
 “Yˆ
Ù‹ˆØ�
‰
�4Ð)¨:Ô6Ø×ÑÜ˜×)Ñ)Ò+Oö	
r   c                óú   €  ! R R\         P                  4      pV! 4       p\        P                  ! VRR4      pV P	                  VP                  R4      R4       V P	                  VP                  R4      R4       R# )	zf
opt_* methods on Options classes should not override the
data provided in optFlags or optParameters.
c                   ó@   a € ] tR tRt o . RO.t. RO.tR tR tRtV t	R# )Ú5ZshTests.test_optMethodsDontOverride.<locals>.Optionsi„  Nc                ó   € R# ©zjunk descriptionNr   ©r   s   &r   Úopt_flagÚ>ZshTests.test_optMethodsDontOverride.<locals>.Options.opt_flagˆ  ó   ‚ r   c                ó   € R# rÃ   r   )r   Úparams   &&r   Ú	opt_paramÚ?ZshTests.test_optMethodsDontOverride.<locals>.Options.opt_param‹  rÇ   r   r   )Úflagrq   úA flag)rÉ   ÚpNúA param)
r'   r(   r)   r*   rn   ÚoptParametersrÅ   rÊ   r,   r-   r.   s   @r   r;   rÁ   „  s$   ø‡ € Ú/Ð0ˆHÚ<Ð=ˆMò'÷'ð 'r   r;   rT   NrÌ   rÍ   rÉ   rÏ   )r   r;   r   rV   rD   r³   )r   r;   ra   r´   s   &   r   Útest_optMethodsDontOverrideÚ$ZshTests.test_optMethodsDontOverride~  se   € ô	'”e—m‘mô 	'ñ ‹yˆÜ×1Ò1°$¸¸tÓDˆà×Ñ˜×.Ñ.¨vÓ6¸ÔAØ×Ñ˜×.Ñ.¨wÓ7¸ÖCr   r   N)r'   r(   r)   r*   r+   rc   rv   r   rŽ   r˜   rž   r¦   rª   r­   r°   r¶   r½   rÑ   r,   r-   r.   s   @r   rR   rR      sT   ø‡ € ñòSò.0ò>Cò
ò6
=ò
=ò5ò2ò>5ò65ò )ò
÷$Dð Dr   rR   c                   ó&   a € ] tR tRt o R tRtV tR# )ÚEscapeTestsi•  c                óŽ   € \         P                  pRpV P                  V! V4      R4       RpV P                  V! V4      R4       R# )z%
Verify _shellcomp.escape() function
Ú$z'$'zA--'$"\`--Bz"A--'\$\"\\\`--B"N)r   ÚescaperD   )r   Úescr%   s   &  r   Útest_escapeÚEscapeTests.test_escape–  sB   € ô ×ÑˆàˆØ×Ñ™˜T› EÔ*àˆØ×Ñ™˜T›Ð$=Ö>r   r   N)r'   r(   r)   r*   rÙ   r,   r-   r.   s   @r   rÔ   rÔ   •  s   ø‡ € ÷
?ð 
?r   rÔ   c                   ó*   a € ] tR tRt o RtR tRtV tR# )ÚCompleterNotImplementedTestsi£  zš
Test that using an unknown shell constant with SubcommandAction
raises NotImplementedError

The other Completer() subclasses are tested in test_usage.py
c                ót   € \         P                  ! 4       pV P                  \        VP                  RR4       R# )z=
Using an unknown shellType should raise NotImplementedError
NÚbad_shell_type)r   ÚSubcommandActionrŒ   ÚNotImplementedErrorÚ
_shellCode)r   Úactions   & r   Útest_unknownShellÚ.CompleterNotImplementedTests.test_unknownShell«  s0   € ô ×,Ò,Ó.ˆà×ÑÜ ×!2Ñ!2°DÐ:Jö	
r   r   N)r'   r(   r)   r*   r+   rã   r,   r-   r.   s   @r   rÜ   rÜ   £  s   ø‡ € ñ÷
ð 
r   rÜ   c                   ó.   € ] tR tRtRt. RO.t. RO.tRtR# )ÚFighterAceServerOptionsi¶  z,
Options for FighterAce 'server' subcommand
Nr   )zlist-serverNz3List this server with the online FighterAce network)zpackets-per-secondNz+Number of update packets to send per secondÚ20)r'   r(   r)   r*   r+   rn   rÐ   r,   r   r   r   ræ   ræ   ¶  s    † ñò
 	Uð€Hò	
ð„Mr   ræ   c            
       óÎ   a € ] tR tRt o Rt. RO. RO. RO. RO. RO. RO. RO.t. RO. RO.tRR]R..t]	! RR	RR
/R.. RO.R]
! R.4      /]! RR7      .R7      tR tV 3R ltRtV tR# )rW   iÈ  z:
Command-line options for an imaginary `Fighter Ace` game
ÚphysicsÚverboseNÚdetailr¢   zStart FighterAce game-server.zTwisted-PhysicszRendering detail levelÚ12345zsaved game file to load©rµ   ©rY   r\   r^   r_   r`   c                ó   € R# )r5   Nr   rÄ   s   &r   Ú	opt_sillyÚFighterAceOptions.opt_sillyè  rÇ   r   c                ó’   <€ V ^8„  d   Qh/ S[ S[ S[S[,          ,          ,          ;R&   S[ S[ S[S[,          ,          ,          ;R&   # )é   rn   rÐ   )r   r   Ústr)Úformatr/   s   "€r   Ú__annotate__ÚFighterAceOptions.__annotate__È  s?   ø‡ ‚ ñ
 ‘4™¡�Õ&Õ'ñ ñ ñ ™™X¡c�]Õ+Õ,ñ ò r   r   )rj   rq   z2Select the Fokker Dr.I as your dogfighter aircraft)rk   rs   z5Select the Albatros D-III as your dogfighter aircraft)rl   rr   z1Select the SPAD S.VII as your dogfighter aircraft)rm   rp   z4Select the Bristol Scout as your dogfighter aircraft)ré   rÎ   z$Enable secret Twisted physics engine)ÚjamÚjz6Enable a small chance that your machine guns will jam!©rê   Úvz1Verbose logging (may be specified more than once))z
pilot-nameNzWhat's your name, Ace?zManfred von Richthofen)rë   Údz*Select the level of rendering detail (1-5)Ú3)rj   rk   rl   rm   )r'   r(   r)   r*   r+   rn   rÐ   ræ   r7   r   r	   r   rX   rð   Ú__annotate_func__r,   r-   r.   s   @r   rW   rW   È  sŸ   ø‡ € ñò
 	NÚRÚJÚPÚ@ÚNÚMð+€Hò 	QÚJð0€Mð 
�4Ð0Ð2QÐRð€Kñ ØÐ!2°HÐ>VÐWØ�ÚDÐEØ™lÐ,?Ð+@ÓAÐBÙ#Ð*CÔDÐEô€Hò÷A ƒ r   rW   c                   ón   a € ] tR tRt o Rt. RO.t. RO.t]! RR/R]! RR7      /R	7      t	R
 t
R tRtV tR# )rU   ií  z³
Extend the options and zsh metadata provided by FighterAceOptions.
_shellcomp must accumulate options and metadata from all classes in the
hiearchy so this is important to test.
ú	no-stallsNúreality-levelzCan't stall your planezPhysics reality levelrí   )rY   r_   c                ó   € R# )z(
Select that you can't crash your plane
Nr   rÄ   s   &r   Úopt_nocrashÚ%FighterAceExtendedOptions.opt_nocrashþ  rÇ   r   c                ó   € R# )z
How tough are you? (1-10)
Nr   )r   rz   s   &&r   Úopt_difficultyÚ(FighterAceExtendedOptions.opt_difficulty  rÇ   r   r   )r   Nz+Turn off the ability to stall your aircraft)r  Nz)Select the level of physics reality (1-5)Ú5)r'   r(   r)   r*   r+   rn   rÐ   r   r
   rX   r  r  r,   r-   r.   s   @r   rU   rU   í  sQ   ø‡ € ñò SÐS€HâQð€Mñ Ø!Ð#;Ð<Ø#¡YÐ5LÔ%MÐNô€Hò
÷
ð r   rU   c                  ó    € \        . RORR7      # )Ú1zAccuracy'`?rí   )r
  Ú2rý   )r	   r   r   r   Ú_accuracyActionr  	  s   € äš¨}Ô=Ð=r   c                   ó¦   a € ] tR tRt o Rt. RO. RO. RO.t. RO. RO.t]! RR	RR
/R.RR..R]! . RORR7      R]	/]
! RR7      .R7      tR tRtV tR# )r”   i  z6
Command-line options for a `Silly` imaginary program
ÚcolorÚgrayrê   ÚoptimizationNÚaccuracyzColor onzOptimization levelzOptimization?rí   zoutput filerî   c                ó   € R# )z=
usage.Options does not recognize single-letter opt_ methods
Nr   rÄ   s   &r   Úopt_XÚSimpleProgOptions.opt_X+  rÇ   r   r   )r  ÚczTurn on color output)r  ÚgzTurn on gray-scale outputrú   )r  Nr  z&Select the level of optimization (1-5))r  rs   rý   z"Select the level of accuracy (1-3))r
  r  rý   Ú4r  )r'   r(   r)   r*   r+   rn   rÐ   r   r	   r  r   rX   r  r,   r-   r.   s   @r   r”   r”     s‡   ø‡ € ñò
 	/Ú2ÚMð€Hò 	NÚDð€Mñ
 Ø˜z¨>Ð;OÐPØ�Ø# VÐ,Ð-à™LÚ)°ôð ˜ð	
ñ $¨-Ô8Ð9ô€H÷ð r   r”   c                   ó    € ] tR tRt. RO.tRtR# )ÚSimpleProgSub1i1  r   N)úsub-optrr   zSub Opt One©r'   r(   r)   r*   rn   r,   r   r   r   r  r  1  ó
   † Ú/Ð0„Hr   r  c                   ó    € ] tR tRt. RO.tRtR# )ÚSimpleProgSub2i5  r   N)r  rr   zSub Opt Twor  r   r   r   r  r  5  r  r   r  c                   óP   € ] tR tRtR.RR..tR.RR.. RO.tRR	]R
.RR	]R..tRt	R	# )rœ   i9  zsome-optionzother-optionrK   z
some-paramzother-paramrÎ   Úsub1NzSub Command 1Úsub2zSub Command 2r   )zanother-paramÚPzYet Another Param)
r'   r(   r)   r*   rn   rÐ   r  r  r7   r,   r   r   r   rœ   rœ   9  sM   † Ø� .°#Ð!6Ð7€Hð 
ˆØ	˜ÐÚ3ð€Mð 
��~ Ð7Ø	��~ Ð7ð„Kr   rœ   sº  #compdef silly

_arguments -s -A "-*" \
':output file (*):_files -g "*"' \
"(--accuracy)-a[Select the level of accuracy (1-3)]:Accuracy'\`?:(1 2 3)" \
"(-a)--accuracy=[Select the level of accuracy (1-3)]:Accuracy'\`?:(1 2 3)" \
'(--color --gray -g)-c[Color on]' \
'(--gray -c -g)--color[Color on]' \
'(--color --gray -c)-g[Turn on gray-scale output]' \
'(--color -c -g)--gray[Turn on gray-scale output]' \
'--help[Display this help and exit.]' \
'--optimization=[Optimization level]:Optimization?:(1 2 3 4 5)' \
'*-v[Verbose logging (may be specified more than once)]' \
'*--verbose[Verbose logging (may be specified more than once)]' \
'--version[Display Twisted version and exit.]' \
&& return 0
s×  #compdef silly2

_arguments -s -A "-*" \
'*::subcmd:->subcmd' \
':output file (*):_files -g "*"' \
"(--accuracy)-a[Select the level of accuracy (1-3)]:Accuracy'\`?:(1 2 3)" \
"(-a)--accuracy=[Select the level of accuracy (1-3)]:Accuracy'\`?:(1 2 3)" \
'(--another-param)-P[another-param]:another-param:_files' \
'(-P)--another-param=[another-param]:another-param:_files' \
'(--color --gray -g)-c[Color on]' \
'(--gray -c -g)--color[Color on]' \
'(--color --gray -c)-g[Turn on gray-scale output]' \
'(--color -c -g)--gray[Turn on gray-scale output]' \
'--help[Display this help and exit.]' \
'--optimization=[Optimization level]:Optimization?:(1 2 3 4 5)' \
'(--other-option)-o[other-option]' \
'(-o)--other-option[other-option]' \
'(--other-param)-p[other-param]:other-param:_files' \
'(-p)--other-param=[other-param]:other-param:_files' \
'--some-option[some-option]' \
'--some-param=[some-param]:some-param:_files' \
'*-v[Verbose logging (may be specified more than once)]' \
'*--verbose[Verbose logging (may be specified more than once)]' \
'--version[Display Twisted version and exit.]' \
&& return 0
local _zsh_subcmds_array
_zsh_subcmds_array=(
"sub1:Sub Command 1"
"sub2:Sub Command 2"
)

_describe "sub-command" _zsh_subcmds_array
)%r+   r“   Úior   Útypingr   r   Útwisted.pythonr   r   r   Útwisted.python.usager   r	   r
   r   Útwisted.trialr   r   r   r1   r   ÚTestCaserR   rÔ   rÜ   r;   ræ   rW   rU   r  r”   r  r  rœ   r•   r�   r   r   r   Ú<module>r)     sþ   ðñó
 Ý ß !ç 5Ñ 5ß TÓ TÝ "ô5˜ô 5ô,Ð#4õ ò&AôHSDˆx× Ñ ô SDôl?�(×#Ñ#ô ?ô
 8×#4Ñ#4ô 
ô&˜eŸm™mô ô$"˜Ÿ™ô "ôJÐ 1ô ò8>ô
 ˜Ÿ™ô  ôF1�U—]‘]ô 1ô1�U—]‘]ô 1ôÐ 1ô ð€ð& ‚r   