black line length 120
This commit is contained in:
parent
a1644e3652
commit
8af57254ae
12
app/close.py
12
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
|
||||
|
24
app/meme.py
24
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
|
||||
|
@ -34,4 +34,4 @@ requires = ["pdm-backend"]
|
||||
build-backend = "pdm.backend"
|
||||
|
||||
[tool.black]
|
||||
line-length = 101
|
||||
line-length = 120
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user