+
    SpjE                    z   ^ RI Ht ^ RIt^ RIHt ^ RIHt ^ RIt^ RIt^ RIt^ RI	H
t
 ^ RI	Ht ^ RI	Ht ^ RI	Ht ^R	IHt ^ RIt^ R
IHt ^ RIHt Rt] ! R R4      4       tR R lt ! R R4      t ! R R4      t ! R R]P6                  4      t ! R R]P:                  4      t ! R R]P>                  4      t R# )    )annotationsN)Callable)Sequence)Any)final)Literal)NoReturn)
UsageError)NOTSET)check_ispytestfile_or_dirc                      ] tR t^tRtRRRRR/R R lllt]R R	 l4       t]P                  R
 R l4       tR R lt	RR R llt
R R ltRR R lltRR R lltRR R lltR]3RR/R R llltRtR# ) ParserzParser for command line arguments and config-file values.

:ivar extra_info: Dict of generic param -> value to display in case
    there's an error processing the command line arguments.
Nprog	_ispytestFc          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
   usage
str | None
processoptz!Callable[[Argument], None] | Noner   r   boolreturnNone )formats   "@/tmp/pip-target-d46v3snk/lib/python/_pytest/config/argparsing.py__annotate__Parser.__annotate__    s<     / // 6/
 / / 
/    c               	t   \        V4       ^ RIHp W n        / V n        \        WP                  VR7      V n        V P                  P                  R4      p\        VRV RR7      V n	        V P                  .V n
        / V n        V P                  P                  \        RR7      pWWn        / V n        / V n        R	# )
r   )filescompleter)r   zCustom options
_anonymousTr   *)nargsN)r   _pytest._argcompleter!   _processopt
extra_infoPytestArgumentParser	optparseradd_argument_groupOptionGroupr"   _groups	_opt2destadd_argumentFILE_OR_DIR	completer_inidict_ini_aliases)selfr   r   r   r   r!   anonymous_arggroupfile_or_dir_args   &&&$$   r   __init__Parser.__init__    s     	y!7%*,-e__4P!^^>>?OP%dd
 ()+..55k5M$2!9;,.r   c                   V ^8  d   QhRR/# r   r   strr   )r   s   "r   r   r   >   s     # #c #r   c                	.    V P                   P                  # Nr*   r   r4   s   &r   r   Parser.prog=   s    ~~"""r   c                    V ^8  d   QhRRRR/# )r   valuer;   r   r   r   )r   s   "r   r   r   B   s     $ $# $$ $r   c                	&    WP                   n        R # r=   r>   )r4   rB   s   &&r   r   r@   A   s    #r   c                    V ^8  d   QhRRRR/# )r   optionArgumentr   r   r   )r   s   "r   r   r   E   s     ) )H ) )r   c                	x    V P                   '       d(   VP                  '       d   V P                  V4       R # R # R # r=   )r'   dest)r4   rE   s   &&r   processoptionParser.processoptionE   s/    {{{  (  r   c               (    V ^8  d   QhRRRRRRRR/# )r   namer;   descriptionafterr   r   r,   r   )r   s   "r   r   r   J   s,      &)7A	r   c                   V P                    F  pVP                  V8X  g   K  Vu # 	  V P                  P                  T;'       g    T4      p\	        WQV RR7      p^ p\        V P                   4       F  w  rgVP                  V8X  g   K   M	  V P                   P                  V^,           V4       V P                  P                  P                  V^,           V P                  P                  P                  4       4       V# )a  Get (or create) a named option Group.

:param name: Name of the option group.
:param description: Long description for --help output.
:param after: Name of another group, used for ordering --help output.
:returns: The option group.

