From bc88836aa9234c6806e64da651e7cf4a3aa6ada0 Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Mon, 7 Oct 2024 19:52:59 +0100 Subject: Rename kwarg in eval button to be clearer --- bot/exts/utils/snekbox/_cog.py | 8 ++++---- 1 file 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): -- cgit v1.2.3