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

Fix __all__ placement

tags/v0.4
Ben Kurtovic преди 2 месеца
родител
ревизия
d934d52db1
променени са 15 файла, в които са добавени 30 реда и са изтрити 30 реда
  1. +2
    -2
      src/earwigbot/bot.py
  2. +2
    -2
      src/earwigbot/cli.py
  3. +2
    -2
      src/earwigbot/config/__init__.py
  4. +2
    -2
      src/earwigbot/config/formatter.py
  5. +2
    -2
      src/earwigbot/config/node.py
  6. +2
    -2
      src/earwigbot/config/permissions.py
  7. +2
    -2
      src/earwigbot/config/script.py
  8. +2
    -2
      src/earwigbot/irc/watcher.py
  9. +2
    -2
      src/earwigbot/managers.py
  10. +2
    -2
      src/earwigbot/tasks/__init__.py
  11. +2
    -2
      src/earwigbot/wiki/category.py
  12. +2
    -2
      src/earwigbot/wiki/page.py
  13. +2
    -2
      src/earwigbot/wiki/site.py
  14. +2
    -2
      src/earwigbot/wiki/sitesdb.py
  15. +2
    -2
      src/earwigbot/wiki/user.py

+ 2
- 2
src/earwigbot/bot.py Целия файл

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

__all__ = ["Bot"]

import logging
from threading import Lock, Thread
from threading import enumerate as enumerate_threads
@@ -29,8 +31,6 @@ from earwigbot.irc import Frontend, Watcher
from earwigbot.managers import CommandManager, TaskManager
from earwigbot.wiki import SitesDB

__all__ = ["Bot"]


class Bot:
"""


+ 2
- 2
src/earwigbot/cli.py Целия файл

@@ -47,6 +47,8 @@ or run specific tasks.

"""

__all__ = ["main"]

import logging
from argparse import REMAINDER, Action, ArgumentParser
from os import path
@@ -55,8 +57,6 @@ from time import sleep
from earwigbot import __version__
from earwigbot.bot import Bot

__all__ = ["main"]


class _StoreTaskArg(Action):
"""A custom argparse action to read remaining command-line arguments."""


+ 2
- 2
src/earwigbot/config/__init__.py Целия файл

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

__all__ = ["BotConfig"]

import base64
import logging
import logging.handlers
@@ -34,8 +36,6 @@ from earwigbot.config.permissions import PermissionsDB
from earwigbot.config.script import ConfigScript
from earwigbot.exceptions import NoConfigError

__all__ = ["BotConfig"]


class BotConfig:
"""


+ 2
- 2
src/earwigbot/config/formatter.py Целия файл

@@ -18,10 +18,10 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

import logging

__all__ = ["BotFormatter"]

import logging


class BotFormatter(logging.Formatter):
def __init__(self, color=False):


+ 2
- 2
src/earwigbot/config/node.py Целия файл

@@ -18,10 +18,10 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

import base64

__all__ = ["ConfigNode"]

import base64


class ConfigNode:
def __init__(self):


+ 2
- 2
src/earwigbot/config/permissions.py Целия файл

@@ -18,12 +18,12 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

__all__ = ["PermissionsDB"]

import sqlite3 as sqlite
from fnmatch import fnmatch
from threading import Lock

__all__ = ["PermissionsDB"]


class PermissionsDB:
"""


+ 2
- 2
src/earwigbot/config/script.py Целия файл

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

__all__ = ["ConfigScript"]

import base64
import getpass
import os
@@ -33,8 +35,6 @@ import yaml

from earwigbot import exceptions

__all__ = ["ConfigScript"]

RULES_TEMPLATE = """\
from earwigbot.bot import Bot
from earwigbot.irc import RC


+ 2
- 2
src/earwigbot/irc/watcher.py Целия файл

@@ -18,13 +18,13 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

__all__ = ["Watcher"]

import importlib.machinery
import importlib.util

from earwigbot.irc import RC, IRCConnection

__all__ = ["Watcher"]


class Watcher(IRCConnection):
"""


+ 2
- 2
src/earwigbot/managers.py Целия файл

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

__all__ = ["CommandManager", "TaskManager"]

import importlib.machinery
import importlib.util
from os import listdir, path
@@ -29,8 +31,6 @@ from time import gmtime, strftime
from earwigbot.commands import Command
from earwigbot.tasks import Task

__all__ = ["CommandManager", "TaskManager"]


class _ResourceManager:
"""


+ 2
- 2
src/earwigbot/tasks/__init__.py Целия файл

@@ -18,12 +18,12 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

__all__ = ["Task"]

from typing import Any

from earwigbot import exceptions

__all__ = ["Task"]


class Task:
"""


+ 2
- 2
src/earwigbot/wiki/category.py Целия файл

@@ -18,13 +18,13 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

__all__ = ["Category"]

from collections.abc import Iterator

from earwigbot.wiki.constants import Service
from earwigbot.wiki.page import Page

__all__ = ["Category"]


class Category(Page):
"""


+ 2
- 2
src/earwigbot/wiki/page.py Целия файл

@@ -20,6 +20,8 @@

from __future__ import annotations

__all__ = ["Page"]

import hashlib
import re
import time
@@ -39,8 +41,6 @@ if typing.TYPE_CHECKING:
from earwigbot.wiki.site import Site
from earwigbot.wiki.user import User

__all__ = ["Page"]


class Page(CopyvioMixIn):
"""


+ 2
- 2
src/earwigbot/wiki/site.py Целия файл

@@ -20,6 +20,8 @@

from __future__ import annotations

__all__ = ["Site"]

import json
import os.path
import time
@@ -53,8 +55,6 @@ else:
except ModuleNotFoundError:
pymysql = None

__all__ = ["Site"]

T = TypeVar("T")
P = ParamSpec("P")



+ 2
- 2
src/earwigbot/wiki/sitesdb.py Целия файл

@@ -20,6 +20,8 @@

from __future__ import annotations

__all__ = ["SitesDB"]

import errno
import sqlite3 as sqlite
import stat
@@ -38,8 +40,6 @@ from earwigbot.wiki.site import Site, SqlConnInfo
if typing.TYPE_CHECKING:
from earwigbot.bot import Bot

__all__ = ["SitesDB"]


@dataclass(frozen=True)
class _SiteInfoFromDB:


+ 2
- 2
src/earwigbot/wiki/user.py Целия файл

@@ -20,6 +20,8 @@

from __future__ import annotations

__all__ = ["User"]

import socket
import time
import typing
@@ -33,8 +35,6 @@ from earwigbot.wiki.page import Page
if typing.TYPE_CHECKING:
from earwigbot.wiki.site import Site

__all__ = ["User"]


class User:
"""


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