# Path: securesystemslib/exceptions.py
# class Error(Exception):
# class Warning(Warning):
# class FormatError(Error):
# class InvalidMetadataJSONError(FormatError):
# class UnsupportedAlgorithmError(Error):
# class BadHashError(Error):
# class BadPasswordError(Error):
# class CryptoError(Error):
# class BadSignatureError(CryptoError):
# class UnknownMethodError(CryptoError):
# class UnsupportedLibraryError(Error):
# class InvalidNameError(Error):
# class NotFoundError(Error):
# class URLMatchesNoPatternError(Error):
# class InvalidConfigurationError(Error):
# class StorageError(Error):
#   def __init__(self, exception):
#   def __str__(self):
#   def __init__(self, expected_hash, observed_hash):
#   def __str__(self):
#   def __init__(self, metadata_role_name):
#   def __str__(self):


import re
import sys
  import doctest
from securesystemslib import exceptions
  found.  As a result, 'bad' was flagged a mismatch.

  'schema.py' provides additional schemas for testing objects based on other
  criteria.  See 'securesystemslib.formats.py' and the rest of this module for
  extensive examples.  Anything related to the checking of securesystemslib
  objects and their formats can be found in 'formats.py'.
"""




class Schema:
  """
  <Purpose>
    A schema matches a set of possible Python objects, of types
    that are encodable in JSON.  'Schema' is the base class for
    the other classes defined in this module.  All derived classes
    should implement check_match().
  """

  def matches(self, object):
    """
    <Purpose>
      Return True if 'object' matches this schema, False if it doesn't.
      If the caller wishes to signal an error on a failed match, check_match()
      should be called, which will raise a 'exceptions.FormatError' exception.
    """

    try:
      self.check_match(object)

# Path: securesystemslib/exceptions.py
# class Error(Exception):
# class Warning(Warning):
# class FormatError(Error):
# class InvalidMetadataJSONError(FormatError):
# class UnsupportedAlgorithmError(Error):
# class BadHashError(Error):
# class BadPasswordError(Error):
# class CryptoError(Error):
# class BadSignatureError(CryptoError):
# class UnknownMethodError(CryptoError):
# class UnsupportedLibraryError(Error):
# class InvalidNameError(Error):
# class NotFoundError(Error):
# class URLMatchesNoPatternError(Error):
# class InvalidConfigurationError(Error):
# class StorageError(Error):
#   def __init__(self, exception):
#   def __str__(self):
#   def __init__(self, expected_hash, observed_hash):
#   def __str__(self):
#   def __init__(self, metadata_role_name):
#   def __str__(self):


# Path: securesystemslib/schema.py
import re
import sys
  import doctest
from securesystemslib import exceptions

  found.  As a result, 'bad' was flagged a mismatch.

  'schema.py' provides additional schemas for testing objects based on other
  criteria.  See 'securesystemslib.formats.py' and the rest of this module for
  extensive examples.  Anything related to the checking of securesystemslib
  objects and their formats can be found in 'formats.py'.
"""




class Schema:
  """
  <Purpose>
    A schema matches a set of possible Python objects, of types
    that are encodable in JSON.  'Schema' is the base class for
    the other classes defined in this module.  All derived classes
    should implement check_match().
  """

  def matches(self, object):
    """
    <Purpose>
      Return True if 'object' matches this schema, False if it doesn't.
      If the caller wishes to signal an error on a failed match, check_match()
      should be called, which will raise a 'exceptions.FormatError' exception.
    """

    try:
      self.check_match(object)

    except exceptions.FormatError: