
    k7i                     V    S r SSKJr  SSKJr  SSKJr   " S S\R                  5      rg)	zV
Keyring Chainer - iterates over other viable backends to
discover passwords in each.
   )backend)
properties   )failc                       \ rS rSrSrSr\R                  S\4S j5       r	\R                  S 5       r
S rS rS	 rS
 rSrg)ChainerBackend   zN
>>> ChainerBackend()
<keyring.backends.chainer.ChainerBackend object at ...>
Treturnc                 r    [        U R                  5      S:  a  S$ [        R                  R                  S-
  $ )z
If there are backends to chain, high priority
Otherwise very low priority since our operation when empty
is the same as null.
r   
   )lenbackendsr   Keyringpriority)clss    R/home/james-whalen/.local/lib/python3.13/site-packages/keyring/backends/chainer.pyr   ChainerBackend.priority   s.     &*rK1F1F1JK    c                 x    S n[        U[        R                  " 5       5      n[        U[        R                  SS9$ )z%
Discover all keyrings for chaining.
c                     [         R                  =(       d    [        n[        U [        5      (       + =(       a    U" U 5      =(       a    U R
                  S:  $ )N    )r   _limitbool
isinstancer   r   )keyringlimits     r   allow&ChainerBackend.backends.<locals>.allow$   sA    NN*dEw77 )'N)$$q(r   T)keyreverse)filterr   get_all_keyringsortedby_priority)r   r   alloweds      r   r   ChainerBackend.backends   s3    	  7 7 9:g7#6#6EEr   c                 Z    U R                    H  nUR                  X5      nUc  M  Us  $    g N)r   get_password)selfserviceusernamer   passwords        r   r)   ChainerBackend.get_password/   s+    }}G++G>H# %r   c                 r    U R                    H  n UR                  XU5      s  $    g ! [         a     M(  f = fr(   )r   set_passwordNotImplementedError)r*   r+   r,   r-   r   s        r   r0   ChainerBackend.set_password5   s<    }}G++GxHH % ' s   (
66c                 p    U R                    H  n UR                  X5      s  $    g ! [         a     M'  f = fr(   )r   delete_passwordr1   )r*   r+   r,   r   s       r   r4   ChainerBackend.delete_password<   s:    }}G..wAA % ' s   '
55c                 Z    U R                    H  nUR                  X5      nUc  M  Us  $    g r(   )r   get_credential)r*   r+   r,   r   
credentials        r   r7   ChainerBackend.get_credentialC   s,    }}G //BJ%!! %r    N)__name__
__module____qualname____firstlineno____doc__viabler   classpropertyfloatr   r   r)   r0   r4   r7   __static_attributes__r:   r   r   r   r      s`     FL L L F F  "r   r   N)r?    r   compatr   r   KeyringBackendr   r:   r   r   <module>rG      s'   
   <"W++ <"r   