diff --git a/app/main.py b/app/main.py index d780768f..09c2bacb 100644 --- a/app/main.py +++ b/app/main.py @@ -12,8 +12,10 @@ def __init__(self, Animal.alive.append(self) def __repr__(self) -> str: - return "{{Name: {}, Health: {}, Hidden: {}}}".format( - self.name, self.health, self.hidden + return ( + f"{{Name: {self.name}," + f" Health: {self.health}," + f" Hidden: {self.hidden}}}" ) @@ -23,7 +25,8 @@ def hide(self) -> None: class Carnivore(Animal): - def bite(self, herbivore: Herbivore) -> None: + @staticmethod + def bite(herbivore: Herbivore) -> None: if isinstance(herbivore, Herbivore) and not herbivore.hidden: herbivore.health -= 50 if herbivore.health <= 0: