浏览代码

Mixin -> MixIn

tags/v0.1^2
Ben Kurtovic 12 年前
父节点
当前提交
f4c33d86fb
共有 4 个文件被更改,包括 16 次插入16 次删除
  1. +3
    -3
      docs/toolset.rst
  2. +8
    -8
      earwigbot/exceptions.py
  3. +4
    -4
      earwigbot/wiki/page.py
  4. +1
    -1
      earwigbot/wiki/site.py

+ 3
- 3
docs/toolset.rst 查看文件

@@ -153,11 +153,11 @@ and the following methods:
<earwigbot.wiki.page.Page.add_section>`: adds a new section named ``title``
at the bottom of the page
- :py:meth:`copyvio_check(...)
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_check>`: checks the page for
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_check>`: checks the page for
copyright violations
- :py:meth:`copyvio_compare(url, ...)
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_compare>`: checks the page like
:py:meth:`~earwigbot.wiki.copyvios.CopyvioMixin.copyvio_check`, but
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_compare>`: checks the page like
:py:meth:`~earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_check`, but
against a specific URL

Additionally, :py:class:`~earwigbot.wiki.category.Category` objects (created


+ 8
- 8
earwigbot/exceptions.py 查看文件

@@ -201,9 +201,9 @@ class CopyvioCheckError(WikiToolsetError):
raised instead of this.

Raised by :py:meth:`Page.copyvio_check
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_check>` and
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_check>` and
:py:meth:`Page.copyvio_compare
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_compare>`.
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_compare>`.
"""

class UnknownSearchEngineError(CopyvioCheckError):
@@ -213,9 +213,9 @@ class UnknownSearchEngineError(CopyvioCheckError):
:py:attr:`config.wiki["search"]["engine"]`.

Raised by :py:meth:`Page.copyvio_check
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_check>` and
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_check>` and
:py:meth:`Page.copyvio_compare
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_compare>`.
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_compare>`.
"""

class UnsupportedSearchEngineError(CopyvioCheckError):
@@ -225,16 +225,16 @@ class UnsupportedSearchEngineError(CopyvioCheckError):
couldn't be imported.

Raised by :py:meth:`Page.copyvio_check
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_check>` and
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_check>` and
:py:meth:`Page.copyvio_compare
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_compare>`.
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_compare>`.
"""

class SearchQueryError(CopyvioCheckError):
"""Some error ocurred while doing a search query.

Raised by :py:meth:`Page.copyvio_check
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_check>` and
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_check>` and
:py:meth:`Page.copyvio_compare
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_compare>`.
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_compare>`.
"""

+ 4
- 4
earwigbot/wiki/page.py 查看文件

@@ -31,11 +31,11 @@ except ImportError:
mwparserfromhell = None

from earwigbot import exceptions
from earwigbot.wiki.copyright import CopyrightMixin
from earwigbot.wiki.copyright import CopyrightMixIn

__all__ = ["Page"]

class Page(CopyrightMixin):
class Page(CopyrightMixIn):
"""
**EarwigBot: Wiki Toolset: Page**

@@ -69,9 +69,9 @@ class Page(CopyrightMixin):
- :py:meth:`edit`: replaces the page's content or creates a new page
- :py:meth:`add_section`: adds a new section at the bottom of the page

- :py:meth:`~earwigbot.wiki.copyvios.CopyrightMixin.copyvio_check`:
- :py:meth:`~earwigbot.wiki.copyvios.CopyrightMixIn.copyvio_check`:
checks the page for copyright violations
- :py:meth:`~earwigbot.wiki.copyvios.CopyrightMixin.copyvio_compare`:
- :py:meth:`~earwigbot.wiki.copyvios.CopyrightMixIn.copyvio_compare`:
checks the page like :py:meth:`copyvio_check`, but against a specific URL
"""



+ 1
- 1
earwigbot/wiki/site.py 查看文件

@@ -129,7 +129,7 @@ class Site(object):
self._sql_conn = None
self._sql_lock = Lock()

# Attribute used in copyright violation checks (see CopyrightMixin):
# Attribute used in copyright violation checks (see CopyrightMixIn):
self._search_config = search_config

# Set up cookiejar and URL opener for making API queries:


正在加载...
取消
保存