aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-10-07 19:52:59 +0100
committerGravatar Chris Lovering <[email protected]>2024-10-07 19:52:59 +0100
commitbc88836aa9234c6806e64da651e7cf4a3aa6ada0 (patch)
tree0650dca44b15a84aff28c581950d0dd67285f1ae
parentMerge pull request #3179 from python-discord/Snekbox-multi-version (diff)
Rename kwarg in eval button to be clearer
-rw-r--r--bot/exts/utils/snekbox/_cog.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/exts/utils/snekbox/_cog.py b/bot/exts/utils/snekbox/_cog.py
index 32384c43f..2f35f461c 100644
--- a/bot/exts/utils/snekbox/_cog.py
+++ b/bot/exts/utils/snekbox/_cog.py
@@ -136,13 +136,13 @@ class PythonVersionSwitcherButton(ui.Button):
def __init__(
self,
- version_to_switch_to: SupportedPythonVersions,
+ version_to_run: SupportedPythonVersions,
snekbox_cog: Snekbox,
ctx: Context,
job: EvalJob,
) -> None:
- self.version_to_switch_to = version_to_switch_to
- super().__init__(label=f"Run in {self.version_to_switch_to}", style=enums.ButtonStyle.primary)
+ self.version_to_run = version_to_run
+ super().__init__(label=f"Run in {self.version_to_run}", style=enums.ButtonStyle.primary)
self.snekbox_cog = snekbox_cog
self.ctx = ctx
@@ -163,7 +163,7 @@ class PythonVersionSwitcherButton(ui.Button):
# The log arg on send_job will stop the actual job from running.
await interaction.message.delete()
- await self.snekbox_cog.run_job(self.ctx, self.job.as_version(self.version_to_switch_to))
+ await self.snekbox_cog.run_job(self.ctx, self.job.as_version(self.version_to_run))
class Snekbox(Cog):