From b0ec5069c457c753beddfd729d95d4cb493cacec Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Fri, 14 Jul 2023 17:07:43 +0100 Subject: Support sending multiple files to paste service at once Co-authored-by: Hassan Abouelela --- docs/changelog.rst | 4 +++- docs/conf.py | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/changelog.rst b/docs/changelog.rst index e8cc8ca0..adad0bc3 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -5,9 +5,11 @@ Changelog ========= +- :release:`10.0.0 <14th July 2023>` +- :breaking:`188` Support sending multiple files at once to paste service. All calls to :obj:`pydis_core.utils.paste_service.send_to_paste_service` must now provide a list of :obj:`pydis_core.utils.paste_service.PasteFile` +- :bug:`187 major` Fix :obj:`pydis_core.utils.channel.get_or_fetch_channel`'s return type to include :obj:`discord.abc.PrivateChannel` and :obj:`discord.Thread`. - :feature:`184` Remove the message stored in the ``message`` attr of :obj:`pydis_core.utils.interactions.ViewWithUserAndRoleCheck` when the interaction is stopped, in additional to the exist logic for timeout. - :support:`184` Bump Discord.py to :literal-url:`2.3.1 `. -- :bug:`187` Fix :obj:`pydis_core.utils.channel.get_or_fetch_channel`'s return type to include :obj:`discord.abc.PrivateChannel` and :obj:`discord.Thread`. - :release:`9.9.2 <2nd July 2023>` diff --git a/docs/conf.py b/docs/conf.py index 23636774..cc9340ab 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -3,6 +3,7 @@ import contextlib import functools +import logging import os.path import shutil import sys @@ -103,6 +104,17 @@ html_js_files = utils.get_recursive_file_uris(static, "*.js") utils.build_api_doc() +class AutoDocFilter(logging.Filter): + """Filter out warnings that we deem not important.""" + + def filter(self, record: logging.LogRecord) -> bool: + """Return whether to filter out a specific warning line.""" + return "cannot import name 'AbstractSetIntStr' from 'pydantic._internal._utils" not in record.msg + + +sphinx.util.logging.getLogger("sphinx_autodoc_typehints").logger.addFilter(AutoDocFilter()) + + def skip(*args) -> bool: """Things that should be skipped by the autodoc generation.""" name = args[2] @@ -179,6 +191,7 @@ intersphinx_mapping = { "discord": ("https://discordpy.readthedocs.io/en/latest/", None), "aiohttp": ("https://docs.aiohttp.org/en/stable/", None), "statsd": ("https://statsd.readthedocs.io/en/v3.3/", ("_static/statsd_additional_objects.inv", None)), + "pydantic": ("https://docs.pydantic.dev/latest/", None), } -- cgit v1.2.3 From e76052ffdfbb24893b372b51b68a680b0d15dedc Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Fri, 14 Jul 2023 17:08:21 +0100 Subject: Don't swallow exceptions in post_build --- docs/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/conf.py b/docs/conf.py index cc9340ab..683f9e51 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -130,8 +130,8 @@ def skip(*args) -> bool: def post_build(_: Sphinx, exception: Exception) -> None: """Clean up and process files after the build has finished.""" if exception: - # Don't accidentally supress exceptions - raise exception from None + # Don't accidentally suppress exceptions + raise exception build_folder = PROJECT_ROOT / "docs" / "build" main_build = build_folder / "main" -- cgit v1.2.3