Browse Source

Fix __all__ placement

tags/v0.4
Ben Kurtovic 2 months ago
parent
commit
d934d52db1
15 changed files with 30 additions and 30 deletions
  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 View File

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


__all__ = ["Bot"]

import logging import logging
from threading import Lock, Thread from threading import Lock, Thread
from threading import enumerate as enumerate_threads 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.managers import CommandManager, TaskManager
from earwigbot.wiki import SitesDB from earwigbot.wiki import SitesDB


__all__ = ["Bot"]



class Bot: class Bot:
""" """


+ 2
- 2
src/earwigbot/cli.py View File

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


""" """


__all__ = ["main"]

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


__all__ = ["main"]



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


+ 2
- 2
src/earwigbot/config/__init__.py View File

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


__all__ = ["BotConfig"]

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


__all__ = ["BotConfig"]



class BotConfig: class BotConfig:
""" """


+ 2
- 2
src/earwigbot/config/formatter.py View File

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


import logging

__all__ = ["BotFormatter"] __all__ = ["BotFormatter"]


import logging



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


+ 2
- 2
src/earwigbot/config/node.py View File

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


import base64

__all__ = ["ConfigNode"] __all__ = ["ConfigNode"]


import base64



class ConfigNode: class ConfigNode:
def __init__(self): def __init__(self):


+ 2
- 2
src/earwigbot/config/permissions.py View File

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


__all__ = ["PermissionsDB"]

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


__all__ = ["PermissionsDB"]



class PermissionsDB: class PermissionsDB:
""" """


+ 2
- 2
src/earwigbot/config/script.py View File

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


__all__ = ["ConfigScript"]

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


from earwigbot import exceptions from earwigbot import exceptions


__all__ = ["ConfigScript"]

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


+ 2
- 2
src/earwigbot/irc/watcher.py View File

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


__all__ = ["Watcher"]

import importlib.machinery import importlib.machinery
import importlib.util import importlib.util


from earwigbot.irc import RC, IRCConnection from earwigbot.irc import RC, IRCConnection


__all__ = ["Watcher"]



class Watcher(IRCConnection): class Watcher(IRCConnection):
""" """


+ 2
- 2
src/earwigbot/managers.py View File

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


__all__ = ["CommandManager", "TaskManager"]

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


__all__ = ["CommandManager", "TaskManager"]



class _ResourceManager: class _ResourceManager:
""" """


+ 2
- 2
src/earwigbot/tasks/__init__.py View File

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


__all__ = ["Task"]

from typing import Any from typing import Any


from earwigbot import exceptions from earwigbot import exceptions


__all__ = ["Task"]



class Task: class Task:
""" """


+ 2
- 2
src/earwigbot/wiki/category.py View File

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


__all__ = ["Category"]

from collections.abc import Iterator from collections.abc import Iterator


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


__all__ = ["Category"]



class Category(Page): class Category(Page):
""" """


+ 2
- 2
src/earwigbot/wiki/page.py View File

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


from __future__ import annotations from __future__ import annotations


__all__ = ["Page"]

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


__all__ = ["Page"]



class Page(CopyvioMixIn): class Page(CopyvioMixIn):
""" """


+ 2
- 2
src/earwigbot/wiki/site.py View File

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


from __future__ import annotations from __future__ import annotations


__all__ = ["Site"]

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


__all__ = ["Site"]

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




+ 2
- 2
src/earwigbot/wiki/sitesdb.py View File

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


from __future__ import annotations from __future__ import annotations


__all__ = ["SitesDB"]

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


__all__ = ["SitesDB"]



@dataclass(frozen=True) @dataclass(frozen=True)
class _SiteInfoFromDB: class _SiteInfoFromDB:


+ 2
- 2
src/earwigbot/wiki/user.py View File

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


from __future__ import annotations from __future__ import annotations


__all__ = ["User"]

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


__all__ = ["User"]



class User: class User:
""" """


Loading…
Cancel
Save