The returned group object has an ``addoption`` method with the same
signature as :func:`parser.addoption <pytest.Parser.addoption>` but
will be shown in the respective group in the output of
``pytest --help``.
Tr#   )	r-   rL   r*   r+   r,   	enumerateinsert_action_groupspop)r4   rL   rM   rN   grouparggroupigrps   &&&&    r   getgroupParser.getgroupJ   s     \\EzzT! " >>44[5H5HDIHDDA-FAxx5  . 	AE5) 	%%,,QUDNN4Q4Q4U4U4WXr   c               $    V ^8  d   QhRRRRRR/# r   optsr;   attrsr   r   r   r   )r   s   "r   r   r   i   s!     2 2s 2S 2T 2r   c                >    V P                   P                  ! V/ VB  R# )a  Register a command line option.

:param opts:
    Option names, can be short or long options.
:param attrs:
    Same attributes as the argparse library's :meth:`add_argument()
    <argparse.ArgumentParser.add_argument>` function accepts.

After command line parsing, options are available on the pytest config
object via ``config.option.NAME`` where ``NAME`` is usually set
by passing a ``dest`` attribute, for example
``addoption("--long", dest="NAME", ...)``.
N)r"   	addoptionr4   r\   r]   s   &*,r   r_   Parser.addoptioni   s     	!!4151r   c               $    V ^8  d   QhRRRRRR/# r   args Sequence[str | os.PathLike[str]]	namespaceargparse.Namespace | Noner   argparse.Namespacer   )r   s   "r   r   r   y   s(     , ,., -, 
	,r   c                   ^ RI Hp V! V P                  4       V Uu. uF  p\        P                  ! V4      NK  	  ppVf   \
        P                  ! 4       p RVn        V P                  P                  WRR7      V=# u upi   T=i ; i)zParse the arguments.

Unlike ``parse_known_args`` and ``parse_known_and_unknown_args``,
raises PrintHelp on `--help` and UsageError on unknown flags

:meta private:
)try_argcompleteTrf   )	r&   rj   r*   osfspathargparse	Namespace_raise_print_helpparse_intermixed_args)r4   rd   rf   rj   xstrargss   &&&   r   parseParser.parsey   sz     	9')-.A299Q<. **,I	,*.I'>>777U+ / +s   A="B Bc               $    V ^8  d   QhRRRRRR/# rc   r   )r   s   "r   r   r      s-     	O 	O.	O -	O 
		Or   c                4    V P                  WR7      ^ ,          # )zRParse the known arguments at this point.

:returns: An argparse namespace object.
rk   )parse_known_and_unknown_args)r4   rd   rf   s   &&&r   parse_known_argsParser.parse_known_args   s     000KANNr   c               $    V ^8  d   QhRRRRRR/# )r   rd   re   rf   rg   r   z$tuple[argparse.Namespace, list[str]]r   )r   s   "r   r   r      s-     R R.R -R 
.	Rr   c                   V Uu. uF  p\         P                  ! V4      NK  	  pp\        P                  R8  g!   R\        P                  u;8:  d   R8  do   M MkV P                  P                  WB4      w  r%Vf   Q h\        V\        4      p. pV F-  pVP                  R4      '       d   TMTP                  V4       K/  	  W'3# V P                  P                  WB4      # u upi )zParse the known arguments at this point, and also return the
remaining unknown flag arguments.

:returns:
    A tuple containing an argparse namespace object for the known
    arguments, and a list of unknown flag arguments.
-)         )r~      )r~   r      )rl   rm   sysversion_infor*   ry   getattrr0   
startswithappendparse_known_intermixed_args)	r4   rd   rf   rr   rs   unknownr   unknown_flagsargs	   &&&      r   rx   #Parser.parse_known_and_unknown_args   s     *..A299Q<.j(Gs7G7G,T*,T!%!@!@!TI(((!)[9K')M"%.."5"5;NNsS ++>>==gQQ /s   C!aliasesc               0    V ^8  d   QhRRRRRRRRRR	R
R/# )r   rL   r;   helptypezYLiteral['string', 'paths', 'pathlist', 'args', 'linelist', 'bool', 'int', 'float'] | Nonedefaultr   r   Sequence[str]r   r   r   )r   s   "r   r   r      sN     P, P,P, P,	P, P, P, 
P,r   c               @   VR9   g   Q hVf   RpV\         J d   \        V4      pW#V3V P                  V&   V Fb  pW`P                  9   d   \        RV: R24      hV P                  P                  V4      ;pe   \        V: RV: 24      hWP                  V&   Kd  	  R# )a  Register a configuration file option.

