Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"solution" #665

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

GulhayaKulsahatova
Copy link

No description provided.

app/main.py Outdated
Animal.alive.append(self)

def __repr__(self) -> str:
return f"{{Name: {self.name}, Health: " \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use () instead of  \

app/main.py Outdated
class Carnivore(Animal):
@staticmethod
def bite(herbivore: Herbivore) -> None:
if not isinstance(herbivore, Carnivore) and not herbivore.hidden:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if not isinstance(herbivore, Carnivore) and not herbivore.hidden:
if isinstance(herbivore, Herbivore) and not herbivore.hidden:

app/main.py Outdated
Comment on lines 4 to 5
def __init__(self, name: str,
health: int = 100, hidden: bool = False) -> None:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def __init__(self, name: str,
health: int = 100, hidden: bool = False) -> None:
def __init__(
self, name: str,
health: int = 100,
hidden: bool = False
) -> None:

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do it

Copy link

@vsmutok vsmutok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great 👍

app/main.py Outdated
Comment on lines 4 to 5
def __init__(self, name: str,
health: int = 100, hidden: bool = False) -> None:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants