parameters: (self, hashes)
return_statement: return hashes.is_hash_allowed(self.hash_name, hex_digest=self.hash)
docstring: Return True if the link has a hash and it is allowed.
docstring_summary: Return True if the link has a hash and it is allowed.
docstring_tokens: Return True if the link has a hash and it is allowed .
function: def is_hash_allowed(self, hashes):
          # type: (Optional[Hashes]) -> bool
          """
          Return True if the link has a hash and it is allowed.
          """
          if hashes is None or not self.has_hash:
              return False
          # Assert non-None so mypy knows self.hash_name and self.hash are str.
          assert self.hash_name is not None
          assert self.hash is not None
  
          return hashes.is_hash_allowed(self.hash_name, hex_digest=self.hash)
function_tokens: def is_hash_allowed ( self , hashes ) : # type: (Optional[Hashes]) -> bool if hashes is None or not self . has_hash : return False # Assert non-None so mypy knows self.hash_name and self.hash are str. assert self . hash_name is not None assert self . hash is not None return hashes . is_hash_allowed ( self . hash_name , hex_digest = self . hash )