:param name:
    Name of the configuration.
:param type:
    Type of the configuration. Can be:

        * ``string``: a string
        * ``bool``: a boolean
        * ``args``: a list of strings, separated as in a shell
        * ``linelist``: a list of strings, separated by line breaks
        * ``paths``: a list of :class:`pathlib.Path`, separated as in a shell
        * ``pathlist``: a list of ``py.path``, separated as in a shell
        * ``int``: an integer
        * ``float``: a floating-point number

        .. versionadded:: 8.4

            The ``float`` and ``int`` types.

    For ``paths`` and ``pathlist`` types, they are considered relative to the config-file.
    In case the execution is happening without a config-file defined,
    they will be considered relative to the current working directory (for example with ``--override-ini``).

    .. versionadded:: 7.0
        The ``paths`` variable type.

    .. versionadded:: 8.1
        Use the current working directory to resolve ``paths`` and ``pathlist`` in the absence of a config-file.

    Defaults to ``string`` if ``None`` or not passed.
:param default:
    Default value if no config-file option exists but is queried.
:param aliases:
    Additional names by which this option can be referenced.
    Aliases resolve to the canonical name.

    .. versionadded:: 9.0
        The ``aliases`` parameter.

The value of configuration keys can be retrieved via a call to
:py:func:`config.getini(name) <pytest.Config.getini>`.
Nstringzalias z- conflicts with existing configuration optionz is already an alias of )	Nr   pathspathlistrd   linelistr   intfloat)r   get_ini_default_for_typer2   
ValueErrorr3   get)r4   rL   r   r   r   r   aliasalreadys   &&&&&$  r   addiniParser.addini   s    n  

 

 
	
 

 <Df.t4G#73dE% UI%RS   ,,0077D E9,DWK!PQQ'+e$ r   )r"   r-   r3   r2   r.   r'   r(   r*   )NN) Nr=   r   )__name__
__module____qualname____firstlineno____doc__r7   propertyr   setterrI   rX   r_   rt   ry   rx   r   r   __static_attributes__r   r   r   r   r      s    /
  /  / /: # # 
