From 0893f173ccf653845afa76dc509c4f51676cea05 Mon Sep 17 00:00:00 2001 From: yuraf Date: Fri, 29 Nov 2024 07:29:11 +0200 Subject: [PATCH] solution --- app/main.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/main.py b/app/main.py index a98e5532..4ef47500 100644 --- a/app/main.py +++ b/app/main.py @@ -9,7 +9,8 @@ def __init__(self, name: str, health: int = 100) -> None: Animal.alive.append(self) def __repr__(self) -> str: - return f"{{Name: {self.name}, Health: {self.health}, Hidden: {self.hidden}}}" + return (f"{{Name: {self.name}, " + f"Health: {self.health}, Hidden: {self.hidden}}}") @classmethod def update_alive(cls) -> None: @@ -27,5 +28,3 @@ def bite(self, prey: "Animal") -> None: prey.health -= 50 if prey.health <= 0: Animal.update_alive() - -