Skip to content

Commit

Permalink
fix: use typing_extensions for py3.8 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
Sharp-Eyes committed Sep 23, 2024
1 parent eb9df45 commit 9cf0e3b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ build-backend = "poetry.core.masonry.api"

[tool.pyright]
typeCheckingMode = "strict"
python-version = 3.8
pythonVersion = "3.8"
reportMissingTypeStubs = false
exclude = [
# Default options
Expand Down
7 changes: 4 additions & 3 deletions src/disnake/ext/components/interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import typing

import disnake
import typing_extensions
from disnake.ext.components.api import component as component_api

__all__: typing.Sequence[str] = (
Expand Down Expand Up @@ -46,16 +47,16 @@
disnake.ui.MentionableSelect[typing.Any],
]

P = typing.ParamSpec("P")
P = typing_extensions.ParamSpec("P")
InteractionT = typing.TypeVar("InteractionT", bound=disnake.Interaction)
ReturnT = typing.TypeVar("ReturnT")

InteractionCallback = typing.Callable[
typing.Concatenate[InteractionT, P],
typing_extensions.Concatenate[InteractionT, P],
typing.Coroutine[None, None, ReturnT],
]
InteractionCallbackMethod = typing.Callable[
typing.Concatenate[typing.Any, InteractionT, P],
typing_extensions.Concatenate[typing.Any, InteractionT, P],
typing.Coroutine[None, None, ReturnT],
]

Expand Down

0 comments on commit 9cf0e3b

Please sign in to comment.