Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Remove confusing warning messages #1030 * Fix test comments
- Loading branch information
Showing
2 changed files
with
38 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,10 +149,17 @@ def __init__( | |
subtype: Optional[str] = None, | ||
**others: dict, | ||
): | ||
"""An interactive block element. | ||
We generally recommend using the concrete subclasses for better supports of available properties. | ||
""" | ||
if subtype: | ||
self._subtype_warning() | ||
super().__init__(type=type or subtype) | ||
show_unknown_key_warning(self, others) | ||
|
||
# Note that we don't intentionally have show_unknown_key_warning for the unknown key warnings here. | ||
# It's fine to pass any kwargs to the held dict here although the class does not do any validation. | ||
# show_unknown_key_warning(self, others) | ||
|
||
self.action_id = action_id | ||
|
||
|
@@ -190,11 +197,17 @@ def __init__( | |
confirm: Optional[Union[dict, ConfirmObject]] = None, | ||
**others: dict, | ||
): | ||
"""InteractiveElement that is usable in input blocks""" | ||
"""InteractiveElement that is usable in input blocks | ||
We generally recommend using the concrete subclasses for better supports of available properties. | ||
""" | ||
if subtype: | ||
self._subtype_warning() | ||
super().__init__(action_id=action_id, type=type or subtype) | ||
show_unknown_key_warning(self, others) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
seratch
Author
Member
|
||
|
||
# Note that we don't intentionally have show_unknown_key_warning for the unknown key warnings here. | ||
# It's fine to pass any kwargs to the held dict here although the class does not do any validation. | ||
# show_unknown_key_warning(self, others) | ||
|
||
self.placeholder = TextObject.parse(placeholder) | ||
self.confirm = ConfirmObject.parse(confirm) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
just curious about why this is? I've had a couple of times where i misspell a kwarg like
initial_option
vsinitial_options
for different kinds of select elements and it takes me a while to figure out what i did, especially when i first start using something. curious if this warning was there to help lead developers in the right direction during that type of situation and if so, im just curious about the reasoning for moving away from it?