Skip to content

Commit b52f1ab

Browse files
Merge pull request #188 from python-discord/paste-servic-emultiple-files
Support sending multiple files to paste service at once
2 parents 29af8a9 + d087bec commit b52f1ab

File tree

5 files changed

+359
-199
lines changed

5 files changed

+359
-199
lines changed

docs/changelog.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ Changelog
55
=========
66

77

8+
- :release:`10.0.0 <14th July 2023>`
9+
- :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`
10+
- :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`.
811
- :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.
912
- :support:`184` Bump Discord.py to :literal-url:`2.3.1 <https://github.com/Rapptz/discord.py/releases/tag/v2.3.1>`.
10-
- :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`.
1113

1214

1315
- :release:`9.9.2 <2nd July 2023>`

docs/conf.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
import contextlib
55
import functools
6+
import logging
67
import os.path
78
import shutil
89
import sys
@@ -103,6 +104,17 @@
103104
utils.build_api_doc()
104105

105106

107+
class AutoDocFilter(logging.Filter):
108+
"""Filter out warnings that we deem not important."""
109+
110+
def filter(self, record: logging.LogRecord) -> bool:
111+
"""Return whether to filter out a specific warning line."""
112+
return "cannot import name 'AbstractSetIntStr' from 'pydantic._internal._utils" not in record.msg
113+
114+
115+
sphinx.util.logging.getLogger("sphinx_autodoc_typehints").logger.addFilter(AutoDocFilter())
116+
117+
106118
def skip(*args) -> bool:
107119
"""Things that should be skipped by the autodoc generation."""
108120
name = args[2]
@@ -118,8 +130,8 @@ def skip(*args) -> bool:
118130
def post_build(_: Sphinx, exception: Exception) -> None:
119131
"""Clean up and process files after the build has finished."""
120132
if exception:
121-
# Don't accidentally supress exceptions
122-
raise exception from None
133+
# Don't accidentally suppress exceptions
134+
raise exception
123135

124136
build_folder = PROJECT_ROOT / "docs" / "build"
125137
main_build = build_folder / "main"
@@ -179,6 +191,7 @@ def setup(app: Sphinx) -> None:
179191
"discord": ("https://discordpy.readthedocs.io/en/latest/", None),
180192
"aiohttp": ("https://docs.aiohttp.org/en/stable/", None),
181193
"statsd": ("https://statsd.readthedocs.io/en/v3.3/", ("_static/statsd_additional_objects.inv", None)),
194+
"pydantic": ("https://docs.pydantic.dev/latest/", None),
182195
}
183196

184197

0 commit comments

Comments
 (0)