Ë
    €Ï1  ã                   ój   — d Z ddlmZ ddlmZ ddlmZ ddlZddlmZ  G d„ dej                  «      Z	y)	z:Wrapper around Snapshot to provide file-order determinism.é    )Úabsolute_import)Údivision)Úunicode_literalsN)Ústorage_utilc                   ó   — e Zd ZdZd„ Zy)ÚDeterministicSnapshotz8DeterministicSnapshot is a thin wrapper around Snapshot.c                 óN   — t        | j                  j                  «       d„ ¬«      S )aÎ  Gets the values of `self.files` in a deterministic order.

    Internally, `self.files` is a dictionary. Prior to Python 3.6, dictionaries
    were ordered nondeterministically, but our tests require determinism. As
    such, we have to convert the underlying dictionary to a list and sort that
    list. The specific order itself (e.g. alphabetical vs. reverse-alphabetical)
    doesn't matter.

    Returns:
      A list of files in a deterministic order.
    c                 ój   — t         j                  j                  | j                  | j                  «      S )N)ÚosÚpathÚjoinÚroot)Úms    úFlib/googlecloudsdk/command_lib/infra_manager/deterministic_snapshot.pyÚ<lambda>z6DeterministicSnapshot.GetSortedFiles.<locals>.<lambda>+   s   € ¬2¯7©7¯<©<¸¿¹ÀÇÁÔ+Gó    )Úkey)ÚsortedÚfilesÚvalues)Úselfs    r   ÚGetSortedFilesz$DeterministicSnapshot.GetSortedFiles   s$   € ô Ø
‰
×ÑÓÑ!Gôð r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   © r   r   r   r      s
   „ Ù@ór   r   )
r   Ú
__future__r   r   r   r   Úgooglecloudsdk.api_lib.storager   ÚSnapshotr   r   r   r   Ú<module>r!      s,   ðñ  Aå &Ý Ý 'ã 	å 7ô˜L×1Ñ1õ r   