[Checkins] SVN: zope.componentvocabulary/trunk/s whitespace
Thomas Lotze
tl at gocept.com
Thu Dec 9 10:54:31 EST 2010
Log message for revision 118768:
whitespace
Changed:
U zope.componentvocabulary/trunk/setup.py
U zope.componentvocabulary/trunk/src/zope/componentvocabulary/configure.zcml
U zope.componentvocabulary/trunk/src/zope/componentvocabulary/vocabulary.py
-=-
Modified: zope.componentvocabulary/trunk/setup.py
===================================================================
--- zope.componentvocabulary/trunk/setup.py 2010-12-09 15:26:35 UTC (rev 118767)
+++ zope.componentvocabulary/trunk/setup.py 2010-12-09 15:54:31 UTC (rev 118768)
@@ -16,9 +16,11 @@
import os
from setuptools import setup, find_packages
+
def read(*rnames):
return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
setup(name='zope.componentvocabulary',
version='1.0.2dev',
author='Zope Foundation and Contributors',
@@ -60,4 +62,3 @@
include_package_data=True,
zip_safe=False,
)
-
Modified: zope.componentvocabulary/trunk/src/zope/componentvocabulary/configure.zcml
===================================================================
--- zope.componentvocabulary/trunk/src/zope/componentvocabulary/configure.zcml 2010-12-09 15:26:35 UTC (rev 118767)
+++ zope.componentvocabulary/trunk/src/zope/componentvocabulary/configure.zcml 2010-12-09 15:54:31 UTC (rev 118768)
@@ -1,25 +1,25 @@
<configure xmlns="http://namespaces.zope.org/zope">
- <!-- the 'Interfaces' vocabulary below requires a registred IInterface -->
- <interface
- interface="zope.interface.interfaces.IInterface"
- />
-
- <!-- Vocabularies -->
- <utility
- component=".vocabulary.InterfacesVocabulary"
- name="Interfaces"
- />
+ <!-- the 'Interfaces' vocabulary below requires a registred IInterface -->
+ <interface
+ interface="zope.interface.interfaces.IInterface"
+ />
+ <!-- Vocabularies -->
<utility
+ component=".vocabulary.InterfacesVocabulary"
+ name="Interfaces"
+ />
+
+ <utility
component=".vocabulary.ObjectInterfacesVocabulary"
name="Object Interfaces"
/>
-
- <utility
- component=".vocabulary.UtilityComponentInterfacesVocabulary"
- provides="zope.schema.interfaces.IVocabularyFactory"
- name="Utility Component Interfaces"
+
+ <utility
+ component=".vocabulary.UtilityComponentInterfacesVocabulary"
+ provides="zope.schema.interfaces.IVocabularyFactory"
+ name="Utility Component Interfaces"
/>
</configure>
Modified: zope.componentvocabulary/trunk/src/zope/componentvocabulary/vocabulary.py
===================================================================
--- zope.componentvocabulary/trunk/src/zope/componentvocabulary/vocabulary.py 2010-12-09 15:26:35 UTC (rev 118767)
+++ zope.componentvocabulary/trunk/src/zope/componentvocabulary/vocabulary.py 2010-12-09 15:54:31 UTC (rev 118768)
@@ -30,13 +30,14 @@
from zope.componentvocabulary.i18n import ZopeMessageFactory as _
+
class UtilityTerm(object):
"""A term representing a utility.
The token of the term is the name of the utility. Here is a brief example
on how the IVocabulary interface is handled in this term as a
utility:
-
+
>>> from zope.interface.verify import verifyObject
>>> from zope.schema.interfaces import IVocabulary
>>> term = UtilityTerm(IVocabulary, 'zope.schema.interfaces.IVocabulary')
@@ -229,10 +230,12 @@
"""See zope.schema.interfaces.IIterableVocabulary"""
return len(self._terms)
+
class InterfacesVocabulary(UtilityVocabulary):
classProvides(IVocabularyFactory)
interface = IInterface
+
class ObjectInterfacesVocabulary(SimpleVocabulary):
"""A vocabulary that provides a list of all interfaces that its context
provides.
@@ -271,6 +274,7 @@
for interface in interfaces]
super(ObjectInterfacesVocabulary, self).__init__(terms)
+
class UtilityComponentInterfacesVocabulary(ObjectInterfacesVocabulary):
classProvides(IVocabularyFactory)
More information about the checkins
mailing list