Pārlūkot izejas kodu

Mixin -> MixIn

tags/v0.1^2
Ben Kurtovic pirms 12 gadiem
vecāks
revīzija
f4c33d86fb
4 mainītis faili ar 16 papildinājumiem un 16 dzēšanām
  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 Parādīt failu

@@ -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 Parādīt failu

@@ -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 Parādīt failu

@@ -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 Parādīt failu

@@ -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:


Notiek ielāde…
Atcelt
Saglabāt