[[$ $)
>2 ,0	OR@ P, "$P, P,r   r   c                    V ^8  d   QhRRRR/# )r   r   zRLiteral['string', 'paths', 'pathlist', 'args', 'linelist', 'bool', 'int', 'float']r   r   r   )r   s   "r   r   r     s        		r   c                N    V R9   d   . # V R8X  d   R# V R8X  d   ^ # V R8X  d   R# R# )zg
Used by addini to get the default value for a given config option type, when
default is not supplied.
r   Fr   r   g        r   )r   r   rd   r   r   )r   s   &r   r   r     s3     88				r   c                      ] tR tRtRtR R ltR R ltR R lt]R	 R
 l4       t	]R R l4       t
]R R l4       tR R ltRtR# )rF   i  z$An option defined in an OptionGroup.c                    V ^8  d   QhRRRR/# )r   actionargparse.Actionr   r   r   )r   s   "r   r   Argument.__annotate__   s       4 r   c                	    Wn         R # r=   _action)r4   r   s   &&r   r7   Argument.__init__   s    r   c                   V ^8  d   QhRR/# )r   r   dict[str, Any]r   )r   s   "r   r   r   #  s     % %~ %r   c                	.    V P                   P                  # r=   )r   __dict__r?   s   &r   r]   Argument.attrs#  s    ||$$$r   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r   &  s     + +} +r   c                	.    V P                   P                  # r=   )r   option_stringsr?   s   &r   namesArgument.names&  s    ||***r   c                   V ^8  d   QhRR/# r:   r   )r   s   "r   r   r   *  s     ! !c !r   c                	.    V P                   P                  # r=   )r   rH   r?   s   &r   rH   Argument.dest)      ||   r   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r   .  s     $ $ $r   c                	.    V P                   P                  # r=   )r   r   r?   s   &r   r   Argument.default-  s    ||###r   c                   V ^8  d   QhRR/# )r   r   z
Any | Noner   )r   s   "r   r   r   2  s     ! !j !r   c                	.    V P                   P                  # r=   )r   r   r?   s   &r   r   Argument.type1  r   r   c                   V ^8  d   QhRR/# r:   r   )r   s   "r   r   r   5  s     
6 
6# 
6r   c                	   \        V R R4      pVf   R# . pVR\        V P                  4       4      ,           .,          pVR\        V P                  4      ,           .,          pVP                  '       d%   VR\        V P                  4      ,           .,          pVR\        V P
                  4      ,           .,          pRP                  RP                  V4      4      # )	r   NzArgument(<uninitialized>)zopts: zdest: ztype: z	default: zArgument({}), )r   reprr   rH   r   r   r   join)r4   r   rd   s   &  r   __repr__Argument.__repr__5  s    y$/>.D..//DO+,,;;;XTYY/00DtDLL1122$$TYYt_55r   r   N)r   r   r   r   r   r7   r]   r   r   rH   r   r   r   r   r   r   r   rF   rF     sZ    .%+ ! ! $ $ ! !
6 
6r   rF   c                  N    ] tR tRtRtRR R lltR R ltR R ltR	 R
 ltRt	R# )r,   iB  z,A group of options shown in its own section.c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   rU   zargparse._ArgumentGrouprL   r;   parserzParser | Noner   r   r   r   r   )r   s   "r   r   OptionGroup.__annotate__E  s<      )  	
  
r   c                	N    \        V4       Wn        W n        . V n        W0n        R # r=   )r   	_arggrouprL   optionsr   )r4   rU   rL   r   r   s   &&&&&r   r7   OptionGroup.__init__E  s"     	y!!	')r   c               $    V ^8  d   QhRRRRRR/# r[   r   )r   s   "r   r   r   R  s&     A As AS AT Ar   c                    \        V4      P                  R V P                   4       4      pV'       d   \        RV R24      hV P	                  WRR7       R# )a;  Add an option to this group.

If a shortened version of a long option is specified, it will
be suppressed in the help. ``addoption('--twowords', '--two-words')``
results in help showing ``--two-words`` only, but ``--twowords`` gets
accepted **and** the automatic destination is in ``args.twowords``.

:param opts:
    Option names, can be short or long options.
    Note that lower-case short options (e.g. `-x`) are reserved.
