[Checkins] SVN: grok/trunk/src/grok/meta.py Added license header, coding style.

Christian Theune ct at gocept.com
Fri Jul 13 02:20:58 EDT 2007


Log message for revision 77793:
  Added license header, coding style.
  

Changed:
  U   grok/trunk/src/grok/meta.py

-=-
Modified: grok/trunk/src/grok/meta.py
===================================================================
--- grok/trunk/src/grok/meta.py	2007-07-13 06:19:05 UTC (rev 77792)
+++ grok/trunk/src/grok/meta.py	2007-07-13 06:20:58 UTC (rev 77793)
@@ -1,3 +1,18 @@
+##############################################################################
+#
+# Copyright (c) 2006−2007 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Grokkers for the various components."""
+
 import os
 
 import zope.component.interface
@@ -30,6 +45,7 @@
 from grok import components, formlib
 from grok.util import check_adapts, get_default_permission, make_checker
 
+
 class ModelGrokker(martian.ClassGrokker):
     component_class = grok.Model
 
@@ -38,6 +54,7 @@
             setattr(factory, field.__name__, field.default)
         return True
 
+
 class ContainerGrokker(ModelGrokker):
     component_class = grok.Container
 
@@ -60,6 +77,7 @@
                                  name=name)
         return True
 
+
 class MultiAdapterGrokker(martian.ClassGrokker):
     component_class = grok.MultiAdapter
 
@@ -72,6 +90,7 @@
         component.provideAdapter(factory, provides=provides, name=name)
         return True
 
+
 class GlobalUtilityGrokker(martian.ClassGrokker):
     component_class = grok.GlobalUtility
 
@@ -83,6 +102,7 @@
         component.provideUtility(factory(), provides=provides, name=name)
         return True
 
+
 class XMLRPCGrokker(martian.ClassGrokker):
     component_class = grok.XMLRPC
 
@@ -114,6 +134,7 @@
             make_checker(factory, method_view, permission)
         return True
 
+
 class ViewGrokker(martian.ClassGrokker):
     component_class = grok.View
 
@@ -222,6 +243,7 @@
             make_checker(factory, method_view, permission)
         return True
 
+
 class TraverserGrokker(martian.ClassGrokker):
     component_class = grok.Traverser
 
@@ -232,6 +254,7 @@
                                  provides=IBrowserPublisher)
         return True
 
+
 class ModulePageTemplateGrokker(martian.InstanceGrokker):
     # this needs to happen before any other grokkers execute that actually
     # use the templates
@@ -244,10 +267,12 @@
         instance._annotateGrokInfo(name, module_info.dotted_name)
         return True
 
+
 class ModulePageTemplateFileGrokker(ModulePageTemplateGrokker):
     priority = 1000
     component_class = grok.PageTemplateFile
 
+
 class FilesystemPageTemplateGrokker(martian.GlobalGrokker):
     # do this early on, but after ModulePageTemplateGrokker, as
     # findFilesystem depends on module-level templates to be
@@ -258,6 +283,7 @@
         templates.findFilesystem(module_info)
         return True
 
+
 class SubscriberGrokker(martian.GlobalGrokker):
 
     def grok(self, name, module, context, module_info, templates):
@@ -269,6 +295,7 @@
                 zope.component.interface.provideInterface('', iface)
         return True
 
+
 class AdapterDecoratorGrokker(martian.GlobalGrokker):
 
     def grok(self, name, module, context, module_info, templates):
@@ -284,6 +311,7 @@
                 function, adapts=interfaces, provides=function.__implemented__)
         return True
 
+
 class StaticResourcesGrokker(martian.GlobalGrokker):
 
     def grok(self, name, module, context, module_info, templates):
@@ -314,6 +342,7 @@
             interface.Interface, name=module_info.dotted_name)
         return True
 
+
 class GlobalUtilityDirectiveGrokker(martian.GlobalGrokker):
 
     def grok(self, name, module, context, module_info, templates):
@@ -331,6 +360,7 @@
                                      name=info.name)
         return True
 
+
 class SiteGrokker(martian.ClassGrokker):
     component_class = grok.Site
     priority = 500
@@ -404,6 +434,7 @@
 
         return True
 
+
 def localUtilityRegistrationSubscriber(site, event):
     """A subscriber that fires to set up local utilities.
     """
@@ -421,6 +452,7 @@
     # do not register utilities anymore
     site.__grok_utilities_installed__ = True
 
+
 def setupUtility(site, utility, provides, name=u'',
                  name_in_container=None, public=False, setup=None):
     """Set up a utility in a site.
@@ -457,6 +489,7 @@
     site_manager.registerUtility(utility, provided=provides,
                                  name=name)
 
+
 class DefinePermissionGrokker(martian.GlobalGrokker):
 
     priority = 1500
@@ -475,6 +508,7 @@
 
         return True
 
+
 class AnnotationGrokker(martian.ClassGrokker):
     component_class = grok.Annotation
 
@@ -512,6 +546,7 @@
         component.provideAdapter(getAnnotation)
         return True
 
+
 class ApplicationGrokker(martian.ClassGrokker):
     component_class = grok.Application
     priority = 500
@@ -524,6 +559,7 @@
                                                       name))
         return True
 
+
 class IndexesGrokker(martian.InstanceGrokker):
     component_class = components.IndexesClass
 
@@ -546,6 +582,7 @@
                     grok.IObjectAddedEvent))
         return True
 
+
 class IndexesSetupSubscriber(object):
     def __init__(self, catalog_name, indexes, context, module_info):
         self.catalog_name = catalog_name



More information about the Checkins mailing list