Skip to content

Commit

Permalink
Merge pull request #192 from python-discord/Bump-d.py
Browse files Browse the repository at this point in the history
Bump d.py to 2.3.2
  • Loading branch information
ChrisLovering authored Aug 28, 2023
2 parents fc8af5e + a91c454 commit 1309de6
Show file tree
Hide file tree
Showing 7 changed files with 525 additions and 498 deletions.
8 changes: 0 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ repos:

- repo: local
hooks:
- id: isort
name: isort
description: This hook runs isort within our project's environment.
entry: poetry run isort
language: system
types: [python]
require_serial: true

- id: ruff
name: ruff
description: Run ruff linting
Expand Down
4 changes: 4 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Changelog
=========


- :release:`10.2.0 <28th August 2023>`
- :support:`192` Bump Discord.py to :literal-url:`2.3.2 <https://github.com/Rapptz/discord.py/releases/tag/v2.3.2>`.


- :release:`10.1.0 <25th July 2023>`
- :feature:`190` Overwrite :obj:`discord.ext.commands.Bot.process_commands` to ensure no commands are processed until all extensions are loaded. This only works for clients using :obj:`pydis_core.BotBase.load_extensions`.

Expand Down
7 changes: 4 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,15 @@ def setup(app: Sphinx) -> None:
app.add_role("breaking", releases.issues_role)


ignored_modules = [
ignored_targets = [
"async_rediscache",
"pydantic.main.BaseModel"
]

# nitpick raises warnings as errors. This regex tells nitpick to ignore any warnings that match this regex.
# This is a workaround for modules that do not have docs that can be linked out to.
# This is a workaround for modules/classes that do not have docs that can be linked out to.
nitpick_ignore_regex = [
("py:.*", "|".join([f".*{entry}.*" for entry in ignored_modules])),
("py:.*", "|".join([f".*{entry}.*" for entry in ignored_targets])),
]

# -- Extension configuration -------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions docs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ def linkcode_resolve(repo_link: str, domain: str, info: dict[str, str]) -> str |

pos = _global_assign_pos(source, symbol_name)
if pos is None:
if symbol_name in ("model_config", "model_fields"):
# These are ClassVars added by pydantic.
# Since they're not in our source code, we cannot resolve them to a url.
return None
raise Exception(f"Could not find symbol `{symbol_name}` in {module.__name__}.")

start, end = pos
Expand Down
962 changes: 490 additions & 472 deletions poetry.lock

Large diffs are not rendered by default.

15 changes: 13 additions & 2 deletions pydis_core/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
"""Useful utilities and tools for Discord bot development."""

from pydis_core.utils import (
_monkey_patches, caching, channel, commands, cooldown, error_handling, function, interactions, logging, members,
paste_service, regex, scheduling
_monkey_patches,
caching,
channel,
commands,
cooldown,
error_handling,
function,
interactions,
logging,
members,
paste_service,
regex,
scheduling,
)
from pydis_core.utils._extensions import unqualify

Expand Down
23 changes: 10 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pydis_core"
version = "10.1.0"
version = "10.2.0"
description = "PyDis core provides core functionality and utility to the bots of the Python Discord community."
authors = ["Python Discord <[email protected]>"]
license = "MIT"
Expand All @@ -25,7 +25,7 @@ keywords = ["bot", "discord", "discord.py"]
[tool.poetry.dependencies]
python = "3.10.* || 3.11.*"

"discord.py" = "2.3.1"
"discord.py" = "2.3.2"
async-rediscache = { version = "1.0.0rc2", extras = ["fakeredis"], optional = true }
pydantic = ">=1.7.4,<3.0.0"
statsd = "4.0.1"
Expand All @@ -45,7 +45,7 @@ pytest-xdist = "3.3.1"

[tool.poetry.group.lint.dependencies]
isort = "5.12.0"
ruff = "0.0.275"
ruff = "0.0.286"
pre-commit = "3.3.3"
typing-extensions = "4.6.3"

Expand Down Expand Up @@ -77,15 +77,6 @@ branch = true
source_pkgs = ["pydis_core"]
source = ["tests"]

[tool.isort]
multi_line_output = 6
order_by_type = false
case_sensitive = true
combine_as_imports = true
line_length = 120
atomic = true
known_first_party = ["dev", "pydis_core", "docs"]

[tool.ruff]
target-version = "py310"
extend-exclude = [".cache"]
Expand All @@ -102,7 +93,13 @@ ignore = [
"SIM102", "SIM108",
]
line-length = 120
select = ["ANN", "B", "C4", "D", "DTZ", "E", "F", "ISC", "INT", "N", "PGH", "PIE", "Q", "RET", "RSE", "RUF", "S", "SIM", "T20", "TID", "UP", "W"]
select = ["ANN", "B", "C4", "D", "DTZ", "E", "F", "I", "ISC", "INT", "N", "PGH", "PIE", "Q", "RET", "RSE", "RUF", "S", "SIM", "T20", "TID", "UP", "W"]

[tool.ruff.isort]
order-by-type = false
case-sensitive = true
combine-as-imports = true
known-first-party = ["dev", "pydis_core", "docs"]

[tool.ruff.per-file-ignores]
"tests/*" = ["ANN", "D"]

0 comments on commit 1309de6

Please sign in to comment.