Commit 1831116d authored by Vincent Pelletier's avatar Vincent Pelletier

Remove many unused imports, spotted by pyflakes.

Make "from string import split" unused in SQLCatalog, and remove string import entirely.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25930 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9848f630
......@@ -27,7 +27,6 @@
#
##############################################################################
import sys
from zLOG import LOG, WARNING, INFO
from Interface.IColumnMap import IColumnMap
from Interface.Verify import verifyClass
......
......@@ -29,7 +29,6 @@
##############################################################################
from Query import Query
from Products.ZSQLCatalog.SQLExpression import SQLExpression
from Products.ZSQLCatalog.Interface.IQuery import IQuery
from Interface.Verify import verifyClass
from Products.ZSQLCatalog.SQLCatalog import profiler_decorator
......
......@@ -18,7 +18,6 @@ import ExtensionClass
import Globals
import OFS.History
from Globals import DTMLFile, PersistentMapping
from string import split, join
from thread import allocate_lock, get_ident
from OFS.Folder import Folder
from AccessControl import ClassSecurityInfo
......@@ -27,11 +26,9 @@ from App.config import getConfiguration
from BTrees.Length import Length
from Shared.DC.ZRDB.TM import TM
from DateTime import DateTime
from Acquisition import aq_parent, aq_inner, aq_base
from zLOG import LOG, WARNING, INFO, TRACE
from ZODB.POSException import ConflictError
from DocumentTemplate.DT_Var import sql_quote
from Products.PythonScripts.Utility import allow_class
import time
......@@ -39,7 +36,6 @@ import sys
import urllib
import string
import pprint
import threading
from cStringIO import StringIO
from xml.dom.minidom import parse
from xml.sax.saxutils import escape, quoteattr
......@@ -1450,7 +1446,7 @@ class Catalog(Folder,
method = getattr(self, method_name)
if method.meta_type in ("Z SQL Method", "LDIF Method"):
# Build the dictionnary of values
arguments = split(method.arguments_src)
arguments = method.arguments_src.split()
elif method.meta_type == "Script (Python)":
arguments = \
method.func_code.co_varnames[:method.func_code.co_argcount]
......
......@@ -33,7 +33,6 @@ from Products.ZSQLCatalog.Query.Query import Query
from Products.ZSQLCatalog.Query.RelatedQuery import RelatedQuery
from Products.ZSQLCatalog.Query.SQLQuery import SQLQuery
from Products.ZSQLCatalog.SQLExpression import SQLExpression
from zLOG import LOG
from Products.ZSQLCatalog.Interface.ISearchKey import IRelatedKey
from Interface.Verify import verifyClass
from Products.ZSQLCatalog.SQLCatalog import profiler_decorator
......
......@@ -31,7 +31,6 @@
from zLOG import LOG
from Products.ZSQLCatalog.Query.SimpleQuery import SimpleQuery
from Products.ZSQLCatalog.Query.ComplexQuery import ComplexQuery
from Products.ZSQLCatalog.SQLExpression import SQLExpression
from Products.ZSQLCatalog.Interface.ISearchKey import ISearchKey
from Interface.Verify import verifyClass
from Products.ZSQLCatalog.SQLCatalog import profiler_decorator
......
......@@ -17,20 +17,18 @@ from Globals import DTMLFile, MessageDialog
import Globals
from OFS.Folder import Folder
from OFS.FindSupport import FindSupport
from OFS.ObjectManager import ObjectManager
from DateTime import DateTime
from Acquisition import Implicit, aq_base
from Persistence import Persistent
from DocumentTemplate.DT_Util import InstanceDict, TemplateDict
from DocumentTemplate.DT_Util import Eval
from AccessControl.Permission import name_trans
from SQLCatalog import Catalog, CatalogError
from AccessControl import ClassSecurityInfo, getSecurityManager
from SQLCatalog import CatalogError
from AccessControl import ClassSecurityInfo
from AccessControl.DTML import RestrictedDTML
from Products.CMFCore.utils import getToolByName
from Products.ERP5Type.Cache import clearCache
import string, os, sys, types
import string, sys
import time
import urllib
from ZODB.POSException import ConflictError
......
......@@ -28,19 +28,10 @@
##############################################################################
import unittest
import sys
from DateTime import DateTime
from Products.ZSQLMethods.SQL import SQL as ZSQLMethod
from Products.CMFCore.Expression import Expression
from Products.ZSQLCatalog.SQLCatalog import Catalog as SQLCatalog
from Products.ZSQLCatalog.ZSQLCatalog import ZCatalog as ZSQLCatalog
from Products.ZSQLCatalog.SQLCatalog import Query
from Products.ZSQLCatalog.SQLCatalog import ComplexQuery
from Products.ZSQLCatalog.SQLCatalog import SimpleQuery
from Products.ZSQLCatalog.SQLCatalog import NegatedQuery
from Products.ZSQLCatalog.Query.Query import Query as _Query
from Products.ZSQLCatalog.Query.EntireQuery import EntireQuery
from Products.ZSQLCatalog.Query.RelatedQuery import RelatedQuery
from DateTime import DateTime
......
......@@ -27,18 +27,12 @@
##############################################################################
import unittest
import sys
from DateTime import DateTime
from Products.ZSQLMethods.SQL import SQL as ZSQLMethod
from Products.CMFCore.Expression import Expression
from Products.ZSQLCatalog.SQLCatalog import Catalog as SQLCatalog
from Products.ZSQLCatalog.ZSQLCatalog import ZCatalog as ZSQLCatalog
from Products.ZSQLCatalog.SQLCatalog import Query
from Products.ZSQLCatalog.SQLCatalog import ComplexQuery
from Products.ZSQLCatalog.SQLCatalog import NegatedQuery
class TestZSQLCatalog(unittest.TestCase):
"""Tests for ZSQL Catalog.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment