Skip to content

Commit

Permalink
Added UnresolvedImport markers to get PyDev to quit complaining about…
Browse files Browse the repository at this point in the history
… things it can't find.
  • Loading branch information
mchaput committed Jun 16, 2011
1 parent 22aad33 commit dfe6c6b
Show file tree
Hide file tree
Showing 23 changed files with 35 additions and 37 deletions.
2 changes: 1 addition & 1 deletion benchmark/dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def whoosh_schema(self):
return schema

def zcatalog_setup(self, cat):
from zcatalog import indexes
from zcatalog import indexes #@UnresolvedImport
cat["head"] = indexes.FieldIndex(field_name="head")
cat["body"] = indexes.TextIndex(field_name="body")

Expand Down
2 changes: 1 addition & 1 deletion benchmark/reuters.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def whoosh_schema(self):
return schema

def zcatalog_setup(self, cat):
from zcatalog import indexes
from zcatalog import indexes #@UnresolvedImport
cat["id"] = indexes.FieldIndex(field_name="id")
cat["headline"] = indexes.TextIndex(field_name="headline")
cat["body"] = indexes.TextIndex(field_name="text")
Expand Down
2 changes: 1 addition & 1 deletion src/whoosh/filedb/filetables.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from array import array
from binascii import crc32
from collections import defaultdict
from hashlib import md5
from hashlib import md5 #@UnresolvedImport
from struct import Struct

