
    i                     n    S r SSKJrJr  SSKrSrSrSrS rS r	S	 r
S
\\\4   4S jrS
\\\4   4S jrg)zThese decorators provide function metadata to Python Fire.

SetParseFn and SetParseFns allow you to set the functions Fire uses for parsing
command line arguments to client code.
    )AnyDictNFIRE_METADATAFIRE_PARSE_FNSACCEPTS_POSITIONAL_ARGSc                    ^ ^ UU 4S jnU$ )a^  Sets the fn for Fire to use to parse args when calling the decorated fn.

Args:
  fn: The function to be used for parsing arguments.
  *arguments: The arguments for which to use the parse fn. If none are listed,
    then this will set the default parse function.
Returns:
  The decorated function, which now has metadata telling Fire how to perform.
c                 |   > [        U 5      nT(       d  TUS'   OT H  nTUS   U'   M     [        U [        U5        U $ )Ndefaultnamed)GetParseFns_SetMetadatar   )func	parse_fnsargument	argumentsfns      O/var/www/html/banglarbhumi/venv/lib/python3.13/site-packages/fire/decorators.py
_DecoratorSetParseFn.<locals>._Decorator'   sD    D!Ii	(')	'8$  ~y1K     )r   r   r   s   `` r   
SetParseFnr      s     
r   c                     ^ ^ UU 4S jnU$ )a  Set the fns for Fire to use to parse args when calling the decorated fn.

Returns a decorator, which when applied to a function adds metadata to the
function telling Fire how to turn string command line arguments into proper
Python arguments with which to call the function.

A parse function should accept a single string argument and return a value to
be used in its place when calling the decorated function.

Args:
  *positional: The functions to be used for parsing positional arguments.
  **named: The functions to be used for parsing named arguments.
Returns:
  The decorated function, which now has metadata telling Fire how to perform.
c                 r   > [        U 5      nTUS'   US   R                  T5        [        U [        U5        U $ )N
positionalr   )r   updater   r   )r   r   r   r   s     r   r   SetParseFns.<locals>._DecoratorD   s:    BI(Ilge$^Y/Ir   r   )r   r   r   s   `` r   SetParseFnsr   4   s      
r   c                 D    [        U 5      nX#U'   [        U [        U5        g )N)GetMetadatasetattrr   )r   	attributevaluemetadatas       r   r   r   N   s    _(9	"mX&r   returnc                     [         [        R                  " U 5      0n [        U [        U5      n[         U;   a  U$ U$ !   Us $ = f)zGets metadata attached to the function `fn` as an attribute.

Args:
  fn: The function from which to retrieve the function metadata.
Returns:
  A dictionary mapping property strings to their value.
)r   inspect	isroutinegetattrr   )r   r
   r$   s      r   r    r    T   sL     w004'r='2H(*onNs   = = Ac                 P    [        U 5      nS / 0 S.nUR                  [        U5      $ )N)r
   r   r   )r    getr   )r   r$   r
   s      r   r   r   k   s(    _(B<'	ng	..r   )__doc__typingr   r   r'   r   r   r   r   r   r   strr    r   r   r   r   <module>r/      sY     !3 .4'tCH~ ./tCH~ /r   