From d2167a0cde6f6f5c87ad6196c4382b20306c17e2 Mon Sep 17 00:00:00 2001 From: Vlad Hurko Date: Sat, 21 Dec 2024 20:47:24 +0000 Subject: [PATCH] Solution --- app/main.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/main.py b/app/main.py index 3b787a5d..e23c1c28 100644 --- a/app/main.py +++ b/app/main.py @@ -19,7 +19,6 @@ def __repr__(self) -> str: f"Hidden: {self.hidden}}}" ) - @classmethod def __str__(cls) -> str: return str([str(animal) for animal in cls.alive]) @@ -32,7 +31,7 @@ def hide(self) -> None: class Carnivore(Animal): - def bite(self, target: int) -> None: + def bite(self, target: Herbivore) -> None: if isinstance(target, Herbivore) and not target.hidden: target.health -= 50 if target.health <= 0: