diff options
-rw-r--r-- | .dockerignore | 2 | ||||
-rw-r--r-- | .github/workflows/lint-test.yaml | 2 | ||||
-rw-r--r-- | dev/README.rst | 6 | ||||
-rw-r--r-- | dev/bot/__init__.py | 4 | ||||
-rw-r--r-- | dev/bot/__main__.py | 4 | ||||
-rw-r--r-- | docker-compose.yaml | 2 | ||||
-rw-r--r-- | docs/changelog.rst | 26 | ||||
-rw-r--r-- | docs/index.rst | 2 | ||||
-rw-r--r-- | docs/utils.py | 12 | ||||
-rw-r--r-- | pydis_core/__init__.py (renamed from botcore/__init__.py) | 4 | ||||
-rw-r--r-- | pydis_core/_bot.py (renamed from botcore/_bot.py) | 14 | ||||
-rw-r--r-- | pydis_core/async_stats.py (renamed from botcore/async_stats.py) | 2 | ||||
-rw-r--r-- | pydis_core/exts/__init__.py (renamed from botcore/exts/__init__.py) | 0 | ||||
-rw-r--r-- | pydis_core/site_api.py (renamed from botcore/site_api.py) | 2 | ||||
-rw-r--r-- | pydis_core/utils/__init__.py (renamed from botcore/utils/__init__.py) | 4 | ||||
-rw-r--r-- | pydis_core/utils/_extensions.py (renamed from botcore/utils/_extensions.py) | 0 | ||||
-rw-r--r-- | pydis_core/utils/_monkey_patches.py (renamed from botcore/utils/_monkey_patches.py) | 2 | ||||
-rw-r--r-- | pydis_core/utils/caching.py (renamed from botcore/utils/caching.py) | 0 | ||||
-rw-r--r-- | pydis_core/utils/channel.py (renamed from botcore/utils/channel.py) | 2 | ||||
-rw-r--r-- | pydis_core/utils/commands.py (renamed from botcore/utils/commands.py) | 0 | ||||
-rw-r--r-- | pydis_core/utils/cooldown.py (renamed from botcore/utils/cooldown.py) | 6 | ||||
-rw-r--r-- | pydis_core/utils/function.py (renamed from botcore/utils/function.py) | 0 | ||||
-rw-r--r-- | pydis_core/utils/interactions.py (renamed from botcore/utils/interactions.py) | 4 | ||||
-rw-r--r-- | pydis_core/utils/logging.py (renamed from botcore/utils/logging.py) | 2 | ||||
-rw-r--r-- | pydis_core/utils/members.py (renamed from botcore/utils/members.py) | 2 | ||||
-rw-r--r-- | pydis_core/utils/regex.py (renamed from botcore/utils/regex.py) | 0 | ||||
-rw-r--r-- | pydis_core/utils/scheduling.py (renamed from botcore/utils/scheduling.py) | 2 | ||||
-rw-r--r-- | pyproject.toml | 11 | ||||
-rw-r--r-- | tests/pydis_core/test_api.py (renamed from tests/botcore/test_api.py) | 4 | ||||
-rw-r--r-- | tests/pydis_core/utils/test_cooldown.py (renamed from tests/botcore/utils/test_cooldown.py) | 2 | ||||
-rw-r--r-- | tests/pydis_core/utils/test_regex.py (renamed from tests/botcore/utils/test_regex.py) | 2 | ||||
-rw-r--r-- | tox.ini | 2 |
32 files changed, 66 insertions, 61 deletions
diff --git a/.dockerignore b/.dockerignore index 9fb3df72..b36215c3 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,6 @@ * -!botcore/ +!pydis_core/ !docs/ !tests/ diff --git a/.github/workflows/lint-test.yaml b/.github/workflows/lint-test.yaml index e9821677..dc83086b 100644 --- a/.github/workflows/lint-test.yaml +++ b/.github/workflows/lint-test.yaml @@ -41,7 +41,7 @@ jobs: --format='::error file=%(path)s,line=%(row)d,col=%(col)d::[flake8] %(code)s: %(text)s'" - name: Run tests and generate coverage report - run: python -m pytest -n auto --cov botcore -q + run: python -m pytest -n auto --cov pydis_core -q # Prepare the Pull Request Payload artifact. If this fails, we # we fail silently using the `continue-on-error` option. It's diff --git a/dev/README.rst b/dev/README.rst index ae4f3adc..9428d788 100644 --- a/dev/README.rst +++ b/dev/README.rst @@ -3,7 +3,7 @@ Local Development & Testing To test your features locally, there are a few possible approaches: -1. Install your local copy of botcore into a pre-existing project such as bot +1. Install your local copy of pydis_core into a pre-existing project such as bot 2. Use the provided template from the :repo-file:`dev/bot <dev/bot>` folder See below for more info on both approaches. @@ -17,12 +17,12 @@ vary by the feature you're working on. Option 1 -------- 1. Navigate to the project you want to install bot-core in, such as bot or sir-lancebot -2. Run ``pip install /path/to/botcore`` in the project's environment +2. Run ``pip install /path/to/pydis_core`` in the project's environment - The path provided to install should be the root directory of this project on your machine. That is, the folder which contains the ``pyproject.toml`` file. - Make sure to install in the correct environment. Most Python Discord projects use - poetry, so you can run ``poetry run pip install /path/to/botcore``. + poetry, so you can run ``poetry run pip install /path/to/pydis_core``. 3. You can now use features from your local bot-core changes. To load new changes, run the install command again. diff --git a/dev/bot/__init__.py b/dev/bot/__init__.py index 71871209..6ee1ae47 100644 --- a/dev/bot/__init__.py +++ b/dev/bot/__init__.py @@ -3,7 +3,7 @@ import logging import os import sys -import botcore +import pydis_core if os.name == "nt": # Change the event loop policy on Windows to avoid exceptions on exit @@ -15,7 +15,7 @@ logging.getLogger().setLevel(logging.DEBUG) logging.getLogger("discord").setLevel(logging.ERROR) -class Bot(botcore.BotBase): +class Bot(pydis_core.BotBase): """Sample Bot implementation.""" async def setup_hook(self) -> None: diff --git a/dev/bot/__main__.py b/dev/bot/__main__.py index 42d212c2..1b1a551a 100644 --- a/dev/bot/__main__.py +++ b/dev/bot/__main__.py @@ -6,11 +6,11 @@ import discord import dotenv from discord.ext import commands -import botcore +import pydis_core from . import Bot dotenv.load_dotenv() -botcore.utils.apply_monkey_patches() +pydis_core.utils.apply_monkey_patches() roles = os.getenv("ALLOWED_ROLES") roles = [int(role) for role in roles.split(",")] if roles else [] diff --git a/docker-compose.yaml b/docker-compose.yaml index af882428..078ee6bb 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -69,7 +69,7 @@ services: context: . dockerfile: dev/Dockerfile volumes: # Don't do .:/app here to ensure project venv from host doens't overwrite venv in image - - ./botcore:/app/botcore:ro + - ./pydis_core:/app/pydis_core:ro - ./bot:/app/bot:ro tty: true depends_on: diff --git a/docs/changelog.rst b/docs/changelog.rst index 3e3c7149..819e7d38 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,6 +4,10 @@ Changelog ========= +- :release:`9.0.0 <5th November 2022>` +- :breaking:`157` Rename project to pydis_core to allow for publishing to pypi. + + - :release:`8.2.1 <18th September 2022>` - :bug:`138` Bump Discord.py to :literal-url:`2.0.1 <https://discordpy.readthedocs.io/en/latest/whats_new.html#v2-0-1>`. @@ -13,7 +17,7 @@ Changelog - :release:`8.1.0 <16th August 2022>` -- :support:`124` Updated :obj:`botcore.utils.regex.DISCORD_INVITE` regex to optionally match leading "http[s]" and "www". +- :support:`124` Updated :obj:`pydis_core.utils.regex.DISCORD_INVITE` regex to optionally match leading "http[s]" and "www". - :release:`8.0.0 <27th July 2022>` @@ -28,16 +32,16 @@ Changelog - :release:`7.4.0 <17th July 2022>` -- :feature:`106` Add an optional ``message`` attr to :obj:`botcore.utils.interactions.ViewWithUserAndRoleCheck`. On view timeout, this message has its view removed if set. +- :feature:`106` Add an optional ``message`` attr to :obj:`pydis_core.utils.interactions.ViewWithUserAndRoleCheck`. On view timeout, this message has its view removed if set. - :release:`7.3.1 <16th July 2022>` -- :bug:`104` Fix :obj:`botcore.utils.interactions.DeleteMessageButton` not working due to using wrong delete method. +- :bug:`104` Fix :obj:`pydis_core.utils.interactions.DeleteMessageButton` not working due to using wrong delete method. - :release:`7.3.0 <16th July 2022>` -- :feature:`103` Add a generic view :obj:`botcore.utils.interactions.ViewWithUserAndRoleCheck` that only allows specified users and roles to interaction with it -- :feature:`103` Add a button :obj:`botcore.utils.interactions.DeleteMessageButton` that deletes the message attached to its parent view. +- :feature:`103` Add a generic view :obj:`pydis_core.utils.interactions.ViewWithUserAndRoleCheck` that only allows specified users and roles to interaction with it +- :feature:`103` Add a button :obj:`pydis_core.utils.interactions.DeleteMessageButton` that deletes the message attached to its parent view. - :release:`7.2.2 <9th July 2022>` @@ -46,7 +50,7 @@ Changelog - :release:`7.2.1 <30th June 2022>` - :bug:`96` Fix attempts to connect to ``BotBase.statsd_url`` when it is None. -- :bug:`91` Fix incorrect docstring for ``botcore.utils.member.handle_role_change``. +- :bug:`91` Fix incorrect docstring for ``pydis_core.utils.member.handle_role_change``. - :bug:`91` Pass missing self parameter to ``BotBase.ping_services``. - :bug:`91` Add missing await to ``BotBase.ping_services`` in some cases. @@ -96,7 +100,7 @@ Changelog - :release:`6.1.0 <20th April 2022>` -- :feature:`65` Add ``unqualify`` to the ``botcore.utils`` namespace for use in bots that manipulate extensions. +- :feature:`65` Add ``unqualify`` to the ``pydis_core.utils`` namespace for use in bots that manipulate extensions. - :release:`6.0.0 <19th April 2022>` @@ -112,7 +116,7 @@ Changelog Feature 63 Needs to be explicitly included above because it was improperly released within a bugfix version instead of a minor release -- :feature:`63` Allow passing an ``api_client`` to ``BotBase.__init__`` to specify the ``botcore.site_api.APIClient`` instance to use. +- :feature:`63` Allow passing an ``api_client`` to ``BotBase.__init__`` to specify the ``pydis_core.site_api.APIClient`` instance to use. - :release:`5.0.3 <18th April 2022>` @@ -140,11 +144,11 @@ Changelog - :release:`3.0.1 <5th March 2022>` -- :bug:`37` Setup log tracing when ``botcore.utils.logging`` is imported so that it can be used within botcore functions. +- :bug:`37` Setup log tracing when ``pydis_core.utils.logging`` is imported so that it can be used within pydis_core functions. - :release:`3.0.0 <3rd March 2022>` -- :breaking:`35` Move ``apply_monkey_patches()`` directly to `botcore.utils` namespace. +- :breaking:`35` Move ``apply_monkey_patches()`` directly to `pydis_core.utils` namespace. - :release:`2.1.0 <24th February 2022>` @@ -152,7 +156,7 @@ Changelog - :release:`2.0.0 <22nd February 2022>` -- :breaking:`35` Moved regex to ``botcore.utils`` namespace +- :breaking:`35` Moved regex to ``pydis_core.utils`` namespace - :breaking:`32` Migrate from discord.py 2.0a0 to disnake. - :feature:`32` Add common monkey patches. - :feature:`29` Port many common utilities from our bots: diff --git a/docs/index.rst b/docs/index.rst index aee7b269..259d01cc 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -11,7 +11,7 @@ Reference :maxdepth: 4 :caption: Modules: - output/botcore + output/pydis_core .. toctree:: :caption: Other: diff --git a/docs/utils.py b/docs/utils.py index c8bbc895..e7295798 100644 --- a/docs/utils.py +++ b/docs/utils.py @@ -134,12 +134,12 @@ def cleanup() -> None: included = __get_included() for file in (get_build_root() / "docs" / "output").iterdir(): - if file.name in ("botcore.rst", "botcore.exts.rst", "botcore.utils.rst") and file.name in included: + if file.name in ("pydis_core.rst", "pydis_core.exts.rst", "pydis_core.utils.rst") and file.name in included: content = file.read_text(encoding="utf-8").splitlines(keepends=True) # Rename the extension to be less wordy - # Example: botcore.exts -> Botcore Exts - title = content[0].split()[0].strip().replace("botcore.", "").replace(".", " ").title() + # Example: pydis_core.exts -> pydis_core Exts + title = content[0].split()[0].strip().replace("pydis_core.", "").replace(".", " ").title() title = f"{title}\n{'=' * len(title)}\n\n" content = title, *content[3:] @@ -147,7 +147,7 @@ def cleanup() -> None: elif file.name in included: # Clean up the submodule name so it's just the name without the top level module name - # example: `botcore.regex module` -> `regex` + # example: `pydis_core.regex module` -> `regex` lines = file.read_text(encoding="utf-8").splitlines(keepends=True) lines[0] = lines[0].replace("module", "").strip().split(".")[-1] + "\n" file.write_text("".join(lines)) @@ -164,7 +164,7 @@ def cleanup() -> None: def build_api_doc() -> None: """Generate auto-module directives using apidoc.""" - cmd = os.getenv("APIDOC_COMMAND") or "sphinx-apidoc -o docs/output botcore -feM" + cmd = os.getenv("APIDOC_COMMAND") or "sphinx-apidoc -o docs/output pydis_core -feM" cmd = cmd.split() build_root = get_build_root() @@ -196,7 +196,7 @@ def __get_included() -> set[str]: return _modules - return get_all_from_module("botcore") + return get_all_from_module("pydis_core") def reorder_release_entries(release_list: list[releases.Release]) -> None: diff --git a/botcore/__init__.py b/pydis_core/__init__.py index f0c4e6bb..a09feeaa 100644 --- a/botcore/__init__.py +++ b/pydis_core/__init__.py @@ -1,7 +1,7 @@ """Useful utilities and tools for Discord bot development.""" -from botcore import async_stats, exts, site_api, utils -from botcore._bot import BotBase, StartupError +from pydis_core import async_stats, exts, site_api, utils +from pydis_core._bot import BotBase, StartupError __all__ = [ async_stats, diff --git a/botcore/_bot.py b/pydis_core/_bot.py index bb25c0b5..56814f27 100644 --- a/botcore/_bot.py +++ b/pydis_core/_bot.py @@ -9,11 +9,11 @@ import aiohttp import discord from discord.ext import commands -from botcore.async_stats import AsyncStatsClient -from botcore.site_api import APIClient -from botcore.utils import scheduling -from botcore.utils._extensions import walk_extensions -from botcore.utils.logging import get_logger +from pydis_core.async_stats import AsyncStatsClient +from pydis_core.site_api import APIClient +from pydis_core.utils import scheduling +from pydis_core.utils._extensions import walk_extensions +from pydis_core.utils.logging import get_logger try: from async_rediscache import RedisSession @@ -55,7 +55,7 @@ class BotBase(commands.Bot): allowed_roles: A list of role IDs that the bot is allowed to mention. http_session (aiohttp.ClientSession): The session to use for the bot. redis_session: The `async_rediscache.RedisSession`_ to use for the bot. - api_client: The :obj:`botcore.site_api.APIClient` instance to use for the bot. + api_client: The :obj:`pydis_core.site_api.APIClient` instance to use for the bot. statsd_url: The URL of the statsd server to use for the bot. If not given, a dummy statsd client will be created. @@ -220,7 +220,7 @@ class BotBase(commands.Bot): An async init to startup generic services. Connects to statsd, and calls - :func:`AsyncStatsClient.create_socket <botcore.async_stats.AsyncStatsClient.create_socket>` + :func:`AsyncStatsClient.create_socket <pydis_core.async_stats.AsyncStatsClient.create_socket>` and :func:`ping_services`. """ loop = asyncio.get_running_loop() diff --git a/botcore/async_stats.py b/pydis_core/async_stats.py index fef5b2d6..411325e3 100644 --- a/botcore/async_stats.py +++ b/pydis_core/async_stats.py @@ -6,7 +6,7 @@ from typing import Optional from statsd.client.base import StatsClientBase -from botcore.utils import scheduling +from pydis_core.utils import scheduling class AsyncStatsClient(StatsClientBase): diff --git a/botcore/exts/__init__.py b/pydis_core/exts/__init__.py index afd56166..afd56166 100644 --- a/botcore/exts/__init__.py +++ b/pydis_core/exts/__init__.py diff --git a/botcore/site_api.py b/pydis_core/site_api.py index 44309f9d..c17d2642 100644 --- a/botcore/site_api.py +++ b/pydis_core/site_api.py @@ -6,7 +6,7 @@ from urllib.parse import quote as quote_url import aiohttp -from botcore.utils.logging import get_logger +from pydis_core.utils.logging import get_logger log = get_logger(__name__) diff --git a/botcore/utils/__init__.py b/pydis_core/utils/__init__.py index 09aaa45f..0542231e 100644 --- a/botcore/utils/__init__.py +++ b/pydis_core/utils/__init__.py @@ -1,6 +1,6 @@ """Useful utilities and tools for Discord bot development.""" -from botcore.utils import ( +from pydis_core.utils import ( _monkey_patches, caching, channel, @@ -13,7 +13,7 @@ from botcore.utils import ( regex, scheduling, ) -from botcore.utils._extensions import unqualify +from pydis_core.utils._extensions import unqualify def apply_monkey_patches() -> None: diff --git a/botcore/utils/_extensions.py b/pydis_core/utils/_extensions.py index 536a0715..536a0715 100644 --- a/botcore/utils/_extensions.py +++ b/pydis_core/utils/_extensions.py diff --git a/botcore/utils/_monkey_patches.py b/pydis_core/utils/_monkey_patches.py index c2f8aa10..f0a8dc9c 100644 --- a/botcore/utils/_monkey_patches.py +++ b/pydis_core/utils/_monkey_patches.py @@ -64,7 +64,7 @@ def _patch_typing() -> None: def _apply_monkey_patches() -> None: - """This is surfaced directly in botcore.utils.apply_monkey_patches().""" + """This is surfaced directly in pydis_core.utils.apply_monkey_patches().""" commands.command = partial(commands.command, cls=_Command) commands.GroupMixin.command = partialmethod(commands.GroupMixin.command, cls=_Command) diff --git a/botcore/utils/caching.py b/pydis_core/utils/caching.py index ac34bb9b..ac34bb9b 100644 --- a/botcore/utils/caching.py +++ b/pydis_core/utils/caching.py diff --git a/botcore/utils/channel.py b/pydis_core/utils/channel.py index c09d53bf..854c64fd 100644 --- a/botcore/utils/channel.py +++ b/pydis_core/utils/channel.py @@ -3,7 +3,7 @@ import discord from discord.ext.commands import Bot -from botcore.utils import logging +from pydis_core.utils import logging log = logging.get_logger(__name__) diff --git a/botcore/utils/commands.py b/pydis_core/utils/commands.py index 7afd8137..7afd8137 100644 --- a/botcore/utils/commands.py +++ b/pydis_core/utils/commands.py diff --git a/botcore/utils/cooldown.py b/pydis_core/utils/cooldown.py index 015734d2..5129befd 100644 --- a/botcore/utils/cooldown.py +++ b/pydis_core/utils/cooldown.py @@ -14,8 +14,8 @@ from dataclasses import dataclass import discord from discord.ext.commands import CommandError, Context -from botcore.utils import scheduling -from botcore.utils.function import command_wraps +from pydis_core.utils import scheduling +from pydis_core.utils.function import command_wraps __all__ = ["CommandOnCooldown", "block_duplicate_invocations", "P", "R"] @@ -26,7 +26,7 @@ _HashableArgsTuple = tuple[Hashable, ...] if typing.TYPE_CHECKING: import typing_extensions - from botcore import BotBase + from pydis_core import BotBase P = typing.ParamSpec("P") """The command's signature.""" diff --git a/botcore/utils/function.py b/pydis_core/utils/function.py index d89163ec..d89163ec 100644 --- a/botcore/utils/function.py +++ b/pydis_core/utils/function.py diff --git a/botcore/utils/interactions.py b/pydis_core/utils/interactions.py index 26bd92f2..3e4acffe 100644 --- a/botcore/utils/interactions.py +++ b/pydis_core/utils/interactions.py @@ -3,7 +3,7 @@ from typing import Optional, Sequence from discord import ButtonStyle, Interaction, Message, NotFound, ui -from botcore.utils.logging import get_logger +from pydis_core.utils.logging import get_logger log = get_logger(__name__) @@ -76,7 +76,7 @@ class DeleteMessageButton(ui.Button): This button itself carries out no interaction checks, these should be done by the parent view. - See :obj:`botcore.utils.interactions.ViewWithUserAndRoleCheck` for a view that implements basic checks. + See :obj:`pydis_core.utils.interactions.ViewWithUserAndRoleCheck` for a view that implements basic checks. Args: style (:literal-url:`ButtonStyle <https://discordpy.readthedocs.io/en/latest/interactions/api.html#discord.ButtonStyle>`): diff --git a/botcore/utils/logging.py b/pydis_core/utils/logging.py index 1f1c8bac..7814f348 100644 --- a/botcore/utils/logging.py +++ b/pydis_core/utils/logging.py @@ -45,7 +45,7 @@ def get_logger(name: typing.Optional[str] = None) -> CustomLogger: return typing.cast(CustomLogger, logging.getLogger(name)) -# Setup trace level logging so that we can use it within botcore. +# Setup trace level logging so that we can use it within pydis_core. logging.TRACE = TRACE_LEVEL logging.setLoggerClass(CustomLogger) logging.addLevelName(TRACE_LEVEL, "TRACE") diff --git a/botcore/utils/members.py b/pydis_core/utils/members.py index 1536a8d1..b6eacc88 100644 --- a/botcore/utils/members.py +++ b/pydis_core/utils/members.py @@ -4,7 +4,7 @@ from collections import abc import discord -from botcore.utils import logging +from pydis_core.utils import logging log = logging.get_logger(__name__) diff --git a/botcore/utils/regex.py b/pydis_core/utils/regex.py index de82a1ed..de82a1ed 100644 --- a/botcore/utils/regex.py +++ b/pydis_core/utils/regex.py diff --git a/botcore/utils/scheduling.py b/pydis_core/utils/scheduling.py index 9517df6d..eced4a3d 100644 --- a/botcore/utils/scheduling.py +++ b/pydis_core/utils/scheduling.py @@ -8,7 +8,7 @@ from collections import abc from datetime import datetime from functools import partial -from botcore.utils import logging +from pydis_core.utils import logging class Scheduler: diff --git a/pyproject.toml b/pyproject.toml index d7a4bfb5..b742991d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] -name = "bot-core" -version = "8.2.1" -description = "PyDis bot core provides core functionality and utility to the bots of the Python Discord community." +name = "pydis_core" +version = "9.0.0" +description = "PyDis core provides core functionality and utility to the bots of the Python Discord community." authors = ["Python Discord <[email protected]>"] license = "MIT" classifiers=[ @@ -12,11 +12,12 @@ classifiers=[ "Programming Language :: Python :: 3", ] packages = [ - { include = "botcore" }, + { include = "pydis_core" }, ] include = ["LICENSE"] exclude = ["tests", "tests.*"] readme = "README.md" +homepage = "https://pythondiscord.com/" documentation = "https://bot-core.pythondiscord.com/" repository = "https://github.com/python-discord/bot-core" keywords = ["bot", "discord", "discord.py"] @@ -68,5 +69,5 @@ build-backend = "poetry.core.masonry.api" [tool.coverage.run] branch = true -source_pkgs = ["botcore"] +source_pkgs = ["pydis_core"] source = ["tests"] diff --git a/tests/botcore/test_api.py b/tests/pydis_core/test_api.py index 86c9e5f3..92444e19 100644 --- a/tests/botcore/test_api.py +++ b/tests/pydis_core/test_api.py @@ -1,11 +1,11 @@ import unittest from unittest.mock import MagicMock -from botcore import site_api +from pydis_core import site_api class APIClientTests(unittest.IsolatedAsyncioTestCase): - """Tests for botcore's site API client.""" + """Tests for pydis_core's site API client.""" @classmethod def setUpClass(cls): diff --git a/tests/botcore/utils/test_cooldown.py b/tests/pydis_core/utils/test_cooldown.py index 00e5a052..eed16da3 100644 --- a/tests/botcore/utils/test_cooldown.py +++ b/tests/pydis_core/utils/test_cooldown.py @@ -1,7 +1,7 @@ import unittest from unittest.mock import patch -from botcore.utils.cooldown import _CommandCooldownManager, _create_argument_tuple +from pydis_core.utils.cooldown import _CommandCooldownManager, _create_argument_tuple class CommandCooldownManagerTests(unittest.IsolatedAsyncioTestCase): diff --git a/tests/botcore/utils/test_regex.py b/tests/pydis_core/utils/test_regex.py index 491e22bd..01a2412b 100644 --- a/tests/botcore/utils/test_regex.py +++ b/tests/pydis_core/utils/test_regex.py @@ -1,7 +1,7 @@ import unittest from typing import Optional -from botcore.utils.regex import DISCORD_INVITE +from pydis_core.utils.regex import DISCORD_INVITE def match_regex(s: str) -> Optional[str]: @@ -2,7 +2,7 @@ max-line-length=120 docstring-convention=all import-order-style=pycharm -application_import_names=botcore,docs,tests +application_import_names=pydis_core,docs,tests exclude=.cache,.venv,.git,constants.py,bot/ ignore= B311,W503,E226,S311,T000,E731 |