You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempt to add a button to the builder passing in arguments with types ButtonStyle, str
Run mypy
Mypy throws an error that no overload variant matches the types passed in
Expected Result
Mypy should not throw an error as arguments of those types are valid.
Actual Result
nox > python -m mypy lightbulb
lightbulb/utils/nav.py: note: In member "build" of class "ComponentButton":
lightbulb/utils/nav.py:129:15: error: No overload variant of "add_button" of "ActionRowBuilder" matches argument types "ButtonStyle", "str" [call-overload]
btn = container.add_button(self.style, self.custom_id)
^
lightbulb/utils/nav.py:129:15: note: Possible overload variants:
lightbulb/utils/nav.py:129:15: note: def add_button(self, Union[Literal[ButtonStyle.PRIMARY], Literal[1], Literal[ButtonStyle.SECONDARY], Literal[2], Literal[ButtonStyle.SUCCESS], Literal[3], Literal[ButtonStyle.DANGER], Literal[4]], str) -> InteractiveButtonBuilder[ActionRowBuilder]
lightbulb/utils/nav.py:129:15: note: def add_button(self, Union[Literal[ButtonStyle.LINK], Literal[5]], str) -> LinkButtonBuilder[ActionRowBuilder]
Found 1 error in 1 file (checked 31 source files)
nox > Command python -m mypy lightbulb failed with exit code 1
nox > Session mypy failed.
System info
hikari (2.0.0.dev103) [dc0f905a]
located at /Users/thommo/Development/hikari-lightbulb/venv/lib/python3.9/site-packages/hikari
CPython 3.9.6 Clang 12.0.5 (clang-1205.0.22.9)
Darwin Thommos-MacBook-Pro.local 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T8101 arm64 arm
Further info
Checklist
I have made sure to remove ANY sensitive information (bot token, passwords,
credentials, personal details, etc).
I have searched the issue tracker and have made sure it's not a duplicate.
If it is a follow up of another issue, I have specified it.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
ButtonStyle, str
Expected Result
Mypy should not throw an error as arguments of those types are valid.
Actual Result
System info
Further info
Checklist
credentials, personal details, etc).
If it is a follow up of another issue, I have specified it.
The text was updated successfully, but these errors were encountered: