Browse Source

Mixin -> MixIn

tags/v0.1^2
Ben Kurtovic 12 years ago
parent
commit
f4c33d86fb
4 changed files with 16 additions and 16 deletions
  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 View File

@@ -153,11 +153,11 @@ and the following methods:
<earwigbot.wiki.page.Page.add_section>`: adds a new section named ``title`` <earwigbot.wiki.page.Page.add_section>`: adds a new section named ``title``
at the bottom of the page at the bottom of the page
- :py:meth:`copyvio_check(...) - :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 copyright violations
- :py:meth:`copyvio_compare(url, ...) - :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 against a specific URL


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


+ 8
- 8
earwigbot/exceptions.py View File

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


Raised by :py:meth:`Page.copyvio_check 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 :py:meth:`Page.copyvio_compare
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_compare>`.
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_compare>`.
""" """


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


Raised by :py:meth:`Page.copyvio_check 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 :py:meth:`Page.copyvio_compare
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_compare>`.
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_compare>`.
""" """


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


Raised by :py:meth:`Page.copyvio_check 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 :py:meth:`Page.copyvio_compare
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_compare>`.
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_compare>`.
""" """


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


Raised by :py:meth:`Page.copyvio_check 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 :py:meth:`Page.copyvio_compare
<earwigbot.wiki.copyvios.CopyvioMixin.copyvio_compare>`.
<earwigbot.wiki.copyvios.CopyvioMixIn.copyvio_compare>`.
""" """

+ 4
- 4
earwigbot/wiki/page.py View File

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


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


__all__ = ["Page"] __all__ = ["Page"]


class Page(CopyrightMixin):
class Page(CopyrightMixIn):
""" """
**EarwigBot: Wiki Toolset: Page** **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:`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:`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 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 checks the page like :py:meth:`copyvio_check`, but against a specific URL
""" """




+ 1
- 1
earwigbot/wiki/site.py View File

@@ -129,7 +129,7 @@ class Site(object):
self._sql_conn = None self._sql_conn = None
self._sql_lock = Lock() 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 self._search_config = search_config


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


Loading…
Cancel
Save