From 8af57254ae188d8dc72eb886bf2fcf6b19949300 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Fri, 6 Jun 2025 18:37:21 +0100 Subject: [PATCH] black line length 120 --- app/close.py | 12 +++--------- app/meme.py | 24 ++++++------------------ pyproject.toml | 2 +- tests/test_meme.py | 6 +----- 4 files changed, 11 insertions(+), 33 deletions(-) diff --git a/app/close.py b/app/close.py index 6565749..390471d 100644 --- a/app/close.py +++ b/app/close.py @@ -15,20 +15,14 @@ class ExitCommand(Command): ) self.sender: str = "" - def pre_execute( - self, message, attachment_actions, activity - ) -> None: # pylint: disable=unused-argument + def pre_execute(self, message, attachment_actions, activity) -> None: # pylint: disable=unused-argument """Pre-execution logic for the exit command.""" return - def execute( - self, message, attachment_actions, activity - ) -> None: # pylint: disable=unused-argument + def execute(self, message, attachment_actions, activity) -> None: # pylint: disable=unused-argument """Execute the exit command.""" return - def post_execute( - self, message, attachment_actions, activity - ) -> None: # pylint: disable=unused-argument + def post_execute(self, message, attachment_actions, activity) -> None: # pylint: disable=unused-argument """Post-execution logic for the exit command.""" return diff --git a/app/meme.py b/app/meme.py index d54a927..95ad893 100644 --- a/app/meme.py +++ b/app/meme.py @@ -32,15 +32,11 @@ class MakeMemeCommand(Command): delete_previous_message=True, ) - def pre_execute( - self, message, attachment_actions, activity - ) -> None: # pylint: disable=unused-argument + def pre_execute(self, message, attachment_actions, activity) -> None: # pylint: disable=unused-argument """Pre-execution logic for the MakeMemeCommand.""" return - def execute( - self, message, attachment_actions, activity - ) -> Response: # pylint: disable=unused-argument + def execute(self, message, attachment_actions, activity) -> Response: # pylint: disable=unused-argument """Execute the MakeMemeCommand and return an adaptive card.""" card_body: list = [ ColumnSet( @@ -77,9 +73,7 @@ class MakeMemeCommand(Command): Choices( id="meme_type", isMultiSelect=False, - choices=[ - Choice(title=x["name"], value=x["choiceval"]) for x in TEMPLATES - ], + choices=[Choice(title=x["name"], value=x["choiceval"]) for x in TEMPLATES], ), Text(id="text_top", placeholder="Top Text", maxLength=100), Text( @@ -122,9 +116,7 @@ class MakeMemeCallback(Command): self.meme: str = "" self.meme_filename: str = "" - def pre_execute( - self, message, attachment_actions, activity - ) -> str: # pylint: disable=unused-argument + def pre_execute(self, message, attachment_actions, activity) -> str: # pylint: disable=unused-argument """Pre-execution logic for the MakeMemeCallback.""" self.meme: str = attachment_actions.inputs.get("meme_type") self.text_top: str = attachment_actions.inputs.get("text_top") @@ -139,9 +131,7 @@ class MakeMemeCallback(Command): return "Generating your meme..." - def execute( - self, message, attachment_actions, activity - ) -> Response | None: # pylint: disable=unused-argument + def execute(self, message, attachment_actions, activity) -> Response | None: # pylint: disable=unused-argument """Execute the MakeMemeCallback and return a response with the meme image.""" if self.error: return None @@ -156,8 +146,6 @@ class MakeMemeCallback(Command): ) return msg - def post_execute( - self, message, attachment_actions, activity - ) -> None: # pylint: disable=unused-argument + def post_execute(self, message, attachment_actions, activity) -> None: # pylint: disable=unused-argument """Post-execution logic for the MakeMemeCallback.""" return diff --git a/pyproject.toml b/pyproject.toml index d26f212..b57f890 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,4 +34,4 @@ requires = ["pdm-backend"] build-backend = "pdm.backend" [tool.black] -line-length = 101 +line-length = 120 diff --git a/tests/test_meme.py b/tests/test_meme.py index 3c0a878..28d8aa5 100644 --- a/tests/test_meme.py +++ b/tests/test_meme.py @@ -29,8 +29,4 @@ def test_error_false() -> None: callback.text_top = "TEST" callback.text_bottom = "TEST" result: Response = callback.execute(None, None, {"target": {"globalId": "TEST"}}) - assert ( - isinstance(result, Response) - and result.roomId == "TEST" - and result.files[0] == callback.meme_filename - ) + assert isinstance(result, Response) and result.roomId == "TEST" and result.files[0] == callback.meme_filename