from zope.interface import implementer
from zope.schema.interfaces import IVocabularyFactory
from zope.schema.vocabulary import SimpleVocabulary


@implementer(IVocabularyFactory)
class StaticVocabularyFactory:
    def __init__(self, *terms):
        """Pass a list of terms to get a vocabulary"""
        self.vocabulary = SimpleVocabulary(terms)

    def __call__(self, context=None):
        return self.vocabulary