:param attrs:
    Same attributes as the argparse library's :meth:`add_argument()
    <argparse.ArgumentParser.add_argument>` function accepts.
c              3  P   "   T F  qP                  4        F  q"x  K  	  K  	  R # 5ir=   )r   ).0optrL   s   &  r   	<genexpr>(OptionGroup.addoption.<locals>.<genexpr>a  s      *
(SYY[TD[DLs   $&zoption names z already addedFallow_reservedN)setintersectionr   r   _addoption_inner)r4   r\   r]   conflicts   &*, r   r_   OptionGroup.addoptionR  sU     t9)) *
 LL*
 
 }XJnEFFd%@r   c               $    V ^8  d   QhRRRRRR/# r[   r   )r   s   "r   r   r   h  s&     @ @ @c @d @r   c                ,    V P                  WRR7       R# )zuLike addoption(), but also allows registering short lower case options (e.g. -x),
which are reserved for pytest core.Tr   N)r   r`   s   &*,r   
_addoptionOptionGroup._addoptionh  s     	d$?r   c               (    V ^8  d   QhRRRRRRRR/# )	r   r\   ztuple[str, ...]r]   r   r   r   r   r   r   )r   s   "r   r   r   m  s,     . .#.,:.LP.	.r   c                	   V'       gT   V FM  p\        V4      ^8  g   K  V^ ,          R8X  g   K%  V^,          P                  4       '       g   KD  \        R4      h	  V P                  P                  ! V/ VB p\        V4      pV P                  P                  V4       V P                  '       dX   VP                  4        F&  pVP                  V P                  P                  V&   K(  	  V P                  P                  V4       R# R# )r   r}   z$lowercase short options are reservedN)lenislowerr   r   r/   rF   r   r   r   r   rH   r.   rI   )r4   r\   r]   r   r   r   rE   rL   s   &&&&    r   r   OptionGroup._addoption_innerm  s     s8q=SVs]s1v~~7G7G$%KLL  ,,d<e<&!F#;;;.4kk%%d+ 'KK%%f- r   )r   rL   r   r   N)F)
r   r   r   r   r   r7   r_   r   r   r   r   r   r   r,   r,   B  s     6A,@
. .r   r,   c                  B   a  ] tR tRtRR/R V 3R llltR R ltRtV ;t# )	r)   i~  r   Nc               (    V ^8  d   QhRRRRRRRR/# )r   r   r   r(   zdict[str, str]r   r   r   r   )r   s   "r   r   !PytestArgumentParser.__annotate__  s2     % %% #%
 % 
%r   c          	     	F   < \         SV `  VVR \        R RR7       W n        R# )F@)r   r   add_helpformatter_classallow_abbrevfromfile_prefix_charsN)superr7   DropShorterLongHelpFormatterr(   )r4   r   r(   r   	__class__s   &&&$r   r7   PytestArgumentParser.__init__  s0     	8"% 	 	
 %r   c                    V ^8  d   QhRRRR/# )r   messager;   r   r	   r   )r   s   "r   r   r     s     	4 	4S 	4X 	4r   c           	        V P                    RV 2pV P                  '       dH   VRRP                  R \        V P                  P	                  4       4       4       4      ,           ,          p\        V P                  4       V,           4      h)z1Transform argparse error message into UsageError.z	: error: 
c              3  6   "   T F  w  rR V RV 2x  K  	  R# 5i)z  z: Nr   )r   kvs   &  r   r   -PytestArgumentParser.error.<locals>.<genexpr>  s"      $*I$!"QCr!*Is   )r   r(   r   sorteditemsr
   format_usage)r4   r   msgs   && r   errorPytestArgumentParser.error  sw     9WI.???4$)) $*01F1F1H*I$   C **,s233r   )r(   )r   r   r   r   r7   r  r   __classcell__r   s   @r   r)   r)   ~  s!    %
  % %&	4 	4r   r)   c                  P   a  ] tR tRtRtR V 3R lltR V 3R lltR R ltR	tV ;t	# )
r   i  zShorten help for long options that differ only in extra hyphens.

- Collapse **long** options that are the same except for extra hyphens.
- Shortcut if there are only two options and one of them is a short one.
c               $    V ^8  d   QhRRRRRR/# )r   rd   r   kwargsr   r   r   )r   s   "r   r   )DropShorterLongHelpFormatter.__annotate__  s!     * *c *S *T *r   c                	x   < R V9  d"   \         P                  P                  4       VR &   \        SV `  ! V/ VB  R# )widthN)_pytest_ioget_terminal_widthr   r7   )r4   rd   r  r   s   &*,r   r7   %DropShorterLongHelpFormatter.__init__  s3    & %kk<<>F7O$)&)r   c                    V ^8  d   QhRRRR/# )r   r   r   r   r;   r   )r   s   "r   r   r    s     & & &C &r   c                	R  < \         S	V `  V4      pV'       d   V^ ,          R8w  d   V# VP                  R4      p\        V4      ^8X  d1   \        V^ ,          4      ^8X  g   \        V^,          4      ^8X  d   V# . p/ pV F  p\        V4      ^8X  g   V^,          R8X  d   K#  VP	                  R4      '       g   Q RV R24       hVR,          pVP                  RR4      pW9  g"   \        WX,          4      \        V4      8  g   K  WuV&   K  	  V F  p\        V4      ^8X  g   V^,          R8X  d   VP                  V4       VR,          VP                  VP                  RR4      4      8X  g   Ka  VP                  VP                  RR	^4      4       K  	  RP                  V4      # )
r   r}   r    z--z&long optional argument without "--": []:r   NNr   =)	r   _format_action_invocationsplitr   r   replacer   r   r   )
r4   r   orgstrr   return_list
short_longrE   xxoption	shortenedr   s
   &&       r   r  6DropShorterLongHelpFormatter._format_action_invocation  s~   26:fQi3&M,,t$w<1#gaj/Q"6#gaj/Q:NM%'
