Преглед на файлове

Use __all__ within e.w.copyvios and shorter imports

tags/v0.1^2
Ben Kurtovic преди 12 години
родител
ревизия
5ca1d91f3e
променени са 4 файла, в които са добавени 11 реда и са изтрити 3 реда
  1. +5
    -3
      earwigbot/wiki/copyvios/__init__.py
  2. +2
    -0
      earwigbot/wiki/copyvios/markov.py
  3. +2
    -0
      earwigbot/wiki/copyvios/parsers.py
  4. +2
    -0
      earwigbot/wiki/copyvios/search.py

+ 5
- 3
earwigbot/wiki/copyvios/__init__.py Целия файл

@@ -30,11 +30,13 @@ try:
except ImportError:
oauth = None

from earwigbot.wiki.copyvios.markov import MarkovChain, MarkovChainIntersection
from earwigbot.wiki.copyvios.parsers import ArticleTextParser, HTMLTextParser
from earwigbot.wiki.copyvios.search import YahooBOSSSearchEngine
from earwigbot.wiki.copyvios.markov import *
from earwigbot.wiki.copyvios.parsers import *
from earwigbot.wiki.copyvios.search import *
from earwigbot.wiki.exceptions import *

__all__ = ["CopyvioCheckResult", "CopyvioMixin"]

class CopyvioCheckResult(object):
def __init__(self, violation, confidence, url, queries, article, chains):
self.violation = violation


+ 2
- 0
earwigbot/wiki/copyvios/markov.py Целия файл

@@ -23,6 +23,8 @@
from collections import defaultdict
from re import sub, UNICODE

__all__ = ["MarkovChain", "MarkovChainIntersection"]

class MarkovChain(object):
START = -1
END = -2


+ 2
- 0
earwigbot/wiki/copyvios/parsers.py Целия файл

@@ -20,6 +20,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

__all__ = ["BaseTextParser", "ArticleTextParser", "HTMLTextParser"]

class BaseTextParser(object):
def __init__(self, text):
self.text = text


+ 2
- 0
earwigbot/wiki/copyvios/search.py Целия файл

@@ -30,6 +30,8 @@ except ImportError:

from earwigbot.wiki.exceptions import SearchQueryError

__all__ = ["BaseSearchEngine", "YahooBOSSSearchEngine"]

class BaseSearchEngine(object):
def __init__(self, cred):
"""Store credentials 'cred' for searching later on."""


Зареждане…
Отказ
Запис