Skip to content

Commit

Permalink
Merge pull request #188 from python-discord/paste-servic-emultiple-files
Browse files Browse the repository at this point in the history
Support sending multiple files to paste service at once
  • Loading branch information
ChrisLovering authored Jul 20, 2023
2 parents 29af8a9 + d087bec commit b52f1ab
Show file tree
Hide file tree
Showing 5 changed files with 359 additions and 199 deletions.
4 changes: 3 additions & 1 deletion docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://github.com/Rapptz/discord.py/releases/tag/v2.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>`
Expand Down
17 changes: 15 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import contextlib
import functools
import logging
import os.path
import shutil
import sys
Expand Down Expand Up @@ -103,6 +104,17 @@
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]
Expand All @@ -118,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"
Expand Down Expand Up @@ -179,6 +191,7 @@ def setup(app: Sphinx) -> None:
"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),
}


Expand Down
Loading

0 comments on commit b52f1ab

Please sign in to comment.