from whoosh.compat import (loads, dumps, long_type, xrange, iteritems,
Expand Down
4 changes: 2 additions & 2 deletions src/whoosh/filedb/gae.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
ix = DataStoreStorage().open_index()
"""

from google.appengine.api import memcache
from google.appengine.ext import db
from google.appengine.api import memcache #@UnresolvedImport
from google.appengine.ext import db #@UnresolvedImport

from whoosh.compat import BytesIO
from whoosh.store import Storage
Expand Down
4 changes: 1 addition & 3 deletions src/whoosh/highlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ def __init__(self, qname="strong", between="..."):
self.qname = qname
self.between = between

from genshi.core import START, END, TEXT, Attrs, Stream
from genshi.core import START, END, TEXT, Attrs, Stream #@UnresolvedImport
self.START, self.END, self.TEXT = START, END, TEXT
self.Attrs, self.Stream = Attrs, Stream

Expand Down Expand Up @@ -566,8 +566,6 @@ def highlight(text, terms, analyzer, fragmenter, formatter, top=3,
return formatter(text, fragments)


if __name__ == '__main__':
pass



Expand Down
24 changes: 12 additions & 12 deletions src/whoosh/support/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,11 +318,11 @@ def findterms(self, terms):

class ZcatalogModule(Module):
def indexer(self, **kwargs):
from ZODB.FileStorage import FileStorage
from ZODB.DB import DB
from zcatalog import catalog
from zcatalog import indexes
import transaction
from ZODB.FileStorage import FileStorage #@UnresolvedImport
from ZODB.DB import DB #@UnresolvedImport
from zcatalog import catalog #@UnresolvedImport
from zcatalog import indexes #@UnresolvedImport
import transaction #@UnresolvedImport

dir = os.path.join(self.options.dir, "%s_zcatalog" % self.options.indexname)
if os.path.exists(dir):
Expand All @@ -347,21 +347,21 @@ def index_document(self, d):
self.cat.index_doc(doc)
self.zcatalog_count += 1
if self.zcatalog_count >= 100:
import transaction
import transaction #@UnresolvedImport
transaction.commit()
self.zcatalog_count = 0

def finish(self, **kwargs):
import transaction
import transaction #@UnresolvedImport
transaction.commit()
del self.zcatalog_count

def searcher(self):
from ZODB.FileStorage import FileStorage
from ZODB.DB import DB
from zcatalog import catalog
from zcatalog import indexes
import transaction
from ZODB.FileStorage import FileStorage #@UnresolvedImport
from ZODB.DB import DB #@UnresolvedImport
from zcatalog import catalog #@UnresolvedImport
from zcatalog import indexes #@UnresolvedImport
import transaction #@UnresolvedImport

path = os.path.join(self.options.dir, "%s_zcatalog" % self.options.indexname, "index")
storage = FileStorage(path)
Expand Down
2 changes: 1 addition & 1 deletion stress/test_bigtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from random import randint, shuffle

from nose.tools import assert_equal
from nose.tools import assert_equal #@UnresolvedImport

from whoosh.compat import xrange, iteritems
from whoosh.filedb.filetables import HashWriter, HashReader
Expand Down
2 changes: 1 addition & 1 deletion stress/test_hugeindex.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import with_statement
import struct

from nose.tools import assert_equal
from nose.tools import assert_equal #@UnresolvedImport

from whoosh import formats
from whoosh.compat import next, xrange
Expand Down
2 changes: 1 addition & 1 deletion stress/test_update.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import with_statement
import random

from nose.tools import assert_equal
from nose.tools import assert_equal #@UnresolvedImport

from whoosh import fields, query
from whoosh.compat import xrange, text_type
Expand Down
2 changes: 1 addition & 1 deletion tests/test_classify.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import with_statement

from nose.tools import assert_equal
from nose.tools import assert_equal #@UnresolvedImport

from whoosh import analysis, classify, fields, formats
from whoosh.compat import u, text_type
Expand Down
2 changes: 1 addition & 1 deletion tests/test_dateparse.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from datetime import datetime

from nose.tools import assert_equal
from nose.tools import assert_equal #@UnresolvedImport

from whoosh.qparser.dateparse import *

Expand Down
2 changes: 1 addition & 1 deletion tests/test_fields.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import with_statement
from datetime import datetime, timedelta

from nose.tools import assert_equal, assert_not_equal, assert_raises
from nose.tools import assert_equal, assert_not_equal, assert_raises #@UnresolvedImport

from whoosh import analysis, fields, qparser, query
from whoosh.compat import long_type, u, b, xrange, PY3
Expand Down
2 changes: 1 addition & 1 deletion tests/test_flexible.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import with_statement

from nose.tools import assert_equal
from nose.tools import assert_equal #@UnresolvedImport

from whoosh import fields
from whoosh.compat import u
Expand Down
2 changes: 1 addition & 1 deletion tests/test_highlighting.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import with_statement

from nose.tools import assert_equal
from nose.tools import assert_equal #@UnresolvedImport

from whoosh import analysis, highlight, fields, qparser
from whoosh.compat import u
Expand Down
2 changes: 1 addition & 1 deletion tests/test_matching.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import with_statement
from random import randint, choice, sample

from nose.tools import assert_equal, assert_not_equal
from nose.tools import assert_equal, assert_not_equal #@UnresolvedImport

from whoosh import fields
from whoosh.compat import xrange, next, u
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parse_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from datetime import datetime
import sys

from nose.tools import assert_equal
from nose.tools import assert_equal #@UnresolvedImport

from whoosh import analysis, fields, formats, qparser, query
from whoosh.compat import u, text_type, xrange
Expand Down
2 changes: 1 addition & 1 deletion tests/test_parsing.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# coding=utf-8

from nose.tools import assert_equal
from nose.tools import assert_equal #@UnresolvedImport

from whoosh import analysis, fields, qparser, query
from whoosh.compat import u, text_type
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pool.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from nose.tools import assert_equal
from nose.tools import assert_equal #@UnresolvedImport

from whoosh import fields
from whoosh.filedb import pools, filestore
Expand Down
2 changes: 1 addition & 1 deletion tests/test_postings.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import with_statement
from random import random, randint

from nose.tools import assert_equal
from nose.tools import assert_equal #@UnresolvedImport

from whoosh.compat import xrange
from whoosh.formats import (Characters, CharacterBoosts, DocBoosts, Existence,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_queries.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from nose.tools import assert_equal, assert_not_equal
from nose.tools import assert_equal, assert_not_equal #@UnresolvedImport

from whoosh import fields, scoring
from whoosh.compat import u
Expand Down
2 changes: 1 addition & 1 deletion tests/test_spans.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import with_statement

from nose.tools import assert_equal
from nose.tools import assert_equal #@UnresolvedImport

from whoosh import analysis, fields, formats, query, spans
from whoosh.compat import u, xrange
Expand Down
2 changes: 1 addition & 1 deletion tests/test_spelling.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from nose.tools import assert_equal, assert_not_equal
from nose.tools import assert_equal, assert_not_equal #@UnresolvedImport

from whoosh import spelling
from whoosh.compat import u, text_type
Expand Down
2 changes: 1 addition & 1 deletion tests/test_weightings.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from random import choice, randint
import sys

from nose.tools import assert_equal
from nose.tools import assert_equal #@UnresolvedImport

from whoosh import query, scoring
from whoosh.compat import u, xrange
Expand Down

0 comments on commit dfe6c6b

Please sign in to comment.