
    	              	          S r SSKJr  SSKJr  SSKJr  SSKrSSKrSSKr\R                  " \R                  5       " S S\
5      5       r " S S	\R                  " S	/ S
Q5      5      r " S S\R                  " SSS/5      5      rg)zBase classes for checks.    )absolute_import)division)unicode_literalsNc                   `    \ rS rSrSr\R                  S 5       r\R                  S 5       r	Sr
g)Checker   zBase class for a single check.c                     g)z7The aspect of the user's machine that is being checked.N selfs    1lib/googlecloudsdk/core/diagnostics/check_base.pyissueChecker.issue           c                     g)a%  Runs a single check and returns the result and an optional fix.

Returns:
  A tuple of two elements. The first element should have the same attributes
  as a check_base.Result object. The second element should either be a fixer
  function that can used to fix an error (indicated by the "passed"
  attribute being False in the first element), or None if the check passed
  or if it failed with no applicable fix. If there is a fixer function it is
  assumed that calling it will return True if it makes changes that warrant
  running a check again.
Nr
   r   s    r   CheckChecker.Check#   r   r   r
   N)__name__
__module____qualname____firstlineno____doc__abcabstractpropertyr   abstractmethodr   __static_attributes__r
   r   r   r   r      s9    &B B  r   r   c                   0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )Result2   a  Holds information about the result of a single check.

Attributes:
  passed: Whether the check passed.
  message: A summary message about the result of the check.
  failures: A sequence of checkbase.Failure objects; may be empty if there
      were no failures.
c                 >   > [         [        U ]  XX#=(       d    / 5      $ N)superr   __new__)clspassedmessagefailures	__class__s       r   r$   Result.__new__=   s    %c7NKKr   r
    Nr   r   r   r   r   r$   r   __classcell__r)   s   @r   r   r   2   s    L Lr   r   )r&   r'   r(   c                   0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )FailureA   zHolds information about the failure of a check.

Attributes:
  message: A message detailing the failure; to be shown to the user.
  exception: An Exception object associated with the failure.
c                 ,   > [         [        U ]  XU5      $ r"   )r#   r1   r$   )r%   r'   	exceptionr)   s      r   r$   Failure.__new__I   s    #&sY??r   r
   r+   r-   r/   s   @r   r1   r1   A   s    @ @r   r1   r'   r4   )r   
__future__r   r   r   r   collectionssixadd_metaclassABCMetaobjectr   
namedtupler   r1   r
   r   r   <module>r=      s      &  ' 
  
 3;;f   ,L8%FGL	@k$$YK0HI 	@r   