Commits

Kirill Simonov committed d2c9597

Cleaned up unused imports.

  • Participants
  • Parent commits 1841f92

Comments (0)

Files changed (9)

File src/htsql/classify.py

 #
 
 
-from .util import listof
 from .context import context
 from .cache import once
 from .adapter import Adapter, adapts

File src/htsql/tr/bind.py

 from ..adapter import Adapter, Protocol, adapts
 from ..domain import (BooleanDomain, IntegerDomain, DecimalDomain,
                       FloatDomain, UntypedDomain)
-from ..classify import relabel, normalize
+from ..classify import normalize
 from .error import BindError
 from .syntax import (Syntax, QuerySyntax, SegmentSyntax, SelectorSyntax,
                      ApplicationSyntax, FunctionSyntax, MappingSyntax,
                 choices.append(" or ")
                 choices.append(repr(alternatives[-1].encode('utf-8')))
             hint = "".join(choices)
-        raise BindError("ambiguous name '%s'" % self.syntax,
+        raise BindError("ambiguous name '%s'" % syntax,
                         self.syntax.mark, hint=hint)
 
 

File src/htsql/tr/embed.py

 from ..domain import (UntypedDomain, BooleanDomain, IntegerDomain, FloatDomain,
                       DecimalDomain, DateDomain, TimeDomain, DateTimeDomain)
 from .binding import LiteralRecipe, SelectionRecipe
-from .coerce import coerce
 import types
 import datetime
 import decimal
         if isinstance(value, str):
             try:
                 value = value.decode('utf-8')
-            except UnicodeDecodeError, exc:
+            except UnicodeDecodeError:
                 raise ValueError("a string is expected to be encoded in UTF-8:"
                                  " %s" % repr(value))
         if u"\0" in value:

File src/htsql/tr/lookup.py

 from ..classify import classify, relabel, normalize
 from .syntax import IdentifierSyntax
 from .binding import (Binding, ScopingBinding, ChainingBinding, WrappingBinding,
-                      SegmentBinding, HomeBinding, RootBinding, TableBinding,
+                      SegmentBinding, HomeBinding, TableBinding,
                       ColumnBinding, QuotientBinding, ComplementBinding,
                       CoverBinding, ForkBinding, LinkBinding, RescopingBinding,
                       DefinitionBinding, SelectionBinding, DirectionBinding,

File src/htsql_engine/sqlite/tr/dump.py

 from htsql.adapter import adapts
 from htsql.domain import BooleanDomain, StringDomain
 from htsql.tr.frame import LiteralPhrase
-from htsql.tr.dump import (DumpTable, DumpBoolean, DumpDecimal, DumpDate,
+from htsql.tr.dump import (DumpBoolean, DumpDecimal, DumpDate,
                            DumpTime, DumpDateTime,
                            DumpToFloat, DumpToDecimal, DumpToString,
                            DumpToDate, DumpToTime, DumpToDateTime,

File src/htsql_tweak/django/connect.py

 # See `LICENSE` for license information, `AUTHORS` for the list of authors.
 #
 
-from htsql.context import context
 from htsql.connect import Connect
 from htsql.adapter import weigh
 

File src/htsql_tweak/django/introspect.py

 #
 
 
-from htsql.context import context
 from htsql.adapter import Protocol, weigh, named
 from htsql.introspect import Introspect
 from htsql.entity import make_catalog

File src/htsql_tweak/override/classify.py

 
 from htsql.context import context
 from htsql.cache import once
-from htsql.introspect import introspect
-from htsql.model import (HomeNode, TableNode, TableArc, ColumnArc, ChainArc,
-                         SyntaxArc)
-from htsql.classify import (classify, Trace, TraceHome, TraceTable,
-                            Call, CallTable, CallColumn, CallChain, CallSyntax,
+from htsql.model import HomeNode, TableNode, TableArc, ColumnArc, ChainArc
+from htsql.classify import (classify, TraceHome, TraceTable,
+                            CallTable, CallColumn, CallChain, CallSyntax,
                             OrderTable)
 
 
         self.names_by_arc = {}
         self.arc_by_signature = {}
         addon = context.app.tweak.override
-        catalog = introspect()
         node = HomeNode()
         for name, parameters in sorted(addon.class_labels):
             pattern = addon.class_labels[name, parameters]

File src/htsql_tweak/override/pattern.py

 
 
 from htsql.context import context
-from htsql.util import Printable, Comparable, listof, maybe
+from htsql.util import Printable, listof, maybe
 from htsql.validator import Validator
-from htsql.entity import (CatalogEntity, NamedEntity, SchemaEntity,
+from htsql.entity import (NamedEntity, SchemaEntity,
                           TableEntity, ColumnEntity, Join, DirectJoin,
                           ReverseJoin)
-from htsql.model import (Node, HomeNode, TableNode, Arc, TableArc, ColumnArc,
+from htsql.model import (Node, HomeNode, TableNode, TableArc, ColumnArc,
                          ChainArc, SyntaxArc)
 from htsql.introspect import introspect
 from htsql.classify import normalize