From c08d133e2eeaf5039d9570fb331f36a40019d471 Mon Sep 17 00:00:00 2001 From: FaberSid <33521696+FaberSid@users.noreply.github.com> Date: Thu, 10 Feb 2022 23:12:26 +0900 Subject: [PATCH] Add an assignment statement to setter ## Summary It is defined as a setter, but does not actually assign them. ## Checklist - [ ] If code changes were made then they have been tested. - [ ] I have updated the documentation to reflect the changes. - [ ] This PR fixes an issue. - [ ] This PR adds something new (e.g. new method or parameters). - [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed) - [ ] This PR is not a code change (e.g. documentation, README, ...) --- discord/ui/input_text.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/discord/ui/input_text.py b/discord/ui/input_text.py index 9e9cab37c5..818cca11a5 100644 --- a/discord/ui/input_text.py +++ b/discord/ui/input_text.py @@ -108,6 +108,7 @@ def label(self) -> str: def label(self, value: str): if not isinstance(value, str): raise TypeError(f"label should be None or str not {value.__class__}") + self._underlying.label = value @property def placeholder(self) -> Optional[str]: @@ -151,6 +152,7 @@ def required(self) -> Optional[bool]: def required(self, value: Optional[bool]): if not isinstance(value, bool): raise TypeError(f"required must be bool not {value.__class__}") # type: ignore + self._underlying.required = bool(value) @property def value(self) -> Optional[str]: