Kirill Simonov committed d2c9597

Cleaned up unused imports.

  • Participants
  • Parent commits 1841f92

Comments (0)

Files changed (9)

File src/htsql/

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

File src/htsql/tr/

 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 ")
             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/

 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):
                 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/

 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/

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

File src/htsql_tweak/django/

 # 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/

-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/

 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,
         self.names_by_arc = {}
         self.arc_by_signature = {}
         addon =
-        catalog = introspect()
         node = HomeNode()
         for name, parameters in sorted(addon.class_labels):
             pattern = addon.class_labels[name, parameters]

File src/htsql_tweak/override/

 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,
-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