F6{a6!9#3$$T** 8B* bzH ((b1I*c*2G.H3L / )19%  F6{a6!9#3""6*bzZ^^FNN3,CDD""6>>#sA#>?	 
 yy%%r   c               $    V ^8  d   QhRRRRRR/# )r   textr;   r  r   r   z	list[str]r   )r   s   "r   r   r    s!       S Y r   c                    . pVP                  4        F7  pVP                  \        P                  ! VP	                  4       V4      4       K9  	  V# )zmWrap lines after splitting on original newlines.

This allows to have explicit line breaks in the help text.
)
splitlinesextendtextwrapwrapstrip)r4   r%  r  lineslines   &&&  r   _split_lines)DropShorterLongHelpFormatter._split_lines  s<    
 OO%DLLtzz|U;< &r   r   )
r   r   r   r   r   r7   r  r.  r   r
  r  s   @r   r   r     s&    * *& &> r   r   c                  B   a  ] tR tRtRtRR V 3R llltR R ltRtV ;t# )	OverrideIniActioni  zCustom argparse action that makes a CLI flag equivalent to overriding an
option, in addition to behaving like `store_true`.

This can simplify things since code only needs to inspect the config option
and not consider the CLI flag.
c               0    V ^8  d   QhRRRRRRRRRRR	R
/# )r   r   r   rH   r;   r%   zint | str | None
ini_option	ini_valuer   r   r   )r   s   "r   r   OverrideIniAction.__annotate__  sF     # #%# #  	# # # 
#r   c               	J   < \         SV `  ! W^ .VO5/ VB  W@n        WPn        R# )r   N)r   r7   r3  r4  )	r4   r   rH   r%   r3  r4  rd   r  r   s	   &&&&$$*,r   r7   OverrideIniAction.__init__  s(     	qB4B6B$"r   c               $    V ^8  d   QhRRRRRR/# )r   r   zargparse.ArgumentParserrf   rh   r   r   r   )r   s   "r   r   r5    s(     > >'> &> 
>r   c                	    \        W P                  R 4       \        VRR4      pVf   . pVP                  V P                   RV P
                   24       \        VRV4       R# )Toverride_iniNr  )setattrrH   r   r   r3  r4  )r4   r   rf   rd   r  current_overridess   &&&*, r   __call__OverrideIniAction.__call__  s]     		99d+#I~tD$ "  DOO#4Adnn5E!FG	>+<=r   )r3  r4  r=   )	r   r   r   r   r   r7   r=  r   r
  r  s   @r   r1  r1    s    # #> >r   r1  )!
__future__r   rn   collections.abcr   r   rl   r   r)  typingr   r   r   r	   
exceptionsr
   _pytest._ior  _pytest.compatr   _pytest.deprecatedr   r0   r   r   rF   r,   ArgumentParserr)   HelpFormatterr   Actionr1  r   r   r   <module>rI     s    "  $ $ 	 
      "  ! -  l, l, l,^*"6 "6J9. 9.x4822 4@48#9#9 4n"> ">r   