[Zope3-checkins] CVS: Zope3/src/zope/app/schemagen - typereg.py:1.5

Jeremy Hylton cvs-admin at zope.org
Mon Nov 3 23:04:56 EST 2003


Update of /cvs-repository/Zope3/src/zope/app/schemagen
In directory cvs.zope.org:/tmp/cvs-serv28992/src/zope/app/schemagen

Modified Files:
	typereg.py 
Log Message:
Fix various import issues.

Some names where from imported twice.
Other imports were unused.
Often imports were in partly random order, making them harder to read.


=== Zope3/src/zope/app/schemagen/typereg.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/schemagen/typereg.py:1.4	Wed Jun  4 06:46:37 2003
+++ Zope3/src/zope/app/schemagen/typereg.py	Mon Nov  3 23:04:25 2003
@@ -19,7 +19,7 @@
 """
 
 from zope.interface import implements, providedBy
-from zope.schema import getFields
+import zope.schema
 
 from zope.app.interfaces.schemagen import ITypeRepresentation
 
@@ -90,7 +90,7 @@
         # representations of them, and sort out appropriate imports.
         names = {} # used as set of property names, ignoring values
         for interface in providedBy(field):
-            names.update(getFields(interface))
+            names.update(zope.schema.getFields(interface))
         # getFields only returns data for Fields in the interface.
         # Otherwise, it returns an empty dict.
 
@@ -131,8 +131,6 @@
     getTypes = staticmethod(getTypes)
 
     def _getImportList(field):
-        import zope.schema
-
         field_class = type(field)
         if getattr(zope.schema, field_class.__name__, None) is field_class:
             module_name = 'zope.schema'




More information about the Zope3-Checkins mailing list