Skip to content

Commit 82f98fc

Browse files
committed
Replace is comparison for checking value equality with ==
1 parent 859beb6 commit 82f98fc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

discord_slash/dpy_overrides.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def get_component(self, custom_id: int) -> typing.Optional[dict]:
2323
"""
2424
for row in self.components:
2525
for component in row["components"]:
26-
if component["custom_id"] is custom_id:
26+
if component["custom_id"] == custom_id:
2727
return component
2828

2929

discord_slash/utils/manage_components.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def spread_to_rows(*components, max_in_row=5) -> typing.List[dict]:
4747
rows = []
4848
button_row = []
4949
for component in list(components) + [None]:
50-
if component is not None and component["type"] is ComponentType.button:
50+
if component is not None and component["type"] == ComponentType.button:
5151
button_row.append(component)
5252

5353
if len(button_row) == max_in_row:
@@ -62,9 +62,9 @@ def spread_to_rows(*components, max_in_row=5) -> typing.List[dict]:
6262

6363
if component is None:
6464
pass
65-
elif component["type"] is ComponentType.actionrow:
65+
elif component["type"] == ComponentType.actionrow:
6666
rows.append(component)
67-
elif component["type"] is ComponentType.select:
67+
elif component["type"] == ComponentType.select:
6868
rows.append(create_actionrow(component))
6969

7070
if len(rows) > 5:

0 commit comments

Comments
 (0)