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 #1308

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Solution #1308

wants to merge 1 commit into from

Conversation

mkryvsha
Copy link

@mkryvsha mkryvsha commented Nov 3, 2024

No description provided.

Copy link

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

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

Great job on implementing the Animal, Cat, and Dog classes, as well as the feed_animals function! 🎉 Your code meets the task requirements and constraints effectively. While there are minor issues with return types in some methods, they don't impact the core functionality. Keep up the good work, and consider refining the return types for better clarity in the future. 😊

✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨

self.appetite = appetite
self.is_hungry = is_hungry

def print_name(self) -> str:

Choose a reason for hiding this comment

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

The method print_name is defined to return a str, but it actually returns None because it only prints the name. Consider changing the return type to None or returning a string.

def print_name(self) -> str:
print(f"Hello, I\'m {self.name}")

def feed(self) -> str | int:

Choose a reason for hiding this comment

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

The method feed is defined to return str | int, but it only returns an int. Consider updating the return type to int unless you plan to return a string in some cases.

def __init__(self, name: str, is_hungry: bool = True) -> None:
super().__init__(name, appetite=3, is_hungry=is_hungry)

def catch_mouse(self) -> str:

Choose a reason for hiding this comment

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

The method catch_mouse is defined to return a str, but it actually returns None because it only prints a message. Consider changing the return type to None or returning a string.

def __init__(self, name: str, is_hungry: bool = True) -> None:
super().__init__(name, appetite=7, is_hungry=is_hungry)

def bring_slippers(self) -> str:

Choose a reason for hiding this comment

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

The method bring_slippers is defined to return a str, but it actually returns None because it only prints a message. Consider changing the return type to None or returning a string.

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.

2 participants